From e0fef6d9c7138887c1cdfc3be9c9e4a37ee04f18 Mon Sep 17 00:00:00 2001
From: Ben Anderson <b.anderson@soton.ac.uk>
Date: Wed, 29 Apr 2015 12:19:02 +0100
Subject: [PATCH] small amendments to variables kept

---
 ONS-UK-EFS-time-series-extract.do | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/ONS-UK-EFS-time-series-extract.do b/ONS-UK-EFS-time-series-extract.do
index 64da14e..445f4ec 100755
--- a/ONS-UK-EFS-time-series-extract.do
+++ b/ONS-UK-EFS-time-series-extract.do
@@ -68,7 +68,7 @@ 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 "1"
+local do_extracts 0
 
 * 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"
@@ -434,11 +434,6 @@ drop if survey_year == "2006" & ba_month == 3
 * check
 tab ba_calyear ba_month
 
-di "Compressing"
-qui: compress 
-
- 
-aorder
 
 gen caseno = case
 
@@ -454,6 +449,15 @@ else
 * to test
 tabstat c_ncars c_nchild c_npersons c_nearners c_nrooms,  by(ba_sampyear)
 
+drop _merge* a055 g* p*
+
+di "*-> Compressing"
+qui: compress 
+
+aorder
+
+order case* survey*
+
 save "`outd'/EFS-`years'-extract-reduced-BA.dta", replace
 
di "Job ended at $S_DATE"
 
-- 
GitLab