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 2838b5c4 authored by Ben Anderson's avatar Ben Anderson
Browse files

fixed error in sampling loop

parent 639cb0bd
......@@ -102,6 +102,7 @@ if `create_codebook' {
log on main
}
foreach s of local sample {
local samplet "`s'pc"
***** random sample ****
......@@ -189,7 +190,7 @@ foreach s of local sample {
if `create_longfile' {
* create the long file with as few vars as possible (quicker)
* still takes a while...
preserve
keep HH_ID Gcons* Econs*
* panel vars:
......@@ -219,21 +220,10 @@ foreach s of local sample {
codebook
log close cbl
log on main
* this leaves us with the long form file in memory
restore
* this leaves us with the original file in memory
}
}
/*
* Link xwave data to long form file
* THIS TAKES AGES and creates a 1.5 GB file for the full dataset - use with care
* now just merge them
* start with long file which may or may not have just been re-created
use "`dpath'/`dfile'_consumptionfile_long.dta", clear
merge m:1 HH_ID using "`dpath'/`dfile'_xwavefile.dta"
save "`dpath'/`dfile'_consumptionfile_long_complete_`samplet'.dta", replace
*/
* done!
......
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