Merging KR and PR files [message #28006] |
Wed, 01 November 2023 12:09 |
sokiya
Messages: 79 Registered: May 2017 Location: Nairobi
|
Senior Member |
|
|
I am trying to merge the KR file with the PR file using the codes below
use "KEKR8AFL.DTA", clear
drop if b16 == .
duplicates tag v001 v002 b16, gen(dup)
drop if dup!=0
ren (v001 v002 b16) (hv001 hv002 hvidx)
merge 1:1 hv001 hv002 hvidx using "KEPR8AFL.dta"
However, a few issues arise
a) b16 is missing in some case
b) KR file has some duplicates cases in v001 v002 b16
Any help will be greatly appreciated.
Thanks in advance
|
|
|