The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Merging DHS data in Stata
Re: Merging DHS data in Stata [message #9719 is a reply to message #8388] Tue, 10 May 2016 10:01 Go to previous messageGo to previous message
mianrashid is currently offline  mianrashid
Messages: 13
Registered: February 2016
Location: Pau, France
Member
I tried to merge the file of PR and IR, by following,
use "C:\Users\Rashid Javed\Desktop\DHS Data Set\Pakistan\Stata_PK_2012-13_DHS_01052016_926_87403\6_House hold Member Recode_pkpr61
> dt\PKPR61FL.DTA", clear

rename hv001 v001

. rename hv002 v002

. gen in_PR=1

. sort v001 v002

save "C:\Users\Rashid Javed\Desktop\temp.dta

use "C:\Users\Rashid Javed\Desktop\DHS Data Set\Pakistan\Stata_PK_2012-13_DHS_01052016_926_87403\3_Indiv idual Recode_pkir61dt\PKI
> R61FL.DTA", clear

gen in_IR=1

. sort v001 v002

. merge v001 v002 using C:\Users\Rashid Javed\Desktop\temp.dta

After this finally received this error,

(note: you are using old merge syntax; see [D] merge for new syntax)
variables v001 v002 do not uniquely identify observations in the master data
file C:\Users\Rashid.dta not found
r(601);


MianRashid
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to match women to their husbands
Next Topic: Merging HR and PR Files
Goto Forum:
  


Current Time: Wed Dec 25 21:12:51 Coordinated Universal Time 2024