Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
DECC-data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ben Anderson
DECC-data
Commits
2838b5c4
Commit
2838b5c4
authored
10 years ago
by
Ben Anderson
Browse files
Options
Downloads
Patches
Plain Diff
fixed error in sampling loop
parent
639cb0bd
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
NEED/process-NEED-EULF-2014.do
+32
-42
32 additions, 42 deletions
NEED/process-NEED-EULF-2014.do
with
32 additions
and
42 deletions
NEED/process-NEED-EULF-2014.do
+
32
−
42
View file @
2838b5c4
...
@@ -102,6 +102,7 @@ if `create_codebook' {
...
@@ -102,6 +102,7 @@ if `create_codebook' {
log
on
main
log
on
main
}
}
foreach
s
of
local
sample
{
foreach
s
of
local
sample
{
local
samplet
"`s'pc"
local
samplet
"`s'pc"
***** random sample ****
***** random sample ****
...
@@ -189,7 +190,7 @@ foreach s of local sample {
...
@@ -189,7 +190,7 @@ foreach s of local sample {
if
`create_longfile'
{
if
`create_longfile'
{
* create the long file with as few vars as possible (quicker)
* create the long file with as few vars as possible (quicker)
* still takes a while...
* still takes a while...
preserve
keep
HH_ID
Gcons
*
Econs
*
keep
HH_ID
Gcons
*
Econs
*
* panel vars:
* panel vars:
...
@@ -219,21 +220,10 @@ foreach s of local sample {
...
@@ -219,21 +220,10 @@ foreach s of local sample {
codebook
codebook
log
close
cbl
log
close
cbl
log
on
main
log
on
main
restore
* this leaves us with the
long form
file in memory
* 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!
* done!
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment