The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Geographic Data » merging IR with GPS data (v001 no unique identifier)
merging IR with GPS data [message #27542] Thu, 31 August 2023 11:16 Go to previous message
christina_pafu is currently offline  christina_pafu
Messages: 1
Registered: August 2023
Member
Dear DHS experts,

I am working with the Philippine DHS survey rounds 2008, 2013, 2017 and 2022 to analyze the impact of a program at the barangay level (smallest administrative level in the Philippines) via a difference in difference model.

Unfortunately, there is no GPS data available for the year 2013. Therefore I would like to ask for any further information regarding the geographic data. I am especially interested in the barangy names matching the numeric variable sbarang obtaining values ranging from 1 to 254 which seems to be a DHS intern code.

In order to obtain the necessary geographic information for the other survey rounds, I already performed a spatial join using the GPS data and the barangay shapefiles within QGIS to determine the administrative area for each cluster. Now I would like to merge the DHS women data with this resulting shapefile using the following code in STATA (example using PHIR52FL.dta and PHGE52FL):

shp2dta using "PHGE52FL_join.shp", database(PHGE52FL_join.dta) coordinates(PHGE52FLcoord)

use PHGE52FL_join.dta, clear
rename DHSCLUST v001
sort v001
save PHGE52FL_join.dta, replace


use PHIR52FL.dta, clear
sort v001
save PHIR52FL.dta, replace

merge 1:m v001 using PHGE52FL_join.dta
drop _merge
save 2008.dta, replace

However, after trying to merge these dataset I get the following error: "variable v001 does not uniquely identify observations in the master data"
Actually, this makes sense to me because there may be more than one woman in each cluster. Nevertheless, I can't merge the two datasets by the unique women identifiers v001 v002 and v003 in combination because the latter two aren't in the GPS dataset. So to my understanding it's only possible to merge these datasets by v001, the only variable that is part of both datasets. However, I fail to do so with my code from above.

Could anyone please help me to solve this issue?
Thanks a lot in advance!

Best regards,
Christina
 
Read Message
Read Message
Previous Topic: Cluster ID
Next Topic: How to use GPS data
Goto Forum:
  


Current Time: Thu Nov 28 14:44:36 Coordinated Universal Time 2024