- 阅读权限
- 255
- 威望
- 0 级
- 论坛币
- 0 个
- 通用积分
- 470.8474
- 学术水平
- 41 点
- 热心指数
- 54 点
- 信用等级
- 36 点
- 经验
- 12190 点
- 帖子
- 509
- 精华
- 0
- 在线时间
- 1521 小时
- 注册时间
- 2010-3-10
- 最后登录
- 2024-5-29
|
- gen age = 2016 - a04_1 /// generate age
- /// drop hh without kids less than 6 yrs
- by hhcode: egen kid6 = min(age)
- gen ind_kid6 = kid6 < 6
- drop if ind_kid == 0
- drop ind_kid
- /* assume there is a gender variable in your dataset,
- gender = 0 for male and gender = 1 for female */
- gen female_ind = 1 if gender == 1 & inlist(a02, 4, 6) & age > 50
- replace female_ind = 0
- by hhcode: egen ind = max(female_ind)
- drop if ind == 0
- drop ind
- drop female_ind
- /* All the households in your sample: 1) have at least one female mother
- or grandmother over 50 years old, and 2) have at least one kid less than
- 6 years old. Households with grandmother less than 50 years are excluded. */
复制代码
|
-
总评分: 论坛币 + 30
查看全部评分
|