Project

General

Profile

Support #1806

Socioeconomic classification

Added by Neil Kaye 3 months ago. Updated 3 months ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Category:
-
Start date:
11/14/2022
% Done:

80%


Description

I am wondering if there is Stata syntax available to construct a socioeconomic status variable for each wave of the UKHLS?

I see the current jbnssec_dv variable is only applicable to respondents currently in a job (w_jbhas==1) or in work but not at their job currently (w_jbhas==2 & w_jboff==1). For new entrants to a wave, SES may be captured by w_jbnssec_dv if in work, or by w_jlnssec_dv if not in work but has previously worked. As far as I can see, there is no 'fed-forward' SES indicator for previous interviewees not currently in work.

This is what I am trying to derive - an SES indicator that captures a) current SES if in work or b) most recent SES if not currently in work, with a residual category for those who have never worked.

Many thanks

#1

Updated by Understanding Society User Support Team 3 months ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 80
  • Private changed from Yes to No

Hello,

To create this variable for those who were interviewed previously and currently not working, you will need to combine data from different waves. There are two ways to do this - in a wide format or in a long format. The Stata syntax for merging indresp data files in a wide and long format are here: https://www.understandingsociety.ac.uk/documentation/mainstage/syntax
Click on tab "UKHLS deposited syntax" and look for syntax files under the headers: "Merging individual files across waves into wide format" & "Merging individual files across waves into long format"

Hope this helps.

Best wishes,
Understanding Society User Support Team

#2

Updated by Neil Kaye 3 months ago

Hello - thanks for this, I'm sorry if I wasn't clear in my original post but I have merged waves of data together but it is from that point where I would appreciate assistance in creating the derived variable as described. I am posting my current (partial) syntax below - if you could give me some guidance on this, I would be very grateful.

***********
FOR WAVE 10

gen j_ses5=.
replace j_ses5=j_jbnssec5 if j_jbnssec5!=. & j_jbnssec5>0
replace j_ses5=i_jbnssec5 if j_ses5==. & i_jbnssec5!=. & i_jbnssec5>0
replace j_ses5=h_jbnssec5 if j_ses5==. & h_jbnssec5!=. & h_jbnssec5>0
replace j_ses5=g_jbnssec5 if j_ses5==. & g_jbnssec5!=. & g_jbnssec5>0
replace j_ses5=f_jbnssec5 if j_ses5==. & f_jbnssec5!=. & f_jbnssec5>0
replace j_ses5=e_jbnssec5 if j_ses5==. & e_jbnssec5!=. & e_jbnssec5>0
replace j_ses5=d_jbnssec5 if j_ses5==. & d_jbnssec5!=. & d_jbnssec5>0
replace j_ses5=c_jbnssec5 if j_ses5==. & c_jbnssec5!=. & c_jbnssec5>0
replace j_ses5=b_jbnssec5 if j_ses5==. & b_jbnssec5!=. & b_jbnssec5>0
replace j_ses5=a_jbnssec5 if j_ses5==. & a_jbnssec5!=. & a_jbnssec5>0

replace j_ses5=j_jlnssec5 if j_ses5==. & j_jlnssec5!=. & j_jlnssec5>0
replace j_ses5=i_jlnssec5 if j_ses5==. & i_jlnssec5!=. & i_jlnssec5>0
replace j_ses5=h_jlnssec5 if j_ses5==. & h_jlnssec5!=. & h_jlnssec5>0
replace j_ses5=g_jlnssec5 if j_ses5==. & g_jlnssec5!=. & g_jlnssec5>0
replace j_ses5=f_jlnssec5 if j_ses5==. & f_jlnssec5!=. & f_jlnssec5>0
replace j_ses5=e_jlnssec5 if j_ses5==. & e_jlnssec5!=. & e_jlnssec5>0
replace j_ses5=d_jlnssec5 if j_ses5==. & d_jlnssec5!=. & d_jlnssec5>0
replace j_ses5=c_jlnssec5 if j_ses5==. & c_jlnssec5!=. & c_jlnssec5>0
replace j_ses5=b_jlnssec5 if j_ses5==. & b_jlnssec5!=. & b_jlnssec5>0
replace j_ses5=a_jlnssec5 if j_ses5==. & a_jlnssec5!=. & a_jlnssec5>0

FOR WAVE 9
gen i_ses5=.
replace i_ses5=i_jbnssec5 if i_jbnssec5!=. & i_jbnssec5>0
replace i_ses5=h_jbnssec5 if i_ses5==. & h_jbnssec5!=. & h_jbnssec5>0
replace i_ses5=g_jbnssec5 if i_ses5==. & g_jbnssec5!=. & g_jbnssec5>0
replace i_ses5=f_jbnssec5 if i_ses5==. & f_jbnssec5!=. & f_jbnssec5>0
replace i_ses5=e_jbnssec5 if i_ses5==. & e_jbnssec5!=. & e_jbnssec5>0
replace i_ses5=d_jbnssec5 if i_ses5==. & d_jbnssec5!=. & d_jbnssec5>0
replace i_ses5=c_jbnssec5 if i_ses5==. & c_jbnssec5!=. & c_jbnssec5>0
replace i_ses5=b_jbnssec5 if i_ses5==. & b_jbnssec5!=. & b_jbnssec5>0
replace i_ses5=a_jbnssec5 if i_ses5==. & a_jbnssec5!=. & a_jbnssec5>0

replace i_ses5=i_jlnssec5 if i_ses5==. & i_jlnssec5!=. & i_jlnssec5>0
replace i_ses5=h_jlnssec5 if i_ses5==. & h_jlnssec5!=. & h_jlnssec5>0
replace i_ses5=g_jlnssec5 if i_ses5==. & g_jlnssec5!=. & g_jlnssec5>0
replace i_ses5=f_jlnssec5 if i_ses5==. & f_jlnssec5!=. & f_jlnssec5>0
replace i_ses5=e_jlnssec5 if i_ses5==. & e_jlnssec5!=. & e_jlnssec5>0
replace i_ses5=d_jlnssec5 if i_ses5==. & d_jlnssec5!=. & d_jlnssec5>0
replace i_ses5=c_jlnssec5 if i_ses5==. & c_jlnssec5!=. & c_jlnssec5>0
replace i_ses5=b_jlnssec5 if i_ses5==. & b_jlnssec5!=. & b_jlnssec5>0
replace i_ses5=a_jlnssec5 if i_ses5==. & a_jlnssec5!=. & a_jlnssec5>0

ETC.

Best wishes,
Neil

Understanding Society User Support Team wrote in #note-1:

Hello,

To create this variable for those who were interviewed previously and currently not working, you will need to combine data from different waves. There are two ways to do this - in a wide format or in a long format. The Stata syntax for merging indresp data files in a wide and long format are here: https://www.understandingsociety.ac.uk/documentation/mainstage/syntax
Click on tab "UKHLS deposited syntax" and look for syntax files under the headers: "Merging individual files across waves into wide format" & "Merging individual files across waves into long format"

Hope this helps.

Best wishes,
Understanding Society User Support Team

#3

Updated by Understanding Society User Support Team 3 months ago

Yes, but I would change the order and use jbnssec5_dv followed by jlnssec5_dv at each wave. Here is a compact version of the code for Wave 10

use pidp j_jbnssec5 j_jlnssec5 using j_indresp, clear
mvdecode _all, mv(-9/-1)
generat j_ses5=.
replace j_ses5=j_jbnssec5 if j_jbnssec5<. & j_jbnssec5>0
replace j_ses5=j_jlnssec5 if j_jlnssec5<. & j_jlnssec5>0 & j_ses5==.
keep pidp j_ses5 j_jbnssec5 j_jlnssec5
foreach w in i h g f e d c b a {
merge 1:1 pidp using `w'_indresp, ///
nogen keepus(`w'_jbnssec5 `w'_jlnssec5) keep(1 3)
mvdecode _all, mv(-9/-1)
replace j_ses5=`w'_jbnssec5 if `w'_jbnssec5<. & `w'_jbnssec5>0 & j_ses5==.
replace j_ses5=`w'_jlnssec5 if `w'_jlnssec5<. & `w'_jlnssec5>0 & j_ses5==.
}

As always, please check a few cases to make sure the code is working the way you expect it to.

Also available in: Atom PDF