黃河泉 发表于 2018-12-16 07:59
请说明其规则?
* Example generated by -dataex-. To install: ssc install dataex
clear
input int year str12 m str18 n float frequency
2003 "芦玲" "梁晓燕" 1
2017 "刘勇" "邓明勇" 1
2017 " 姚丽珍" "朱依君" 1
2010 "丁亚轩" "梁涛" 1
2017 "丁亚轩" "梁涛" 1
2006 "丁亚轩" "罗道玉" 1
2007 "丁亭亭" "孔庆华" 1
2008 "丁亭亭" "孔庆华" 2
2009 "丁亭亭" "孔庆华" 1
2013 "丁亭亭" "孔庆华" 1
2011 "丁亭亭" "宁光美" 1
2012 "丁亭亭" "宁光美" 1
2011 "丁亭亭" "王越" 1
2006 "丁亭亭" "谢青" 2
2007 "丁亭亭" "谢青" 1
2011 "丁亭亭" "谢青" 2
2012 "丁亭亭" "谢青" 2
2011 "丁亭亭" "邹宏文" 3
2003 "丁亭亭" "黄庆林" 1
2015 "丁从娜" "乐超军" 1
2010 "丁伟萍" "朱子武" 1
2011 "丁伟萍" "朱子武" 1
2014 "丁伟萍" "聂勇" 1
2015 "丁伟萍" "聂勇" 1
2016 "丁伟萍" "聂勇" 1
2010 "丁伟萍" "谢军" 1
2011 "丁伟萍" "谢军" 1
2012 "丁伟萍" "谢军" 1
2014 "丁伟萍" "谢军" 1
2015 "丁伟萍" "谢军" 1
2016 "丁伟萍" "谢军" 1
2004 "丁伟萍" "钟平" 1
2005 "丁伟萍" "钟平" 1
2006 "丁伟萍" "钟平" 1
2007 "丁伟萍" "钟平" 1
2008 "丁伟萍" "钟平" 1
2012 "丁伟萍" "钟平" 1
2013 "丁伟萍" "钟平" 2
2013 "丁兆栋" "吕建幕" 1
2015 "丁兆栋" "吕建幕" 1
2013 "丁兆栋" "李江山" 2
2014 "丁兆栋" "李江山" 1
2015 "丁兆栋" "李江山" 1
2008 "丁兆栋" "牟敦潭" 1
2009 "丁兆栋" "牟敦潭" 1
2010 "丁兆栋" "牟敦潭" 2
2011 "丁兆栋" "牟敦潭" 1
2012 "丁兆栋" "牟敦潭" 2
2013 "丁兆栋" "牟敦潭" 2
2014 "丁兆栋" "牟敦潭" 1
2015 "丁兆栋" "牟敦潭" 1
2016 "丁兆栋" "牟敦潭" 1
2007 "丁兆栋" "王晖" 1
2017 "丁兆栋" "谭正嘉" 1
2017 "丁兆鑫" "罗芸" 1
2017 "丁凤" "林蓉" 1
2004 "丁剑波" "刘守堂" 1
2005 "丁剑波" "王吉祥" 1
2009 "丁剑辉" "张森" 1
2007 "丁力" "王远" 1
2010 "丁勇" "于晓平" 1
2010 "丁勇" "师玉春" 1
2011 "丁勇" "师玉春" 3
2010 "丁勇" "张学福" 1
2011 "丁勇" "张海峰" 1
2006 "丁勇" "朱海武" 3
2007 "丁勇" "朱海武" 4
2009 "丁勇" "杨力强" 1
2010 "丁勇" "王振伟" 2
2011 "丁勇" "王振伟" 1
2011 "丁勇" "田海龙" 2
2008 "丁勇" "赵雷励" 1
2009 "丁勇" "赵雷励" 1
2011 "丁勇" "鲍中友" 1
2014 "丁启新" "王国蓓" 1
2015 "丁启新" "王国蓓" 1
2016 "丁启新" "王国蓓" 1
2017 "丁哲寅" "刘伟" 1
2017 "丁娜" "张宏敏" 1
2017 "丁娜" "胡铁军" 1
1996 "丁宗保" "胡建新" 1
1996 "丁宗保" "龚书敏" 1
1993 "丁宗鎏" "宗磊" 1
1993 "丁宗鎏" "徐惠勇" 1
1994 "丁宗鎏" "杨立平" 5
1995 "丁宗鎏" "熊丽萍" 3
1993 "丁宗鎏" "牟磊" 1
2009 "丁建辉" "马波涛" 1
2005 "丁建飞" "梁青民" 1
2005 "丁建飞" "王玉才" 1
2011 "丁彭凯" "冯万奇" 1
2012 "丁彭凯" "冯万奇" 1
2013 "丁彭凯" "冯万奇" 1
2014 "丁彭凯" "冯万奇" 1
2015 "丁彭凯" "冯万奇" 1
2014 "丁彭凯" "刘海山" 1
2017 "丁彭凯" "杨贵鹏" 1
2010 "丁志增" "曹忠志" 1
2016 "丁志增" "赵鉴" 1
2017 "丁志增" "赵鉴" 1
end
[/CODE]
谢谢黄老师您的回复!我想得到一列,就是以“m”“n”一样作为一个类别计算,比如 "丁伟萍" "谢军",其对应产生的新的一列,2010是0,表示之前没有一起过,2011是1,因为之前2010出现了一次,2012是2,即2010和2011的累加。 也就是计算新的列,是m,n一样下每年度的值是该类别下年度的逐渐累加,frequency表示该年出现频率。再次感谢