diff --git a/ONS-UK-EFS-time-series-extract.do b/ONS-UK-EFS-time-series-extract.do index 65578daf8c5992bbab551dbe73611da189b83ef4..5795e9a7d9a510f106d66fdb4de0cb9a4d4893a6 100755 --- a/ONS-UK-EFS-time-series-extract.do +++ b/ONS-UK-EFS-time-series-extract.do @@ -75,7 +75,7 @@ local mergeyears = "2002-2003 2003-2004 2004-2005 2005-2006 2006 2007 2008 2009 * be sure to keep only these from the dv hh file - these will be 'kept' after the var names have been reduced to lower case * DEMAND 2.3 (older people mobile lives) -local dvhh_keepvars = "b480 b481 c96111* c96112* cc5413* c73311* c73312*" +local dvhh_keepvars = "b480 b481 b485 c96111* c96112* cc5413* c73311* c73312*" * needed for income equivalisation later local dvhh_keepvars = "`dvhh_keepvars' incanon weight* a055 g018 g019 p116* p344* p389*" @@ -357,24 +357,32 @@ if `do_extracts' { gen ba_adults = g018 if g018 > 0 * ignore hhs with no adults (how many are there?) - /* 1st adult = .67 spouse = .33 other 2nd adult = .33 3rd adult = .33 subsequent adults = .33 children aged < 14 = .2 children aged 14+ = .33 */ * catch hh with no children replace ba_under14 = 0 if ba_under14 == . replace ba_over14 = 0 if ba_over14 == . gen oecd_equivbhcwt = 0.67 if ba_adults >= 1 replace oecd_equivbhcwt = oecd_equivbhcwt + ((ba_adults-1) * 0.33) + (ba_under14 * 0.2) + (ba_over14 * 0.33) di "Calculating equiv income (OECD)" - * p344 & p389 changed to *p after 2006 and top coded (!) - if "`y'" == "2001-2002" | "`y'" == "2002-2003" | "`y'" == "2003-2004" | "`y'" == "2004-2005" | "`y'" == "2005-2006" | "`y'" == "2006" { - gen equiv_p344 = p344/oecd_equivbhcwt - gen equiv_p389bhc = p389/oecd_equivbhcwt - gen equiv_p389ahc = (p389-p116t)/oecd_equivbhcwt - } - else { - gen equiv_p344 = p344p/oecd_equivbhcwt - gen equiv_p389bhc = p389p/oecd_equivbhcwt - gen equiv_p389ahc = (p389p-p116t)/oecd_equivbhcwt + /* 1st adult = .67 spouse = .33 other 2nd adult = .33 3rd adult = .33 subsequent adults = .33 children aged < 14 = .2 children aged 14+ = .33 */ * catch hh with no children replace ba_under14 = 0 if ba_under14 == . replace ba_over14 = 0 if ba_over14 == . gen oecd_equivbhcwt = 0.67 if ba_adults >= 1 replace oecd_equivbhcwt = oecd_equivbhcwt + ((ba_adults-1) * 0.33) + (ba_under14 * 0.2) + (ba_over14 * 0.33) di "Calculating equiv income (OECD) and quartiles/deciles" + + local incanonl "anonymised hhold inc + allowances" - } + * p344 & p389 changed to *p after 2006 and top coded (!) + capture nosily : renpfix p344p p344 + capture nosily : renpfix p389 p389 + + gen equiv_p344 = p344/oecd_equivbhcwt + gen equiv_p389bhc = p389/oecd_equivbhcwt + gen equiv_p389ahc = (p389-p116t)/oecd_equivbhcwt lab var equiv_p344 "Equivalised normal gross household income (OECD)" lab var equiv_p389bhc "Equivalised normal disposable (net) household income (BHC, OECD)" lab var equiv_p389ahc "Equivalised normal disposable (net) household income (AHC, OECD)" - + local incomes "incanon p344 p389" + local incanonl "anonymised hhold inc + allowances" + local p344l "gross normal weekly household income" + local p389l "normal weekly disposable hhld income" + foreach i of local incomes { + egen `i'_dec = cut(`i'), group(10) + lab var `i'_dec "Deciles: ``i'l'" + egen `i'_quart = cut(`i'), group(4) + lab var `i'_quart "Quartiles: ``i'l'" + } + * quarter labels changed in 2006 * old: