The DHS Program User Forum - RDF feed
https://userforum.dhsprogram.com/index.php
merge CR file with IR
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=23823&th=11424#msg_23823
Tedy2021-12-09T04:03:12-00:00Re: merge CR file with IR
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=23824&th=11424#msg_23824
For additional information on merging, please see the examples in the Guide to DHS Statistics - search for "Matching and Merging Datasets". Also, please see the following page for more information on merging: https://dhsprogram.com/data/Merging-Datasets.cfm
]]>Bridgette-DHS2021-12-09T20:39:11-00:00Re: merge CR file with IR
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=23826&th=11424#msg_23826
Tedy2021-12-10T11:59:11-00:00Re: merge CR file with IR
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=23827&th=11424#msg_23827
With this merge, it will make no difference whether you start with the IR file as the "master" file and the CR file as the "using" file, or the other way around. The only difference will be that if you do it one way, "_merge" will be coded 1 for the IR cases that are not in the CR file, and if you do it the other way, those cases will be coded 2. But that's automatic and Stata will tell you. (For this merge, there will be NO cases that are in the CR file and not in the IR file.)
I usually take the larger file as the "master" and the smaller file as the "using" but I'm not consistent about that because it really only makes a difference if your program does something next based on _merge being 1 or 2.
As a general rule, when you have to choose between doing A or B with Stata, I'd just try both, see if they "work", and then see if they give different results.
]]>Bridgette-DHS2021-12-10T12:51:03-00:00Re: merge CR file with IR
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=23828&th=11424#msg_23828
Tedy2021-12-10T14:08:37-00:00Re: merge CR file with IR
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=23829&th=11424#msg_23829
Following is another response from DHS Research & Data Analysis Director, Tom Pullum:
The IR file should include hw70_1 through hw70_6, which are the height-for-age z scores for the woman's children under 5. Similarly for 71 and 72, which are the weight-for-age and weight-for-height scores. You would keep them in the IR file for the merge, and then keep if _merge==3 to restrict to mothers who are in both the IR file and the CR file. If you want one line for each child under 5, you can then "reshape long". I don't understand why you would want to analyze the z scores for children using the CR file, but it can be done.
]]>Bridgette-DHS2021-12-10T15:36:51-00:00Re: merge CR file with IR
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=23834&th=11424#msg_23834
Tedy2021-12-11T19:38:53-00:00Re: merge CR file with IR
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=23841&th=11424#msg_23841
Following is another response from DHS Research & Data Analysis Director, Tom Pullum:
In the PR file, the line numbers of the parents (if living with the child) are given by hv112 (for the mother) and hv114 (for the father). You do not know for sure that the male partner of the mother in the couples file is the father. Also the CR file will not contain all mothers and fathers who are living in the same household as the child.