Birth order [message #30667] |
Thu, 16 January 2025 17:54 |
Varsha
Messages: 51 Registered: November 2020
|
Senior Member |
|
|
Hello,
Do we have to exclude the children who have died while calculating birth order?
I found the below codes on the forum, but these do not seem to exclude such children.
* birth order
* To match birth order in the tables, bord must be modified to include multiple births
gen border=.
forvalues ll=1/5 {
replace border=`ll' if (bord==`ll' & b0==0) | (bord==`ll'+1 & b0==2) | (bord==`ll'+2 & b0==3)
}
gen birth_order=1 if border==1
replace birth_order=2 if border>1
replace birth_order=3 if border>3
replace birth_order=4 if border>5
label variable birth_order "birth order"
label define birth_order 1 "1" 2 "2-3" 3 "4-5" 4 "6+"
label values birth_order birth_order
tab birth_order [iweight=wt]
drop border
In case we have to exclude them, how should we go about constructing the variable?
Thanks
[Updated on: Thu, 16 January 2025 17:55] Report message to a moderator
|
|
|
|
|