安徒生的事01 发表于 2021-2-8 14:23
by i s3,sort:egen cv=total(v)
by i,sort:egen tcv=total(v)
by s3,sort: egen iv=total(v)
by i,sort:egen tcv=total(v)
by s3,sort: egen iv=total(v)
egen tv=total(v)
gen rca=(cv/tcv)/(iv/tv)
by sj,sort:egen iiv=total(v)
gen w=cv/iiv
duplicates drop i s3 ,force
clear all
gen csi=rca*pppun
by s3,sort:egen tsi=total(csi)
gen e=w*tsi
by i sj,sort:egen te=total(e)
duplicates drop i sj,force修改了一下