Project

General

Profile

Actions

Support #1863

open

coding health conditions

Added by Karen Arulsamy almost 2 years ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Questionnaire content
Start date:
02/23/2023
% Done:

100%


Description

Hi there,
I am analyzing data from Waves 7,9 and 11 of UKHLS and would like to create a variable to denote if someone has a health condition. I tried the following, assuming for now all the missing values are given a value of 0. However, the values for wave 11 are odd. This may be due to the changes in the questions on health conditions in Wave 10. Which variables should I use to adequately capture individuals who have a health condition across these waves? If this is not possible, then which variables can I use to capture individuals who ever had a health condition across these waves?

gen hcond_main = 0

replace hcond_main = 1 if hconds01 1 | hcondn1 1
replace hcond_main = 1 if hconds02 1 | hcondn2 1
replace hcond_main = 1 if hconds03 1 | hcondn3 1
replace hcond_main = 1 if hconds04 1 | hcondn4 1
replace hcond_main = 1 if hconds05 1 | hcondn5 1
replace hcond_main = 1 if hconds06 1 | hcondn6 1
replace hcond_main = 1 if hconds07 1 | hcondn7 1
replace hcond_main = 1 if hconds08 1 | hcondn8 1
replace hcond_main = 1 if hconds09 1 | hcondn9 1
replace hcond_main = 1 if hconds10 1 | hcondn10 1
replace hcond_main = 1 if hconds11 1 | hcondn11 1
replace hcond_main = 1 if hconds12 1 | hcondn12 1
replace hcond_main = 1 if hconds13 1 | hcondn13 1
replace hcond_main = 1 if hconds14 1 | hcondn14 1
replace hcond_main = 1 if hconds15 1 | hcondn15 1
replace hcond_main = 1 if hconds16 1 | hcondn16 1

by pidp (wave), sort: replace hcond_main = hcond_main[_n-1] if missing(hcond_main)
by pidp (wave), sort: replace hcond_main = hcond_main[_n+1] if missing(hcond_main)

Thanks in advance for your help.

Best wishes
Karen


Files

FAQ_HCOND_Changes_Waves_Table_20230214.xlsx (15.8 KB) FAQ_HCOND_Changes_Waves_Table_20230214.xlsx Understanding Society User Support Team, 02/23/2023 12:34 PM
FAQ_HCONDS_Changes_Waves_Description_20230214.pdf (172 KB) FAQ_HCONDS_Changes_Waves_Description_20230214.pdf Understanding Society User Support Team, 02/23/2023 12:34 PM
Actions

Also available in: Atom PDF