在微观数据中,我想统计每个家庭(变量为hhcode)中16岁(变量为age)以下人口的个数。用 by hhcode, sort: egen nyoung = count(age) if age<161命令,结果如下:
hhcode age nyoung
10590 22 .
10594 16 .
10595 29 .
10595 29 .
10595 5 3
10595 1 3
10595 1 3
怎么把没有满足条件的家庭中nyoung的数值设为0,同一个家庭中都为16岁以下的人口数。


雷达卡






京公网安备 11010802022788号







