The DHS Program User Forum - RDF feed
https://userforum.dhsprogram.com/index.php
Identifying siblings of a child that are below 1 years of age (R)
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=24842&th=11864#msg_24842
I am in need of help with the following:
I require to (I) identify siblings that are (II) below 1 years of age, for each child (row). The constructed variable should indicate per child how many siblings below 1 year of age he/she has (0,1,2,3,etc).
What procedure/operations will work? (R script)
Thank you so much!
/N
]]>Nidigot2022-07-19T12:33:10-00:00Re: Identifying siblings of a child that are below 1 years of age (R)
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=24862&th=11864#msg_24862
Please do not post the same question twice--but maybe you thought the first time didn't work?
You are talking about pairs of siblings. One of them should be below age 1. What about the other one? Or should they both be below age 1? What do you mean by "0,1,2,3..."? Hardly any children age 0 have a sibling age 0, and almost all pairs of children in which BOTH are age 0 will be twins. I don't think any surveys will have enough pairs of twins age 0 for any statistical analysis. Or are you talking about a reference child of any age, paired with a sibling age 0?
We can provide Stata code to construct sibships or pairs of siblings, where siblings are defined to be children with the same mother (not necessarily the same father). Is Stata the programming language you are using? ]]>Janet-DHS2022-07-21T16:29:31-00:00Re: Identifying siblings of a child that are below 1 years of age (R)
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=24867&th=11864#msg_24867
I am new here and didn't see the duplicate post after submitting. Perhaps the time had elapsed as I also got logged out.
Let me give the clarifications you're after: I would like to obtain a column/variable that indicates for that child how many siblings it has that are less than or equal to one year of age.
Let me know if I need to be any clearer,
Thank you for your help]]>Nidigot2022-07-22T09:01:33-00:00Re: Identifying siblings of a child that are below 1 years of age (R)
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=24908&th=11864#msg_24908
Usually we at DHS would not answer a question like this, but I have always been interested in kinship and decided to work on it.
You did not say what survey you are using. I will use the Bangladesh 2017-18 survey (BD7R) to illustrate.
Two children are siblings if they have the same mother. I will re-state your question to be as follows: "For a child age A or less, how many YOUNGER siblings do they have who are age B or less." You described this with B=0 but I am generalizing. In my example, A is 17 and B is 0, 1, 2, 3, or 4. I assume the question is about living children and siblings but that could be changed.
Usually two children the same age will be twins, but I allow for that. You have to be sure not to count a child as its own sibling. The ages of living children are b8. You have to store a temporary file.
Open the BR file (BDBR7RFL.dta) in Stata. Enter the lines pasted below. Good luck.
cd e:\DHS\DHS_data\scratch
use "C:\Users\26216\ICF\Analysis - Shared Resources\Data\DHSdata\BDBR7RFL.DTA" , clear
keep if b5==1
keep v001 v002 v003 bidx b8
forvalues li=0/4{
gen nsibs_age_le_`li'=0
}
sort v001 v002 v003
save index_children.dta, replace
drop nsibs*
rename bidx bidx_sib
rename b8 b8_sib
sort v001 v002 v003
joinby v001 v002 v003 using index_children.dta
forvalues li=0/4{
replace nsibs_age_le_`li'=nsibs_age_le_`li'+1 if bidx_sib<bidx & b8_sib<=`li'
}
forvalues li=0/4{
tab b8 nsibs_age_le_`li' if b8<=17
}
]]>Janet-DHS2022-08-01T16:25:32-00:00Re: Identifying siblings of a child that are below 1 years of age (R)
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=25177&th=11864#msg_25177
Nidigot2022-09-09T16:59:44-00:00