The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » IR and NR files
IR and NR files [message #29306] Sun, 26 May 2024 11:33 Go to next message
Magashi is currently offline  Magashi
Messages: 8
Registered: February 2020
Member
Dear All,

I am having issues with the DHS dataset, particularly the IR and NR files for Tanzania. In the IR file, the timing of the first antenatal visit (months) is represented by several variables such as m13_1-m13_6. However, in the NR file, there is only one variable, m13, for the timing of the first antenatal visit. I find the variables in the IR file more relevant to use, but there is no detailed information explaining these variables in the IR file (this is just one example of many such variables in the two different files).

Could any of you provide clarification on how I can use the IR file variables, as it contains more relevant variables for my study than the NR file? Additionally, if anyone has any idea on how to merge the two files, I would appreciate it. The guide to DHS statistics does not provide an explanation on how to merge these files.

Thanks,
Magashi
Re: IR and NR files [message #29317 is a reply to message #29306] Wed, 29 May 2024 12:36 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3150
Registered: February 2013
Senior Member

Following is a response from Senior DHS Staff Member, Tom Pullum:

The IR file has one record for each woman, and it includes information about all her pregnancies. The subscripts _1 through _6 refer to up to 6 pregnancies in the past 36 months. The pregnancy with subscript _1 is the most recent.

The NR file has one record for each of these pregnancies, so the subscripts are not needed. Methodological Report #34 (https://www.dhsprogram.com/pubs/pdf/MR34/MR34.pdf) may help you to analyze the NR file, which is probably the file you should use.

Re: IR and NR files [message #29320 is a reply to message #29317] Thu, 30 May 2024 01:17 Go to previous messageGo to next message
Magashi is currently offline  Magashi
Messages: 8
Registered: February 2020
Member
Thank you for the clarification. I have one more question: why does the number of observations for m13_1 not match the number of observations in the NR file? I expected m13_1 in the IR file to have the same number of observations as m13 in the NR file. The NR file for the Tanzania 2022 DHS has 5,318 observations for m13, while the IR file has 5,214 observations for m13_1. Could you please explain this discrepancy? Thank you.
Re: IR and NR files [message #29326 is a reply to message #29320] Thu, 30 May 2024 10:22 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3150
Registered: February 2013
Senior Member

Following is a response from Senior DHS Staff Member, Tom Pullum:

I looked at the IR, KR, and NR files for this survey and I believe the difference you are seeing can be traced to the way children are indexed in those three files.

If you go to the NR file, and enter "tab m13 p32,m" you will see that the antenatal data are provided for live births and stillbirths, and not for miscarriages and induced abortions. In the NR file, the pregnancies are indexed by pidx. If you enter "tab m13 pidx,m" you will see that there are some NA values of m13 for each value of pidx, corresponding with those outcomes that were miscarriages or induced abortions.

The KR file, as in earlier surveys, is limited to live births, the outcomes with p32=1. The births are indexed with bidx. bidx and pidx do not match, because bidx skips over the pregnancies with p32=2, 3, or 4.

The IR file includes the p variables, with subscripts _01, _02, etc. It also includes the b variables, with subscripts _01, _02, etc., It includes the KR variables with subscripts _1, _2, etc. The KR and b indexes will match each other (that is _1 and _01 refer to the same live birth) but they will not correspond to the indexes for the p variables.

If you go to the IR file and enter "lookfor history" you will find many variables labeled "index to pregnancy history" or "index to birth history". You can use them to match specific births or pregnancies or KR variables. However, it will be much easier if you just use the NR and KR files. The NR file includes the KR variables. The NR file does not include the b variables, but the p variables are the same as the b variables, except more general.

Hope this helps.

Re: IR and NR files [message #29357 is a reply to message #29306] Wed, 05 June 2024 12:45 Go to previous messageGo to next message
Magashi is currently offline  Magashi
Messages: 8
Registered: February 2020
Member
Great suggestion and thank you. While the NR is more convenient and includes the birth outcomes (live birth, stillbirths, miscarriage, and abortion), the DHS surveys for 2015/16, 2010, and 2004/05 do not have NR files. Therefore, I will need to use the IR file. My concern is clarification on which variable to focus on, especially those with _01, _02, _1, _2, etc., for each respondent. Let me know if there is a way I can combine those variables with _01 or _1.
Re: IR and NR files [message #29362 is a reply to message #29357] Thu, 06 June 2024 10:18 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3150
Registered: February 2013
Senior Member

Following is a response from Senior DHS Staff Member, Tom Pullum:

For this purpose, you would use the KR file. It has one record for each child (each live birth in the birth history, whether or not the child is still alive). The index "bidx" is 1 for children with the _1 or _01 subscript, 2 for children with the _2 or _02 subscript, etc.

Previous Topic: merge IR MR AND PR
Next Topic: Codebook
Goto Forum:
  


Current Time: Fri Aug 30 05:35:17 Coordinated Universal Time 2024