Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ben Anderson
DECC-data
Commits
27aac30a
Commit
27aac30a
authored
Mar 09, 2015
by
Ben Anderson
Browse files
fixed typos
parent
46cdc562
Changes
2
Hide whitespace changes
Inline
Side-by-side
NEED/analyse-NEED-EULF-2014-models-v2.0.do
View file @
27aac30a
...
...
@@ -131,19 +131,6 @@ egen Allcons2012_dec = cut(Allcons2012), group(10)
gen
ba_imd
=
IMD_ENG
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
* 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"
...
...
NEED/process-NEED-EULF-2014.do
View file @
27aac30a
...
...
@@ -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!
* 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
LOFT_DEPTH
=
"Unknown"
if
LOFT_DEPTH
==
"
99
"
replace
FP_ENG
=
-99
if
FP_ENG
==
99
replace
LOFT_DEPTH
=
-99
if
LOFT_DEPTH
==
99
* comes in as missing?
replace
LI_YEAR
=
"Unknown"
if
LI_YEAR
==
"."
replace
BOILER_YEAR
=
"Unknown"
if
BOILER_YEAR
==
"."
replace
CWI_YEAR
=
"Unknown"
if
CWI_YEAR
==
"."
replace
LI_YEAR
=
-99
if
LI_YEAR
==
.
replace
BOILER_YEAR
=
-99
if
BOILER_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?
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment