Skip to content
Snippets Groups Projects
Commit ff07a0b6 authored by Ben Anderson's avatar Ben Anderson
Browse files

added calculation of income deciles & quartiles within each year

parent b6ac0bb6
No related branches found
No related tags found
No related merge requests found
...@@ -75,7 +75,7 @@ local mergeyears = "2002-2003 2003-2004 2004-2005 2005-2006 2006 2007 2008 2009 ...@@ -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 * 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) * 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 * needed for income equivalisation later
local dvhh_keepvars = "`dvhh_keepvars' incanon weight* a055 g018 g019 p116* p344* p389*" local dvhh_keepvars = "`dvhh_keepvars' incanon weight* a055 g018 g019 p116* p344* p389*"
...@@ -357,23 +357,31 @@ if `do_extracts' { ...@@ -357,23 +357,31 @@ if `do_extracts' {
gen ba_adults = g018 if g018 > 0 gen ba_adults = g018 if g018 > 0
* ignore hhs with no adults (how many are there?) * 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)" /* 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 (!) * 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" { capture nosily : renpfix p344p p344
capture nosily : renpfix p389 p389
gen equiv_p344 = p344/oecd_equivbhcwt gen equiv_p344 = p344/oecd_equivbhcwt
gen equiv_p389bhc = p389/oecd_equivbhcwt gen equiv_p389bhc = p389/oecd_equivbhcwt
gen equiv_p389ahc = (p389-p116t)/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
}
lab var equiv_p344 "Equivalised normal gross household income (OECD)" 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_p389bhc "Equivalised normal disposable (net) household income (BHC, OECD)"
lab var equiv_p389ahc "Equivalised normal disposable (net) household income (AHC, 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 * quarter labels changed in 2006
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment