mother's age at last birth born in the past 2 years [message #16654] |
Tue, 12 February 2019 17:11 |
Nfadl
Messages: 7 Registered: February 2019
|
Member |
|
|
I am working on Egypt DHS 2014 (child file) using SAS. I need a guide on how to generate mother's age at last birth born in the past 2 years. Is the following code right? But I need it to be only for the last birth
** Last child in the last 2 years;
child_age=(V008-B3); * CHILD'S AGE IN MONTHS;
IF child_age < 24 then do; * ONLY CHILDREN AGED LESS THAN TWO YEARS OLD;
end;
** Mother age at birth;
agemoth = int( (B3-V011)/12 );
if 15 le agemoth lt 18 then mothagec=0; *<18;
else if 18 le agemoth lt 25 then mothagec=1; * 18-24;
else if 25 le agemoth lt 35 then mothagec=2; *25-34;
else if 35 le agemoth le 49 then mothagec=3; *>34;
else mothagec =.;
Also I need to generate birth interval of last birth born in the past 2 years using B11.
I really appreciate your help
|
|
|