diff --git a/ONS-UK-EFS-time-series-extract.do b/ONS-UK-EFS-time-series-extract.do index 445f4ecca071383d8dc2e3352198fc1b54545ca9..9b6b5c3daba097a90b027d82127217b22094663c 100755 --- a/ONS-UK-EFS-time-series-extract.do +++ b/ONS-UK-EFS-time-series-extract.do @@ -68,13 +68,17 @@ local years "2001-2012" // just a label local all_years "2001-2002 2002-2003 2003-2004 2004-2005 2005-2006 2006 2007 2008 2009 2010 2011 2012" // years to process local do_years = "2001-2002 2002-2003 2003-2004 2004-2005 2005-2006 2006 2007 2008 2009 2010 2011 2012" * set to 1 to refresh each yearly extract you listed in do_years -local do_extracts 0 +local do_extracts 1 * drop the first survey for the merge as it is loaded first local mergeyears = "2002-2003 2003-2004 2004-2005 2005-2006 2006 2007 2008 2009 2010 2011 2012" -* be sure to keep only these from the dv hh file - last ones needed for income equivalisation later -local dvhh_keepvars = "incanon weight* a055 g018 g019 p116* p344* p389*" +* 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*" + +* needed for income equivalisation later +local dvhh_keepvars = "`dvhh_keepvars' incanon weight* a055 g018 g019 p116* p344* p389*" capture log close log using "`logd'/ONS-UK-EFS-time-series-extract-$S_DATE.smcl", replace @@ -137,10 +141,13 @@ if `do_extracts' { * could use g019? - * has 1, 2 and more than 2 - so needs recoding. recode c_nchild (0=0) (1=1) (2/max=2) lab var c_nchild "Constraint: number of children" lab define c_nchild 0 None 1 One 2 "Two or more" lab val c_nchild c_nchild ** Sorting sort case + * has 1, 2 and more than 2 - so needs recoding. recode c_nchild (0=0) (1=1) (2/max=2) lab var c_nchild "Constraint: number of children" lab define c_nchild 0 None 1 One 2 "Two or more" lab val c_nchild c_nchild + gen ba_year = `y' + ** Sorting sort case * keep only basic variables - keep case* c_* region `dvhh_keepvars' + + keep case* ba_* c_* region `dvhh_keepvars' qui: compress * save all vars save "`efsd'/`y'/stata/dvhh-temp.dta", replace ****************************** di "* raw household file for c_comp and c_accom" * also to pick up electricity water payments periodicity etc for error analysis use "`efsd'/`y'/stata/rawhh.dta", clear