Understanding Society User Support: Issueshttps://iserredex.essex.ac.uk/support/https://iserredex.essex.ac.uk/support/support/favicon.ico?15995719382021-01-06T13:28:57ZUnderstanding Society User Support
Redmine Understanding Society User Support - Support #1476 (Resolved): Calculating Equivalised Income Dec...https://iserredex.essex.ac.uk/support/issues/14762021-01-06T13:28:57ZHenry Parkesh.parkes@ippr.org
<p>Dear USOC User Team, <br />I've written some code which seeks to work out people's equivalised household income decile after housing costs, and am then looking at the tenure amongst the deciles.</p>
<p>In my analysis - around 60% of the top decile seem to own their property own outright - compared to just 38% in HBAI (using Stat Xplore) - I know they won't perfectly align but this feels like quite a big difference. This has made me doubt my approach to assigning deciles</p>
<p>Please see the code below in STATA, doing the calculations to work out the HH decile (adapting from the code in the USOC moodle tutorial), which I then match on to indresp using the household identifier.</p>
<p>use "E:\ippr\datasets\UKHLS\stata13_se\ukhls_w10/j_hhresp.dta", clear</p>
<p>//Create equivalisation factors for after housing costs: 0.58 for first adult and 0.42 for subsequent adults. 0.4 for children 14+ and 0.2 for children <14<br />gen j_adults = j_npensioner + j_nwage_dv<br />gen j_14pluschildren = j_nkids_dv - j_nchoecd_dv</p>
<p>//j_adults: number of adults. j_14pluschildren: number of children 14+. j_nchoecd_dv: number of children 0-13</p>
<p>gen j_ahc_equivalisation = 0.58 + ((j_adults - 1)*0.42) + (0.4 * j_14pluschildren) + (0.2 * j_nchoecd_dv) <br />replace j_ahc_equivalisation = . if j_adults == 0 //Get rid of cases where household contains no adults...</p>
<p>//Generate equivalised household income variables<br />gen j_ehhnetinc1_ahc = (j_fihhmnnet1_dv - j_houscost1_dv)/j_ahc_equivalisation <br />lab var j_ehhnetinc1_ahc "equivalised net HH income after housing costs"</p>
<p>rename j_nchoecd_dv j_under14<br />rename j_14pluschildren j_over14</p>
<p>//Create equivalised income decile variables: <br />_pctile j_ehhnetinc1_ahc [aw = j_hhdenub_xw], nquantiles(100)<br />return list</p>
<p>global j_p10 = r(r10)<br />global j_p20 = r(r20)<br />global j_p30 = r(r30)<br />global j_p40 = r(r40)<br />global j_p50 = r(r50)<br />global j_p60 = r(r60)<br />global j_p70 = r(r70)<br />global j_p80 = r(r80)<br />global j_p90 = r(r90)</p>
<p>gen j_decile = .<br />replace j_decile = 1 if j_ehhnetinc1_ahc < j_p10 & j_ehhnetinc1_ahc<. <br />replace j_decile = 2 if j_ehhnetinc1_ahc >= j_p10 & j_ehhnetinc1_ahc < j_p20 & j_ehhnetinc1_ahc<. <br />replace j_decile = 3 if j_ehhnetinc1_ahc >= j_p20 & j_ehhnetinc1_ahc < j_p30 & j_ehhnetinc1_ahc<. <br />replace j_decile = 4 if j_ehhnetinc1_ahc >= j_p30 & j_ehhnetinc1_ahc < j_p40 & j_ehhnetinc1_ahc<. <br />replace j_decile = 5 if j_ehhnetinc1_ahc >= j_p40 & j_ehhnetinc1_ahc < j_p50 & j_ehhnetinc1_ahc<. <br />replace j_decile = 6 if j_ehhnetinc1_ahc >= j_p50 & j_ehhnetinc1_ahc < j_p60 & j_ehhnetinc1_ahc<. <br />replace j_decile = 7 if j_ehhnetinc1_ahc >= j_p60 & j_ehhnetinc1_ahc < j_p70 & j_ehhnetinc1_ahc<. <br />replace j_decile = 8 if j_ehhnetinc1_ahc >= j_p70 & j_ehhnetinc1_ahc < j_p80 & j_ehhnetinc1_ahc<. <br />replace j_decile = 9 if j_ehhnetinc1_ahc >= j_p80 & j_ehhnetinc1_ahc < j_p90 & j_ehhnetinc1_ahc<. <br />replace j_decile = 10 if j_ehhnetinc1_ahc >= j_p90 & j_ehhnetinc1_ahc<.</p>
<p>lab var j_decile "equivalised income decile (AHC)"</p>
<p>keep j_pov_ahc j_hhdenub_xw j_hidp j_fihhmnnet1_dv j_houscost1_dv j_decile j_tenure_dv<br />save j_pov_ahc, replace<br />}</p>
<p>Thanks for any help/advice you can offer!<br />Henry</p>