Administrator approval is now required for registering new accounts. If you are registering a new account, and are external to the University, please ask the repository owner to contact ServiceLine to request your account be approved. Repository owners must include the newly registered email address, and specific repository in the request for approval.

Commit 7231026e authored by Ben Anderson's avatar Ben Anderson
Browse files

updated valid codes

checked for transitions between different ‘valid observation’ states
parent b58c11e0
......@@ -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
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment