Re: IR + MR or CR + IR [message #24798 is a reply to message #24794] |
Wed, 13 July 2022 08:58 ![Go to previous message Go to previous message](/theme/default/images/up.png) |
Janet-DHS
Messages: 938 Registered: April 2022
|
Senior Member |
|
|
Following is a response from DHS Research & Data Analysis Director, Tom Pullum:
You say this: "CR only contains couples, but I would also like to have single mothers or women whose husbands/partners are not in the dataset."
The IR file includes all women, so you seem to be looking for the women who are in the IR file but not in the CR file. You are using ID42, the Indonesia 2002-03 survey. Here is Stata code to identify such women (you need a location for a temporary CR file):
use v001 v002 v003 using"...IDCR42FL.DTA", clear
sort v001 v002 v003
save e:\DHS\DHS_data\scratch\IDCR42temp.dta, replace
use "...IDIR42FL.DTA", clear
sort v001 v002 v003
merge v001 v002 v003 using e:\DHS\DHS_data\scratch\IDCR42temp.dta
tab _merge
Here is the distribution of _merge:
_merge | Freq. Percent Cum.
------------+-----------------------------------
1 | 21,799 73.94 73.94
3 | 7,684 26.06 100.00
------------+-----------------------------------
Total | 29,483 100.00
The women you are looking for are those with _merge=1.
There aren't any duplicated women in this file but you could identify and drop duplicates with these lines:
sort v001 v002 v003
egen sequence=seq(), by(v001 v002 v003)
tab sequence
keep if sequence==1
drop sequence
You cannot "merge" the IR and MR files for any women and men other than the couples who identify each other with v034 and mv034* and are in the couples file. There is no other basis for matching women and men.
|
|
|