The DHS Program User Forum      
Discussions regarding The DHS Program data and results
Home » Topics » Child Health » Merging Children and household Colombia 2010
Merging Children and household Colombia 2010 [message #11931] Wed, 08 March 2017 16:36 Go to next message
Nathalie is currently offline  Nathalie
Messages: 3
Registered: March 2017
Location: Montreal
Member
I am using Colombia 2010 DHS to analyse the association between the child health and the mother security system (variable SH38), household assets, maternal characteristics.
An important variable for me is Sh38 (health security system) in PR file
In want to know the health security system for the mother (and the children if possible)
I am merging BRfile and PRfile in STATA like this:
1) PRfile: rename hv001 v001, hv002 v002, rename hvidx v003; sort v001 v002 v003; save PR_using
2) BRfile: merge m:m v001 v002 v003 using PR_using
Is this correct?

[Updated on: Wed, 08 March 2017 16:44]

Report message to a moderator

Re: Merging Children and household Colombia 2010 [message #11934 is a reply to message #11931] Wed, 08 March 2017 19:59 Go to previous messageGo to next message
Liz-DHS
Messages: 942
Registered: February 2013
Senior Member
A response from data processing expert, Guillermo Rojas:
Quote:

This has to be done in several steps:

• Merge persons file (PR) to women file (IR) to get SH38 into woman's file
o PR: HV001, HV002, HIDX
o IR: V001, V002, V003
o Output to TEMP1
• Merge persons file (PR) to children file (BR) to get SH38 into child's file. Not all children are household members
o PR: HV001, HV002, HIDX
o BR: V001, V002, B16
o Output to TEMP2
• Merge mother's file to children file. One woman can have several children, but all children should have a mother
o TEMP1: V001, V002, V003
o TEMP2: V001, V002, V003
o Output to final file


Re: Merging Children and household Colombia 2010 [message #11955 is a reply to message #11934] Sun, 12 March 2017 23:38 Go to previous messageGo to next message
Nathalie is currently offline  Nathalie
Messages: 3
Registered: March 2017
Location: Montreal
Member
Thanks for your answer.
Following your suggestion, I did this:
Step 1
PR file : rename hv001 V001; rename hv002 V002; rename hivdx V003 ; sort V001 V002 V003; save PR_using2
IR file : rename v001 V001; Rename v002 V002 ; Rename v003 V003 ; Sort V001 V002 V003 ;
Merge m :1 V001 V002 V003 using PR_using2 ;(not matched from master 0; not matched from using 150938) Rename _merge merge1; Save TEMP_1
Step 2
BR file: rename v001 V001; rename v002 V002; rename b16 V003; sort V001 V002 V003
merge m :1 V001 V002 V003 using PR_using2 ; (not matched from master 23616; not matched from using 136676) ; Rename _merge merge2 ; save TEMP_2
Step 3
TEMP_2; Merge m:1 V001 V002 V003 using TEMP_1 (not matched from master 23616 ; not matched from using 0); Save Finalfile_2010

I have some questions:
1. Have I used the merge command correctly? Is it merge m:1 in the 3 steps?
2. In step 3: What does it mean 'not matched from master 23616'? It is the number of children without mother?
3. In the final file (2010_Finalfile) the variable sh38 (member of a health security system) is the children security system or the mother security system?
4. At the end of the merge in step 3 I have this output:
. merge m:1 V001 V002 V003 using TEMP_1
(label v013 already defined)
(label v014 already defined)
...
(label hv015 already defined)
(label _merge already defined)
Is this a problem? Or it is just that I had the same variables in the two files.
Thanks

[Updated on: Mon, 13 March 2017 00:19]

Report message to a moderator

Re: Merging Children and household Colombia 2010 [message #11995 is a reply to message #11931] Thu, 16 March 2017 15:24 Go to previous messageGo to next message
Nathalie is currently offline  Nathalie
Messages: 3
Registered: March 2017
Location: Montreal
Member
As I did for Colombian files 2010, I want to merge BR, PR, and IR files from Colombia 1995.
I am following the instructions that you gave me to 2010data.
My questions is: which variable should I us to merge BR and PR files 1995?
One of the variables that I used for 2010 data doesn't exist in 1995 (b16 Child's line number in household)
Thanks
Re: Merging Children and household Colombia 2010 [message #12013 is a reply to message #11995] Mon, 20 March 2017 09:51 Go to previous message
Liz-DHS
Messages: 942
Registered: February 2013
Senior Member
Dear User, The response from data processing expert, Guillermo Rojas:
Quote:

I don't know what software the user is using, but the merge she did for 2010 seems correct.
For 1995, as the user mentioned variable B16 doesn't exist in that phase, so there is no way to link children to household members. She can link women to persons, though following the same instructions.

Thanks,


Previous Topic: departments cote d'ivoire 94 DHS
Goto Forum:
  


Current Time: Thu Mar 30 18:37:04 Eastern Daylight Time 2017