Skip to content

Commit 93ef1dd

Browse files
authored
Merge pull request #307 from centreformicrosimulation/bugfix/302-assign-random-variation-to-mcs-pcs-life-satisfaction-scores
Bugfix/302 assign random variation to mcs pcs life satisfaction scores
2 parents b0985be + baa6e9d commit 93ef1dd

25 files changed

Lines changed: 838 additions & 539 deletions

input/InitialPopulations/compile/01_prepare_UKHLS_pooled_data.do

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,12 @@ preserve
198198
* Generate UC benefit marker
199199
gen benefits_uc=(ficode==40)
200200
label var benefits_uc "Universal Credit indicator"
201+
gen benefits_lb=(ficode == 15 | ficode == 16 | ficode == 19 | ficode == 20 | ficode == 22 | ficode == 33)
202+
label var benefits_lb "Legacy Benefits indicator"
201203

202204

203-
keep hidp pidp swv benefits_uc
204-
collapse (max) benefits_uc, by(hidp swv)
205+
keep hidp pidp swv benefits_uc benefits_lb
206+
collapse (max) benefits_uc benefits_lb, by(hidp swv)
205207
compress
206208

207209
save "$dir_data/tmp_ucrcpt", replace

input/InitialPopulations/compile/02_create_UKHLS_variables.do

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,20 +352,43 @@ eststo predict_dhm: reg dhm c.dag i.dgn i.swv i.dhe, vce(robust) // Physical hea
352352
restore
353353
estimates restore predict_dhm
354354
predict dhm_prediction
355-
fre dhm_prediction
355+
// fre dhm_prediction
356356

357357
gen dhm_flag = missing(dhm)
358358
replace dhm = round(dhm_prediction) if missing(dhm)
359359
bys dhm_flag : sum dhm
360360

361+
/**************************Subjective well-being: GHQ 0-12 score *****************************/
362+
/*dhm_ghq scghq2_dv "DEMOGRAPHIC: Subjective wellbeing (GHQ): rescaled to 0-12, assumed to be continuous"
363+
This measure converts valid answers to 12 questions of the General Health Questionnaire (GHQ) to a
364+
single scale by recoding the values of individual variables of 1 and 2 to 0, and values of 3 and 4 to 1 before summing them.
365+
This produces a scale that ranges from 0 (indicating the least amount of distress) to 12 (indicating the greatest amount of distress).
366+
*/
367+
gen dhm_ghq = scghq2_dv
368+
replace dhm_ghq = . if scghq2_dv <0
369+
la var dhm_ghq "DEMOGRAPHIC: Subjective wellbeing (GHQ): 0-12 score"
370+
gen scghq2_dv_miss_flag = (scghq2_dv == .)
371+
361372

373+
preserve
374+
drop if dgn < 0 | dag<0 | dhe<0
375+
eststo predict_dhm_ghq: reg dhm_ghq c.dag i.dgn i.swv i.dhe, vce(robust) // Physical health has a big impact, so included as covariate.
376+
restore
377+
estimates restore predict_dhm_ghq
378+
predict dhm_ghq_prediction
379+
380+
gen dhm_ghq_flag = missing(dhm_ghq)
381+
replace dhm_ghq = round(dhm_ghq_prediction) if missing(dhm_ghq)
382+
bys dhm_ghq_flag : sum dhm_ghq
383+
384+
/* Alternative method of GHQ caseness - binary cutoff at scghq2_dv <4
362385
/**************************Subjective wellbeing (GHQ): Caseness ******************************
363386
0: not psychologically distressed, scghq2_dv < 4
364387
1: psychologically distressed, scghq2_dv >= 4
365388
This measure converts valid answers to 12 questions of the General Health Questionnaire (GHQ) to a single scale by recoding 1 and 2 values
366389
on individual variables to 0, and 3 and 4 values to 1, and then summing, giving a scale running from 0 (the least distressed) to 12
367390
(the most distressed). A binary indicator is then created, equal to 1 for values >= 4.*/
368-
fre scghq2_dv
391+
// fre scghq2_dv
369392
recode scghq2_dv (-9/-1 . = .)
370393
gen scghq2_dv_miss_flag = (scghq2_dv == .)
371394
@@ -451,12 +474,16 @@ replace dhe_pcssp=-9 if missing(dhe_pcssp) & idpartner>0
451474
//fre dhe_mcssp dhe_pcssp if idpartner>0
452475
453476
454-
/***************************** Life Satisfaction ***************************************************************************/
455-
/* Life satisfaction, self report. Continuous scale 0 to 7. */
477+
/***************************** Life Satisfaction 0-10 ****************************************************/
478+
/* Life satisfaction, self report. Continuous scale.
479+
UKHLS variable sclfsato records scores 1-7.
480+
Convert to 0-10 in line with ONS Life Satisfaction scale.
481+
*/
456482
457483
458484
gen dls = sclfsato
459485
replace dls = . if sclfsato < 0
486+
replace dls = (dls-1) * 10/6 // Change to 0-10 scale
460487
lab var dls "DEMOGRAPHIC: Life Satisfaction"
461488
// fre dls if dag>0 & dag<16
462489
@@ -1751,6 +1778,11 @@ gen econ_benefits_uc=econ_benefits
17511778
replace econ_benefits_uc=0 if benefits_uc==0
17521779
label var econ_benefits_uc "Household income includes UC benefits"
17531780
1781+
gen econ_benefits_lb=benefits_lb
1782+
replace econ_benefits_lb=0 if benefits_lb==.
1783+
replace econ_benefits_lb=0 if econ_benefits_uc==1
1784+
label var econ_benefits_lb "Household income includes Legacy Benefits"
1785+
17541786
17551787
/***************************** Financial Distress ***************************************************************************/
17561788
// This is a measure of subjective financial distress, corresponding to answering 4 or 5 to the question below:

input/InitialPopulations/compile/09_finalise_input_data.do

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ rename dhe_mcs healthMentalMcs
205205
rename dhe_pcs healthPhysicalPcs
206206
rename dhe_mcssp healthMentalPartnerMcs
207207
rename dhe_pcssp healthPhysicalPartnerPcs
208-
rename dls demLifeSatScore1to7
208+
rename dls demLifeSatScore0to10
209209
rename dot demEthnC4
210210
rename dot01 demEthnC6
211211
rename financial_distress yFinDstrssFlag

0 commit comments

Comments
 (0)