stata:分类排序与求和

. bysort rep78: gen ab=_n

. order ab,after(rep78)

. bysort rep78: gen abb=sum(rep78)

. order abb,after(rep78)

 

posted @ 2023-03-13 20:59  myrj  阅读(508)  评论(0编辑  收藏  举报