lindawu204 发表于 2014-8-14 08:42 
谢谢你。这样是分成每个细块吧。那如果我要按照weight 分,比如30-40kg, 40-50kg, 50-60kg这样分割,怎 ...
一样的道理啊。先按你的要求分组,然后求total
gen weight_group=1 if weight>=30&weight<40
replace weight_group=2 if weight>=40&weight<50
replace weight_group=3 if weight>=50&weight<60
bys weight_group: egen total=total(score)