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

fixed typos

parent 46cdc562
No related branches found
No related tags found
No related merge requests found
...@@ -131,19 +131,6 @@ egen Allcons2012_dec = cut(Allcons2012), group(10) ...@@ -131,19 +131,6 @@ egen Allcons2012_dec = cut(Allcons2012), group(10)
gen ba_imd = IMD_ENG gen ba_imd = IMD_ENG
replace ba_imd = IMD_WALES if ba_imd == . replace ba_imd = IMD_WALES if ba_imd == .
* must use as category variables!!
* set unkown to be 10 -> adds to end of contrasts so can see effect
replace LOFT_DEPTH = 10 if LOFT_DEPTH == .
* set unkown to be 2020 -> adds to end of contrasts so can see effect
replace BOILER_YEAR = 2020 if BOILER_YEAR == .
replace CWI_YEAR = 2020 if CWI_YEAR == .
replace LI_YEAR = 2020 if LI_YEAR == .
* 0 = no
destring BOILER, force replace
replace BOILER = 0 if BOILER == .
* household level vars * household level vars
* for models * for models
local generic_hvars "i.BOILER_YEAR i.MAIN_HEAT_FUEL i.LI_YEAR i.LOFT_DEPTH i.FLOOR_AREA_BAND WALL_CONS i.CWI_YEAR i.PROP_TYPE i.PROP_AGE i.EE_BAND" local generic_hvars "i.BOILER_YEAR i.MAIN_HEAT_FUEL i.LI_YEAR i.LOFT_DEPTH i.FLOOR_AREA_BAND WALL_CONS i.CWI_YEAR i.PROP_TYPE i.PROP_AGE i.EE_BAND"
......
...@@ -137,13 +137,15 @@ foreach s of local sample { ...@@ -137,13 +137,15 @@ foreach s of local sample {
* turn '99' into missing - ideally missing should be -99 to aid re-coding and avoid unpleasant surprises in naive analysis! * turn '99' into missing - ideally missing should be -99 to aid re-coding and avoid unpleasant surprises in naive analysis!
* recode category vars into strings to avoid confusion & enable 'unknown' to be retained in models etc (might matter) * recode category vars into strings to avoid confusion & enable 'unknown' to be retained in models etc (might matter)
tostring LOFT_DEPTH FP_ENG LI_YEAR BOILER_YEAR CWI_YEAR, force replace
replace FP_ENG = "Unknown" if FP_ENG == "99" replace FP_ENG = -99 if FP_ENG == 99
replace LOFT_DEPTH = "Unknown" if LOFT_DEPTH == "99" replace LOFT_DEPTH = -99 if LOFT_DEPTH == 99
* comes in as missing? * comes in as missing?
replace LI_YEAR = "Unknown" if LI_YEAR == "." replace LI_YEAR = -99 if LI_YEAR == .
replace BOILER_YEAR = "Unknown" if BOILER_YEAR == "." replace BOILER_YEAR = -99 if BOILER_YEAR == .
replace CWI_YEAR = "Unknown" if CWI_YEAR == "." replace CWI_YEAR = -99 if CWI_YEAR == .
lab val
* what do G, L, M mean in the gas 'valid' variables - presumably 0 = off gas & V = valid? * what do G, L, M mean in the gas 'valid' variables - presumably 0 = off gas & V = valid?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment