disertation 发表于 2014-12-12 15:50 
多谢!
经测试,duplicates tag id year,gen(count1) 的作用是给id和year 组合记录打上标识,并产生一个新变量count1,默认值是0, replace count1=count1+1 将count1的值由0变为1,browse if count1<=4,条件count1<=4永远成立,因为count1通过 replace count1=count1+1值变为了1,永远小于4,故条件没有特别意义,br if count1<=4等同于 browse.
如果想浏览count1==11或n(1<n<11)的数据,该如何实现呢? browse if count1==11 或br if count1==n,但关键是count1的值只等于1,无法随id和year组合值的增加而增加,该如何解决呢?