diff --git a/NEED/analyse-NEED-EULF-2014-descriptives.do b/NEED/analyse-NEED-EULF-2014-descriptives.do index 790561a8e6dddc4e5cc6d7b250929ba4dd5cd0bc..a000d89eadb87d1325090a99a5ee962495ff4b3e 100644 --- a/NEED/analyse-NEED-EULF-2014-descriptives.do +++ b/NEED/analyse-NEED-EULF-2014-descriptives.do @@ -79,7 +79,7 @@ if `do_long_desc' { * Now use the pre-processed long form file which contains all years of consumption data but not the constant values (housing charactersitics etc) which are in the xwave file * do this for each random sample of differening sizes as a check * local samples "10 20 30 40 50 100" - local samples "50" + local samples "10" foreach s of local samples { di "************************" di "* Using `s'% sample" @@ -116,11 +116,17 @@ if `do_long_desc' { graph export "`rpath'/NEED-EULF-2014-`s'pc-box_`v'_by_year_valid.png", replace } * check the panel transitions for each valid - recode `v'Valid (V = 1) (O = 2) (L = 3) (G = 4) (M = 5), gen(EconsValidr) + gen `v'Validr = 1 if `v'Valid == "V" + replace `v'Validr = 2 if `v'Valid == "O" + replace `v'Validr = 3 if `v'Valid == "L" + replace `v'Validr = 4 if `v'Valid == "G" + replace `v'Validr = 5 if `v'Valid == "M" + lab var `v'Validr "Recoded `v'Valid" - lab def `v'Validr 1 "V" 2 "O" 3 "L" 4 "G" 5 "M" + lab def `v'Validr 1 "(V)alid" 2 "(O)ff-gas" 3 "(L)Gas < 100" 4 "(G) Gas > 50,000" 5 "M(issing in source)" lab val `v'Validr `v'Validr - xttrans `v'Validr + * di "Check transitions (`v'Validr)" + xttrans `v'Validr, freq } } }