Home » Data » Merging data files » Merging Women-Men-HIV Data: Different Countries, Different Years
Re: Merging Women-Men-HIV Data: Different Countries, Different Years [message #17046 is a reply to message #16992] |
Fri, 15 March 2019 08:26 |
Bridgette-DHS
Messages: 3214 Registered: February 2013
|
Senior Member |
|
|
Following is another response from Senior DHS Stata Specialist, Tom Pullum:
You are welcome.
Sorry for the double "=" sign. I should have said "gen sex=2". The reason for putting that variable ("sex") into the appended IR+MR file is that you will want to change the "mv" variables in the MR file to "v" variables, but once you do that, you need a way to distinguish whether the case comes from the IR file or the MR file. The IR and MR files do not contain a variable that is explicitly the sex of the respondent. The coding I suggest is the same is for hv104, with 1 for males and 2 for females. At some point I would also put
label define sex 1 "male" 2 "female"
label values sex sex
As for numbering the surveys, you can do that however you want, but the most important thing is also to have a string label such as "survey_label" because the DHS files do not explicitly include such a label. You cannot rely on v000, for example, to identify the survey. It often happens that two successive surveys have the same value of v000. You can construct the label afterwards using the first two characters of v000, which are the country code, and the year(s) of fieldwork, v007, but I always insert the survey_label during the construction of the large file, rather than in a later step.
|
|
|
|
|
Merging Women-Men-HIV Data: Different Countries, Different Years
By: Yawo on Sun, 10 March 2019 17:24
|
|
|
Re: Merging Women-Men-HIV Data: Different Countries, Different Years
|
|
|
Re: Merging Women-Men-HIV Data: Different Countries, Different Years
By: Yawo on Thu, 14 March 2019 20:37
|
|
|
Re: Merging Women-Men-HIV Data: Different Countries, Different Years
|
|
|
Re: Merging Women-Men-HIV Data: Different Countries, Different Years
By: Yawo on Sat, 16 March 2019 14:09
|
|
|
Re: Merging Women-Men-HIV Data: Different Countries, Different Years
By: Yawo on Mon, 18 March 2019 10:08
|
|
|
Re: Merging Women-Men-HIV Data: Different Countries, Different Years
|
Goto Forum:
Current Time: Wed Dec 18 17:42:45 Coordinated Universal Time 2024
|