Merging PR, IR and MR data for PHQ-9, GAD and BP [message #30912] |
Sat, 19 April 2025 18:36 |
asigdel
Messages: 2 Registered: April 2025
|
Member |
|
|
Hi,
I am trying to see the association between depression (measured by PHQ9) and Anxiety (measured by GAD) on BP. I noticed that BP has been measured in PR file and PHQ-9 and GAD has been measured in individual IR and MR file separately. I want to combine all three file and would like to see the association of depression and anxiety. I did the following steps
****using PR data set*****
use "/Users/anubista/Desktop/Playing data copy/NPPR82DT-HH Member recode/NPPR82FL.DTA"
****select required variables****
keep hvidx hv001 hv002 hv005 wbp9 wbp10 wbp13 wbp14 wbp16 wbp19 wbp22 wbp23 hb2 hb3 mbp9 mbp10 mbp13 mbp14 mbp16 mbp19 mbp22 mbp23 ha2 ha3
***save the PR file***
use "/Users/anubista/Desktop/Playing data copy/NPPR82DT-HH Member recode/NPPR82FL.DTA", replace
*****open MR file***
use "/Users/anubista/Desktop/MR_HHID.dta"
rename mv001 hv001
rename mv002 hv002
rename mv003 hvidx
sort hv001 hv002 hvidx
****select required variables*****
keep mv001 mv002 mv003 mv005 mv012 mv013 mv101 mv102 mv106 mv131 mv190 mv463aa mv463ab mmth19 mmth20 mmth21 mmth22 mmth24 mmth24 mv485b mv485a
******save the MR file*****
use "/Users/anubista/Desktop/MR_HHID.dta", replace
****Merging PR file to MR file****
use "/Users/anubista/Desktop/Playing data copy/NPPR82DT-HH Member recode/NPPR82FL.DTA", clear
sort hv001 hv002 hvidx
merge m:1 hv001 hv002 hvidx using "/Users/anubista/Desktop/MR_HHID.dta"
Data got merged but what I noticed after merging two dataset is that there is no observation for PHQ-9 and GAD score when individual have BP measurement and vice versa.
Please help me what wrong with my merging.
|
|
|