Need Help [message #8527] |
Mon, 09 November 2015 04:33 |
|
I am trying to work with PDHS 2012-2013.
I am working with PKIR FILE, I want to create a variable of current child whose under 5 years of age. for which i am using variables v137(no of children under 5 years) and BORD$1(order of child).
I am confused how to generate this variable that tells me that the child is current and under 5 years of age.
I will be very thankful if any 1 can help me.
Thank you.
|
|
|
Re: Need Help [message #8539 is a reply to message #8527] |
Wed, 11 November 2015 17:21 |
|
user-rhs
Messages: 132 Registered: December 2013
|
Senior Member |
|
|
The variable for child's age is b8_i, where i corresponds to the child's entry number in the birth index (bidx), which is the reverse of birth order (bord). I'm not sure what you mean by "current child," and I'll assume here that you mean to say the child is currently alive. The variable for vital status is b5_i.
There are a number of ways to generate the variable "is currently alive and under 5 years old" If the data are in wide format, (e.g. if you have b8_1, b8_2, b8_3,..., b8_n and b5_1, b5_2,...b5_n in the dataset), it is probably easiest for you to reshape it to long (use mum's identifier as the "grouping" variable, the statistical package should automatically generate the child's line number within the grouping variable based on the number after _ in the variable name). Then use if-then statements to generate the alive and under 5 variable.
In Stata, it would look something like (untested code):
reshape long b5_ b8_,i(caseid) j(j)
gen alivelt5=(b5_==1 & b8_<5)
label var alivelt5 "Child is alive and less than 5 years of age"
Another alternative is to leave the data as wide and use a loop to create the alivelt5 variable before reshaping to long (if you plan to analyze the data at the child level), for example (untested code):
*supposing the max # of entries in the birth register was 12, so you have b5_1, b5_2,...b5_12
foreach x of numlist 1/12{
gen alivelt5_`x' =(b5_`x'==1 & b8_`x' <5)
label var alivelt5_`x' "Child is alive and less than 5 years of age"
}
This will produce 12 variables (alivelt5_1, alivelt5_2,..., alivelt5_12). Your next steps depend on your research question. You can sum up all the alivelt5_ variables if you want to do the analysis at the mother level to see how many living children under 5 she has, or you can reshape to long if you want to analyze the data at the individual child level.
hth,
rhs
[Updated on: Wed, 11 November 2015 18:15] Report message to a moderator
|
|
|
Re: Need Help [message #8547 is a reply to message #8539] |
Thu, 12 November 2015 09:49 |
Bridgette-DHS
Messages: 3190 Registered: February 2013
|
Senior Member |
|
|
Following is a response from Senior DHS Stata Specialist, Tom Pullum:
I recommend that you work from the KR file, that is, the PKKR file. If you don't have it, you should download it from DHS. It has one record for each child under five. The youngest child will be given by bidx=1 (or hidx=1). bord gives the birth order of the child, beginning with the woman's first birth, for which bord=1. In the KR file, the mother's variables are attached to each child, so you lose nothing by working with the KR file rather than the IR file.
I don't know what you mean by "current" child. If you want just children who are currently alive, they will be the children with b5=1.
|
|
|
Re: Need Help [message #8566 is a reply to message #8539] |
Tue, 17 November 2015 00:17 |
|
I am Extremely thankful for the prompt reply.
user-rhs: With the current child I meant the Last child born to the mother who is currently under 5 years of age.
Bridgette-DHS: But the PDHS Report 2013 gives information about 13,558 mothers and their child, using KR file will reduce the number.Also if you can give further information about this data set.I will try to cross check the numbers from the report using this data set too.
Will be very thankful to you all.
|
|
|
|
|
Re: Need Help [message #8578 is a reply to message #8575] |
Wed, 18 November 2015 00:27 |
|
Thank you for your valuable time and suggestions. Will make my data and will need you assurance if I m doing it right.
|
|
|
Re: Need Help [message #8835 is a reply to message #8575] |
Wed, 30 December 2015 03:23 |
|
Thank you for helping to sort the youngest child/last child born to the respondent.
If now I want to see if the last child is under 5 years of age, which variable I can use to sort the age of the child, I cannot find any variable that tells the age of the child in Pakistan Demographic Health Survey.
I will be very thankful to you for guiding me.
|
|
|
Re: Need Help [message #8842 is a reply to message #8835] |
Wed, 30 December 2015 15:40 |
Reduced-For(u)m
Messages: 292 Registered: March 2013
|
Senior Member |
|
|
Sumera,
Use the DHS recode manual: http://www.dhsprogram.com/pubs/pdf/DHSG4/Recode6_DHS_22March 2013_DHSG4.pdf
There are several options for age. HW1 is age in months for those who were measured for Height/Weight, but if you were measured for H/W, then you were under-5. So one option is to just use the child recode as that is 1 observation per child under 5.
You can also use the birthdate information to calculate the ages of children - see the recode manual for the birth-date and interview-date variables.
Once you have age, you can just generate a variable for "under 5" by using:
gen u5 = 0
replace u5 = 1 if age_in_months<60
Obviously you could generate or use an "age_in_years" variable too if you prefer. But all the information you need is in the recode manual - just search for "age" and you'll find what you want. The "HW" and "B" variables (variables starting with those letters) are a good place to start.
|
|
|