All commands
# |
content
|
1 [+]
|
clear
All properties
key |
content |
command |
clear |
indent |
0 |
parameters |
|
|
2 [+]
|
use
fem2
All properties
key |
content |
command |
use |
indent |
0 |
parameters |
fem2 |
|
3 [+]
|
local
anxlevel None Mild Moderate Severe
|
4 [+]
|
display
"The defined levels of anxiety are: `anxlevel'"
|
6 [+]
|
local
count 0
All properties
key |
content |
command |
local |
indent |
0 |
parameters |
count 0 |
|
7 [+]
|
local
anxlevel None Mild Moderate Severe
|
8 [+]
|
foreach
a of local anxlevel {
All properties
key |
content |
command |
foreach |
indent |
0 |
parameters |
a of local anxlevel { |
|
9 [+]
|
local
count `count' + 1
All properties
key |
content |
command |
local |
indent |
1 |
parameters |
count `count' + 1 |
|
10 [+]
|
display
"Anxiety level `count': `a'"
All properties
key |
content |
command |
display |
indent |
1 |
parameters |
"Anxiety level `count': `a'" |
|
11 [+]
|
}
All properties
key |
content |
command |
} |
indent |
0 |
parameters |
|
|
13 [+]
|
local
count 0
All properties
key |
content |
command |
local |
indent |
0 |
parameters |
count 0 |
|
14 [+]
|
local
anxlevel None Mild Moderate Severe
|
15 [+]
|
foreach
a of local anxlevel {
All properties
key |
content |
command |
foreach |
indent |
0 |
parameters |
a of local anxlevel { |
|
16 [+]
|
local
count = `count' + 1
All properties
key |
content |
command |
local |
indent |
1 |
parameters |
count = `count' + 1 |
|
17 [+]
|
display
"Anxiety level `count': `a'"
All properties
key |
content |
command |
display |
indent |
1 |
parameters |
"Anxiety level `count': `a'" |
|
18 [+]
|
}
All properties
key |
content |
command |
} |
indent |
0 |
parameters |
|
|
20 [+]
|
local
count 0
All properties
key |
content |
command |
local |
indent |
0 |
parameters |
count 0 |
|
21 [+]
|
local
anxlevel None Mild Moderate Severe
|
22 [+]
|
foreach
a of local anxlevel {
All properties
key |
content |
command |
foreach |
indent |
0 |
parameters |
a of local anxlevel { |
|
23 [+]
|
local
count = `count' + 1
All properties
key |
content |
command |
local |
indent |
1 |
parameters |
count = `count' + 1 |
|
24 [+]
|
local
newlist "`newlist' `count' `a'"
All properties
key |
content |
command |
local |
indent |
1 |
parameters |
newlist "`newlist' `count' `a'" |
|
25 [+]
|
}
All properties
key |
content |
command |
} |
indent |
0 |
parameters |
|
|
26 [+]
|
display
"`newlist'"
All properties
key |
content |
command |
display |
indent |
0 |
parameters |
"`newlist'" |
|
36 [+]
|
local
anxlevel None Mild Moderate Severe
|
37 [+]
|
local
wds: word count `anxlevel'
All properties
key |
content |
command |
local |
indent |
0 |
parameters |
wds: word count `anxlevel' |
|
38 [+]
|
display
"There are `wds' anxiety levels:"
|
39 [+]
|
forvalues
i = 1/`wds' {
All properties
key |
content |
command |
forvalues |
indent |
0 |
parameters |
i = 1/`wds' { |
|
40 [+]
|
local
wd: word `i' of `anxlevel'
All properties
key |
content |
command |
local |
indent |
1 |
parameters |
wd: word `i' of `anxlevel' |
|
41 [+]
|
display
"Level `i' is `wd'"
All properties
key |
content |
command |
display |
indent |
1 |
parameters |
"Level `i' is `wd'" |
|
42 [+]
|
}
All properties
key |
content |
command |
} |
indent |
0 |
parameters |
|
|
44 [+]
|
local
anxlevel None Mild Moderate Severe
|
45 [+]
|
tokenize
"`anxlevel'"
All properties
key |
content |
command |
tokenize |
indent |
0 |
parameters |
"`anxlevel'" |
|
46 [+]
|
local
wds: word count `anxlevel'
All properties
key |
content |
command |
local |
indent |
0 |
parameters |
wds: word count `anxlevel' |
|
47 [+]
|
display
"There are `wds' anxiety levels:"
|
48 [+]
|
forvalues
i = 1/`wds' {
All properties
key |
content |
command |
forvalues |
indent |
0 |
parameters |
i = 1/`wds' { |
|
49 [+]
|
display
"Level `i' is ``i''"
All properties
key |
content |
command |
display |
indent |
1 |
parameters |
"Level `i' is ``i''" |
|
50 [+]
|
}
All properties
key |
content |
command |
} |
indent |
0 |
parameters |
|
|
52 [+]
|
use
fem2
, clear
All properties
key |
content |
command |
use |
indent |
0 |
options |
clear |
parameters |
fem2 |
|
53 [+]
|
scalar
root2 = sqrt(2.0)
All properties
key |
content |
command |
scalar |
indent |
0 |
parameters |
root2 = sqrt(2.0) |
|
54 [+]
|
generate
double rootage = age * root2
|
56 [+]
|
use
fem2
, clear
All properties
key |
content |
command |
use |
indent |
0 |
options |
clear |
parameters |
fem2 |
|
57 [+]
|
scalar
lb1 = 80
All properties
key |
content |
command |
scalar |
indent |
0 |
parameters |
lb1 = 80 |
|
58 [+]
|
scalar
ub1 = 88
All properties
key |
content |
command |
scalar |
indent |
0 |
parameters |
ub1 = 88 |
|
59 [+]
|
scalar
lb2 = 89
All properties
key |
content |
command |
scalar |
indent |
0 |
parameters |
lb2 = 89 |
|
60 [+]
|
scalar
ub2 = 97
All properties
key |
content |
command |
scalar |
indent |
0 |
parameters |
ub2 = 97 |
|
61 [+]
|
scalar
lb3 = 98
All properties
key |
content |
command |
scalar |
indent |
0 |
parameters |
lb3 = 98 |
|
62 [+]
|
scalar
ub3 = 109
All properties
key |
content |
command |
scalar |
indent |
0 |
parameters |
ub3 = 109 |
|
63 [+]
|
forvalues
i = 1/3 {
All properties
key |
content |
command |
forvalues |
indent |
0 |
parameters |
i = 1/3 { |
|
64 [+]
|
display
_n "IQ " lb`i' " - " ub`i'
All properties
key |
content |
command |
display |
indent |
1 |
parameters |
_n "IQ " lb`i' " - " ub`i' |
|
65 [+]
|
tabulate
anxiety
if inrange(iq, lb`i', ub`i')
|
66 [+]
|
}
All properties
key |
content |
command |
} |
indent |
0 |
parameters |
|
|
68 [+]
|
generate
age2 = age^2
All properties
key |
content |
command |
generate |
indent |
0 |
parameters |
age2 = age^2 |
|
69 [+]
|
regress
weight age age2
All properties
key |
content |
command |
regress |
indent |
0 |
parameters |
|
weight |
age age2 |
|
70 [+]
|
matrix
b = e(b)
All properties
key |
content |
command |
matrix |
indent |
0 |
parameters |
b = e(b) |
|
71 [+]
|
matrix
V = e(V)
All properties
key |
content |
command |
matrix |
indent |
0 |
parameters |
V = e(V) |
|
72 [+]
|
matrix
list b
All properties
key |
content |
command |
matrix |
indent |
0 |
parameters |
list b |
|
73 [+]
|
matrix
list V
All properties
key |
content |
command |
matrix |
indent |
0 |
parameters |
list V |
|
75 [+]
|
matrix
accum C =
weight age iq
, dev nocons
All properties
key |
content |
command |
matrix |
indent |
0 |
options |
dev nocons |
parameters |
accum C = |
weight |
age iq |
|
76 [+]
|
matrix
Corr = corr(C)
All properties
key |
content |
command |
matrix |
indent |
0 |
parameters |
Corr = corr(C) |
|
77 [+]
|
matrix
list Corr
All properties
key |
content |
command |
matrix |
indent |
0 |
parameters |
list Corr |
|
79 [+]
|
quietly
regress
weight age age2
All properties
key |
content |
command |
regress |
indent |
0 |
parameters |
|
prefix |
quietly |
weight |
age age2 |
|
80 [+]
|
matrix
V = e(V)
All properties
key |
content |
command |
matrix |
indent |
0 |
parameters |
V = e(V) |
|
81 [+]
|
matrix
cov = V[1,2]
All properties
key |
content |
command |
matrix |
indent |
0 |
parameters |
cov = V[1,2] |
|
82 [+]
|
matrix
list cov
All properties
key |
content |
command |
matrix |
indent |
0 |
parameters |
list cov |
|
83 [+]
|
matrix
cov2 = V["age","age2"]
All properties
key |
content |
command |
matrix |
indent |
0 |
parameters |
cov2 = V["age","age2"] |
|
84 [+]
|
matrix
list cov2
All properties
key |
content |
command |
matrix |
indent |
0 |
parameters |
list cov2 |
|
86 [+]
|
statsmat
iq
if age < 35
, by(anxiety) stat(N mean sd) matrix(iqanx1)
|
87 [+]
|
statsmat
iq
if age >= 35
, by(anxiety) stat(N mean sd) matrix(iqanx2)
|
88 [+]
|
matrix
result = iqanx1
, iqanx2
All properties
key |
content |
command |
matrix |
indent |
0 |
options |
iqanx2 |
parameters |
result = iqanx1 |
|
89 [+]
|
mat
list result
, ti("IQ by anxiety score for <35, >=35 years age")
|