All commands
# |
content
|
3 [+]
|
use
gdp4cty
, clear
All properties
key |
content |
command |
use |
indent |
0 |
options |
clear |
parameters |
gdp4cty |
|
4 [+]
|
forvalues
i = 1/4 {
All properties
key |
content |
command |
forvalues |
indent |
0 |
parameters |
i = 1/4 { |
|
5 [+]
|
generate
double lngdp`i' = log(gdp`i')
|
6 [+]
|
summarize
lngdp`i'
All properties
key |
content |
command |
summarize |
indent |
1 |
parameters |
lngdp`i' |
|
7 [+]
|
}
All properties
key |
content |
command |
} |
indent |
0 |
parameters |
|
|
9 [+]
|
use
gdp4cty
, clear
All properties
key |
content |
command |
use |
indent |
0 |
options |
clear |
parameters |
gdp4cty |
|
10 [+]
|
local
country US UK DE FR
All properties
key |
content |
command |
local |
indent |
0 |
parameters |
country US UK DE FR |
|
11 [+]
|
local
cc 1
All properties
key |
content |
command |
local |
indent |
0 |
parameters |
cc 1 |
|
12 [+]
|
foreach
c of local country {
All properties
key |
content |
command |
foreach |
indent |
0 |
parameters |
c of local country { |
|
13 [+]
|
generate
double `c'gdp = gdp`cc'
|
14 [+]
|
local
++cc
All properties
key |
content |
command |
local |
indent |
1 |
parameters |
++cc |
|
15 [+]
|
}
All properties
key |
content |
command |
} |
indent |
0 |
parameters |
|
|
17 [+]
|
local
country US UK DE FR
All properties
key |
content |
command |
local |
indent |
0 |
parameters |
country US UK DE FR |
|
18 [+]
|
foreach
c of local country {
All properties
key |
content |
command |
foreach |
indent |
0 |
parameters |
c of local country { |
|
19 [+]
|
generate
double lngdp`c' = log(`c'gdp)
|
20 [+]
|
summarize
lngdp`c'
All properties
key |
content |
command |
summarize |
indent |
1 |
parameters |
lngdp`c' |
|
21 [+]
|
}
All properties
key |
content |
command |
} |
indent |
0 |
parameters |
|
|
23 [+]
|
drop
gdp
All properties
key |
content |
command |
drop |
indent |
0 |
parameters |
gdp |
|
24 [+]
|
generate
double gdptot = 0
All properties
key |
content |
command |
generate |
indent |
0 |
parameters |
double gdptot = 0 |
|
25 [+]
|
foreach
c of varlist *gdp {
All properties
key |
content |
command |
foreach |
indent |
0 |
parameters |
c of varlist *gdp { |
|
26 [+]
|
qui
replace
gdptot = gdptot + `c'
All properties
key |
content |
command |
replace |
indent |
1 |
parameters |
gdptot = gdptot + `c' |
prefix |
qui |
|
27 [+]
|
}
All properties
key |
content |
command |
} |
indent |
0 |
parameters |
|
|
28 [+]
|
summarize
*gdp gdptot
All properties
key |
content |
command |
summarize |
indent |
0 |
parameters |
*gdp gdptot |
|
30 [+]
|
use
gdp4cty
, clear
All properties
key |
content |
command |
use |
indent |
0 |
options |
clear |
parameters |
gdp4cty |
|
31 [+]
|
forvalues
y = 1995(2)1999 {
All properties
key |
content |
command |
forvalues |
indent |
0 |
parameters |
y = 1995(2)1999 { |
|
32 [+]
|
forvalues
i = 2(2)4 {
All properties
key |
content |
command |
forvalues |
indent |
1 |
parameters |
i = 2(2)4 { |
|
33 [+]
|
summarize
gdp`i'_`y'
All properties
key |
content |
command |
summarize |
indent |
2 |
parameters |
gdp`i'_`y' |
|
34 [+]
|
}
All properties
key |
content |
command |
} |
indent |
1 |
parameters |
|
|
35 [+]
|
}
All properties
key |
content |
command |
} |
indent |
0 |
parameters |
|
|
38 [+]
|
sysuse
lifeexp
, clear
All properties
key |
content |
command |
sysuse |
indent |
0 |
options |
clear |
parameters |
lifeexp |
|
39 [+]
|
foreach
v of varlist lexp-safewater {
|
40 [+]
|
summarize
`v'
All properties
key |
content |
command |
summarize |
indent |
1 |
parameters |
`v' |
|
41 [+]
|
correlate
popgrowth `v'
All properties
key |
content |
command |
correlate |
indent |
1 |
parameters |
popgrowth `v' |
|
42 [+]
|
scatter
popgrowth `v'
All properties
key |
content |
command |
scatter |
indent |
1 |
parameters |
popgrowth `v' |
|
43 [+]
|
}
All properties
key |
content |
command |
} |
indent |
0 |
parameters |
|
|
46 [+]
|
use
gdp4cty
, clear
All properties
key |
content |
command |
use |
indent |
0 |
options |
clear |
parameters |
gdp4cty |
|
47 [+]
|
local
ctycode 111 112 136 134
All properties
key |
content |
command |
local |
indent |
0 |
parameters |
ctycode 111 112 136 134 |
|
48 [+]
|
local
i 0
All properties
key |
content |
command |
local |
indent |
0 |
parameters |
i 0 |
|
49 [+]
|
foreach
c of local ctycode {
All properties
key |
content |
command |
foreach |
indent |
0 |
parameters |
c of local ctycode { |
|
50 [+]
|
local
++i
All properties
key |
content |
command |
local |
indent |
1 |
parameters |
++i |
|
51 [+]
|
local
rc "`rc' (`i'=`c')"
All properties
key |
content |
command |
local |
indent |
1 |
parameters |
rc "`rc' (`i'=`c')" |
|
52 [+]
|
}
All properties
key |
content |
command |
} |
indent |
0 |
parameters |
|
|
53 [+]
|
display
"`rc'"
All properties
key |
content |
command |
display |
indent |
0 |
parameters |
"`rc'" |
|
54 [+]
|
recode
cc `rc'
, gen(newcc)
All properties
key |
content |
command |
recode |
indent |
0 |
options |
gen(newcc) |
parameters |
cc `rc' |
|
55 [+]
|
tabulate
newcc
All properties
key |
content |
command |
tabulate |
indent |
0 |
parameters |
newcc |
|
57 [+]
|
use
gdp4cty
, clear
All properties
key |
content |
command |
use |
indent |
0 |
options |
clear |
parameters |
gdp4cty |
|
58 [+]
|
local
country US UK DE FR
All properties
key |
content |
command |
local |
indent |
0 |
parameters |
country US UK DE FR |
|
59 [+]
|
local
yrlist 1995 1999
All properties
key |
content |
command |
local |
indent |
0 |
parameters |
yrlist 1995 1999 |
|
60 [+]
|
forvalues
i = 1/4 {
All properties
key |
content |
command |
forvalues |
indent |
0 |
parameters |
i = 1/4 { |
|
61 [+]
|
local
cname: word `i' of `country'
All properties
key |
content |
command |
local |
indent |
1 |
parameters |
cname: word `i' of `country' |
|
62 [+]
|
foreach
y of local yrlist {
All properties
key |
content |
command |
foreach |
indent |
1 |
parameters |
y of local yrlist { |
|
63 [+]
|
rename
gdp`i'_`y' gdp`cname'_`y'
|
64 [+]
|
}
All properties
key |
content |
command |
} |
indent |
1 |
parameters |
|
|
65 [+]
|
}
All properties
key |
content |
command |
} |
indent |
0 |
parameters |
|
|
66 [+]
|
summarize
gdpUS*
All properties
key |
content |
command |
summarize |
indent |
0 |
parameters |
gdpUS* |
|
69 [+]
|
use
gdp4cty
, clear
All properties
key |
content |
command |
use |
indent |
0 |
options |
clear |
parameters |
gdp4cty |
|
70 [+]
|
describe
gdp*_*
All properties
key |
content |
command |
describe |
indent |
0 |
parameters |
gdp*_* |
|
71 [+]
|
local
country US UK DE FR
All properties
key |
content |
command |
local |
indent |
0 |
parameters |
country US UK DE FR |
|
72 [+]
|
local
yrlist 1995 1999
All properties
key |
content |
command |
local |
indent |
0 |
parameters |
yrlist 1995 1999 |
|
73 [+]
|
local
ncty: word count country
|
74 [+]
|
tokenize
`country'
All properties
key |
content |
command |
tokenize |
indent |
0 |
parameters |
`country' |
|
75 [+]
|
forvalues
i = 1/`ncty' {
All properties
key |
content |
command |
forvalues |
indent |
0 |
parameters |
i = 1/`ncty' { |
|
76 [+]
|
foreach
y of local yrlist {
All properties
key |
content |
command |
foreach |
indent |
1 |
parameters |
y of local yrlist { |
|
77 [+]
|
rename
gdp`i'_`y' gdp``i''_`y'
|
78 [+]
|
}
All properties
key |
content |
command |
} |
indent |
1 |
parameters |
|
|
79 [+]
|
}
All properties
key |
content |
command |
} |
indent |
0 |
parameters |
|
|
80 [+]
|
summarize
gdpUS*
All properties
key |
content |
command |
summarize |
indent |
0 |
parameters |
gdpUS* |
|