All variables in census2c.dta
Variable |
Graph |
Type |
N |
Descriptives |
Label |
[+]
divr
@census2c.dta |
|
identifier
(double)
|
21
(21)
|
|
Divorces, '000 |
All properties
key |
content |
N |
21 |
N_unique |
21 |
class |
identifier |
example0 |
13.488 |
histh |
.03501986, .01273449, .00955087, .00955087 |
histw |
9.6207504, 24.578251, 39.535751, 54.493252 |
label |
Divorces, '000 |
max |
61.972 |
mean |
22.179 |
min |
2.142 |
sd |
19.311 |
type |
double |
-
-
Script Output
divr: Divorces, '000 Number of Observations
--------------------- ------------------------------
Total Integers Nonintegers
| # Negative - - -
| # Zero - - -
| # Positive 21 - 21
| # ----- ----- -----
| # Total 21 - 21
| # # # # # Missing -
+---------------------- -----
2.142 61.972 21
(21 unique values)
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
divr | 21 22.17948 19.31113 2.142 61.972
@mean 22.179
@sd 19.311
@min 2.142
@max 61.972
@example0 13.488
@histh .03501986, .01273449, .00955087, .00955087
@histw 9.6207504, 24.578251, 39.535751, 54.493252
@type double
@label Divorces, '000
@class identifier
@N_unique 21
@N 21
|
[+]
marr
@census2c.dta |
|
identifier
(double)
|
21
(21)
|
|
Marriages, '000
|
All properties
key |
content |
N |
21 |
N_unique |
21 |
class |
identifier |
example0 |
26.048 |
histh |
.01504206, .0068373, .00410238, .00273492 |
histw |
22.637501, 57.460499, 92.283501, 127.1065 |
label |
Marriages, '000 |
max |
144.518 |
mean |
46.169 |
min |
5.226 |
sd |
39.906 |
type |
double |
-
-
Script Output
marr: Marriages, '000 Number of Observations
---------------------- ------------------------------
Total Integers Nonintegers
| # Negative - - -
| # Zero - - -
| # Positive 21 - 21
| # # ----- ----- -----
| # # Total 21 - 21
| # # . # . Missing -
+---------------------- -----
5.226 144.518 21
(21 unique values)
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
marr | 21 46.16905 39.9059 5.226 144.518
@mean 46.169
@sd 39.906
@min 5.226
@max 144.518
@example0 26.048
@histh .01504206, .0068373, .00410238, .00273492
@histw 22.637501, 57.460499, 92.283501, 127.1065
@type double
@label Marriages, '000
@class identifier
@N_unique 21
@N 21
|
[+]
medage
@census2c.dta |
|
category
(float)
|
21
(17)
|
"28.29999923706055", "28.79999923..20000076293945"
|
Median age, years
|
All properties
key |
content |
N |
21 |
N_unique |
17 |
class |
category |
freq |
1, 1, 1, 2, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1 |
label |
Median age, years |
max |
32.200 |
mean |
30.257 |
min |
28.300 |
names |
"28.29999923706055", "28.79999923706055", "28.89999961853027", "29.20000076293945", "29.39999961853027", "29.70000076293945", "29.89999961853027", "30", "30.10000038146973", "30.39999961853027", "30.89999961853027", "31.20000076293945", "31.79999923706055", "31.89999961853027", "32", "32.09999847412109", "32.20000076293945" |
sd |
1.200 |
type |
float |
values |
28.299999, 28.799999, 28.9, 29.200001, 29.4, 29.700001, 29.9, 30, 30.1, 30.4, 30.9, 31.200001, 31.799999, 31.9, 32, 32.099998, 32.200001 |
Data Manipulations with medage
file |
# |
command |
ch2.0.do:
|
19 [+]
|
label
var medage "Median age, years"
|
:
|
26 [+]
|
keep
state region pop popurb medage marr divr
|
:
|
52 [+]
|
generate
medagel = medage
if pop > 5000
All properties
key |
content |
command |
generate |
if |
pop > 5000 |
indent |
0 |
parameters |
medagel = medage |
|
:
|
119 [+]
|
generate
medagebrack = recode(medage, 28, 29, 30, 31, 32, 33)
-
generate medagebrack = recode(medage, 28, 29, 30, 31, 32, 33)
|
ch3.01.do:
|
32 [+]
|
generate
medagebrack = recode(medage, 29, 30, 31, 32, 33)
-
generate medagebrack = recode(medage, 29, 30, 31, 32, 33)
|
:
|
35 [+]
|
generate
medagebracknr = irecode(medage, 29, 30, 31, 32, 33)
-
generate medagebracknr = irecode(medage, 29, 30, 31, 32, 33)
|
-
-
Script Output
medage: Median age, years Number of Observations
-------------------------- ------------------------------
Total Integers Nonintegers
| # Negative - - -
| # # # Zero - - -
| # # # Positive 21 2 19
| # # # # ----- ----- -----
| # # # # # Total 21 2 19
| # # # # # Missing -
+---------------------- -----
28.3 32.2 21
(17 unique values)
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
medage | 21 30.25714 1.199821 28.3 32.2
@mean 30.257
@sd 1.200
@min 28.300
@max 32.200
@values 28.299999, 28.799999, 28.9, 29.200001, 29.4, 29.700001, 29.9, 30, 30.1, 30.4, 30.9, 31.200001, 31.799999, 31.9, 32, 32.099998, 32.200001
@names "28.29999923706055", "28.79999923706055", "28.89999961853027", "29.20000076293945", "29.39999961853027", "29.70000076293945", "29.89999961853027", "30", "30.10000038146973", "30.39999961853027", "30.89999961853027", "31.20000076293945", "31.79999923706055", "31.89999961853027", "32", "32.09999847412109", "32.20000076293945"
@freq 1, 1, 1, 2, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1
@type float
@label Median age, years
@class category
@N_unique 17
@N 21
|
[+]
pop
@census2c.dta |
|
identifier
(double)
|
21
(21)
|
|
1980 Population, '000
|
All properties
key |
content |
N |
21 |
N_unique |
21 |
class |
identifier |
example0 |
3107.576 |
histh |
.00013409, .0000447, .0000447, .00001117 |
histw |
2642.283, 6903.937, 11165.591, 15427.245 |
label |
1980 Population, '000 |
max |
17558.072 |
mean |
5142.903 |
min |
511.456 |
sd |
4675.152 |
type |
double |
Estimations and Descriptive Statistics with pop
file |
# |
command |
ch2.0.do:
|
43 [+]
|
list
region state pop
, sepby(region)
|
:
|
46 [+]
|
list
state region pop
in 1/5
All properties
key |
content |
command |
list |
in |
1/5 |
indent |
0 |
parameters |
state region pop |
|
:
|
47 [+]
|
list
state region pop
in -5/l
All properties
key |
content |
command |
list |
in |
-5/l |
indent |
0 |
parameters |
state region pop |
|
:
|
50 [+]
|
list
state region pop
in 1/5
All properties
key |
content |
command |
list |
in |
1/5 |
indent |
0 |
parameters |
state region pop |
|
:
|
54 [+]
|
list
state region pop medagel
, sep(0)
|
:
|
57 [+]
|
summarize
medage
if pop > 5000
All properties
key |
content |
command |
summarize |
if |
pop > 5000 |
indent |
0 |
parameters |
medage |
|
:
|
63 [+]
|
list
state pop smallpop largepop
, sep(0)
|
:
|
95 [+]
|
describe
pop smallpop largepop popsize urbanized
|
:
|
117 [+]
|
tabstat
pop medage
, by(netmarr2x)
|
:
|
129 [+]
|
list
region state pop totpop
, sepby(region)
|
:
|
134 [+]
|
list
region state pop meanpop
, sepby(region)
|
:
|
141 [+]
|
list
region popsize state pop meanpop2
, sepby(region popsize)
|
:
|
156 [+]
|
summarize
pop
All properties
key |
content |
command |
summarize |
indent |
0 |
parameters |
pop |
|
:
|
159 [+]
|
mean
pop popurb
All properties
key |
content |
command |
mean |
indent |
0 |
parameters |
pop popurb |
|
ch3.01.do:
|
2 [+]
|
summarize
pop*
All properties
key |
content |
command |
summarize |
indent |
0 |
parameters |
pop* |
|
:
|
4 [+]
|
list
state pop
in 1/5
All properties
key |
content |
command |
list |
in |
1/5 |
indent |
0 |
parameters |
state pop |
|
:
|
5 [+]
|
list
state pop medage
if medage >= 32
|
:
|
20 [+]
|
tabstat
pop
, stat(mean min max) by(size)
|
:
|
28 [+]
|
list
state medage pop
if newengland
, sep(0)
|
:
|
30 [+]
|
list
state medage pop
if inrange(pop, 5000, 9999)
, sep(0)
|
:
|
45 [+]
|
list
state pop avgpop popratio
if size == 0
, sep(0)
|
Data Manipulations with pop
file |
# |
command |
ch2.0.do:
|
17 [+]
|
label
var pop "1980 Population, '000"
All properties
key |
content |
command |
label |
indent |
0 |
parameters |
var pop "1980 Population, '000" |
|
:
|
26 [+]
|
keep
state region pop popurb medage marr divr
|
:
|
36 [+]
|
generate
urbanized = popurb / pop
|
:
|
52 [+]
|
generate
medagel = medage
if pop > 5000
All properties
key |
content |
command |
generate |
if |
pop > 5000 |
indent |
0 |
parameters |
medagel = medage |
|
:
|
60 [+]
|
replace
smallpop = 1
if pop <= 5000 & !missing(pop)
|
:
|
62 [+]
|
replace
largepop = 1
if pop > 5000 & !missing(pop)
|
:
|
67 [+]
|
generate
smallpop = (pop <= 5000)
All properties
key |
content |
command |
generate |
indent |
0 |
parameters |
smallpop = (pop <= 5000) |
|
:
|
68 [+]
|
generate
largepop = (pop > 5000)
All properties
key |
content |
command |
generate |
indent |
0 |
parameters |
largepop = (pop > 5000) |
|
:
|
71 [+]
|
generate
smallpop = (pop <= 5000)
if !missing(pop)
|
:
|
72 [+]
|
generate
largepop = (pop > 5000)
if !missing(pop)
|
:
|
92 [+]
|
label
variable smallpop "States with <= 5 million pop, 1980"
|
:
|
93 [+]
|
label
variable largepop "States with > 5 million pop, 1980"
|
:
|
128 [+]
|
by region:
generate
totpop = sum(pop)
|
:
|
133 [+]
|
by region:
egen
meanpop = mean(pop)
|
:
|
140 [+]
|
bysort region popsize:
egen
meanpop2 = mean(pop)
|
ch3.01.do:
|
17 [+]
|
generate
size=irecode(pop, 1000, 4000, 8000, 20000)
-
generate size=irecode(pop, 1000, 4000, 8000, 20000)
All properties
key |
content |
command |
generate |
indent |
0 |
parameters |
size=irecode(pop, 1000, 4000, 8000, 20000) |
|
:
|
42 [+]
|
bysort size:
egen
avgpop = mean(pop)
|
:
|
43 [+]
|
generate
popratio = 100 * pop / avgpop
All properties
key |
content |
command |
generate |
indent |
0 |
parameters |
popratio = 100 * pop / avgpop |
|
-
-
Script Output
pop: 1980 Population, '000 Number of Observations
--------------------------- ------------------------------
Total Integers Nonintegers
| # Negative - - -
| # Zero - - -
| # Positive 21 - 21
| # # ----- ----- -----
| # # Total 21 - 21
| # # # # . Missing -
+---------------------- -----
511.456 17558.07 21
(21 unique values)
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
pop | 21 5142.903 4675.152 511.456 17558.07
@mean 5142.903
@sd 4675.152
@min 511.456
@max 17558.072
@example0 3107.576
@histh .00013409, .0000447, .0000447, .00001117
@histw 2642.283, 6903.937, 11165.591, 15427.245
@type double
@label 1980 Population, '000
@class identifier
@N_unique 21
@N 21
|
[+]
popurb
@census2c.dta |
|
identifier
(double)
|
21
(21)
|
|
1980 Urban population, '000
|
All properties
key |
content |
N |
21 |
N_unique |
21 |
class |
identifier |
example0 |
2449.774 |
histh |
.00018159, .00003891, .00003891, .00001297 |
histw |
2008.4016, 5679.7349, 9351.0684, 13022.401 |
label |
1980 Urban population, '000 |
max |
14858.068 |
mean |
3829.776 |
min |
172.735 |
sd |
3851.458 |
type |
double |
Estimations and Descriptive Statistics with popurb
file |
# |
command |
ch2.0.do:
|
159 [+]
|
mean
pop popurb
All properties
key |
content |
command |
mean |
indent |
0 |
parameters |
pop popurb |
|
ch3.01.do:
|
2 [+]
|
summarize
pop*
All properties
key |
content |
command |
summarize |
indent |
0 |
parameters |
pop* |
|
-
-
Script Output
popurb: 1980 Urban population, '000 Number of Observations
------------------------------------ ------------------------------
Total Integers Nonintegers
| # Negative - - -
| # Zero - - -
| # Positive 21 - 21
| # ----- ----- -----
| # # Total 21 - 21
| # # # . . Missing -
+---------------------- -----
172.735 14858.07 21
(21 unique values)
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
popurb | 21 3829.776 3851.458 172.735 14858.07
@mean 3829.776
@sd 3851.458
@min 172.735
@max 14858.068
@example0 2449.774
@histh .00018159, .00003891, .00003891, .00001297
@histw 2008.4016, 5679.7349, 9351.0684, 13022.401
@type double
@label 1980 Urban population, '000
@class identifier
@N_unique 21
@N 21
|
[+]
region
@census2c.dta |
|
dummy
(byte)
|
21
(2)
|
"NE", "N Cntrl"
|
Census region
|
All properties
key |
content |
N |
21 |
N_unique |
2 |
class |
dummy |
freq |
9, 12 |
label |
Census region |
max |
2 |
mean |
1.571 |
min |
1 |
names |
"NE", "N Cntrl" |
sd |
0.507 |
type |
byte |
values |
1, 2 |
-
-
Script Output
region: Census region Number of Observations
---------------------- ------------------------------
Total Integers Nonintegers
| # Negative - - -
| # Zero - - -
| # # Positive 21 21 -
| # # ----- ----- -----
| # # Total 21 21 -
| # # Missing -
+---------------------- -----
1 2 21
(2 unique values)
region is labeled and all values are documented in the label.
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
region | 21 1.571429 .5070926 1 2
@mean 1.571
@sd 0.507
@min 1
@max 2
@values 1, 2
@names "NE", "N Cntrl"
@freq 9, 12
@type byte
@label Census region
@class dummy
@N_unique 2
@N 21
|
[+]
state
@census2c.dta |
|
identifier
(str13)
|
21
(21)
|
|
State
|
All properties
key |
content |
N |
21 |
N_unique |
21 |
class |
identifier |
example0 |
Connecticut |
freq |
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 |
label |
State |
type |
str13 |
values |
"Connecticut", "Illinois", "Indiana", "Iowa", "Kansas", "Maine", "Massachusetts", "Michigan", "Minnesota", "Missouri", "N. Dakota", "Nebraska", "New Hampshire", "New Jersey", "New York", "Ohio", "Pennsylvania", "Rhode Island", "S. Dakota", "Vermont", "Wisconsin" |
Estimations and Descriptive Statistics with state
file |
# |
command |
ch2.0.do:
|
43 [+]
|
list
region state pop
, sepby(region)
|
:
|
46 [+]
|
list
state region pop
in 1/5
All properties
key |
content |
command |
list |
in |
1/5 |
indent |
0 |
parameters |
state region pop |
|
:
|
47 [+]
|
list
state region pop
in -5/l
All properties
key |
content |
command |
list |
in |
-5/l |
indent |
0 |
parameters |
state region pop |
|
:
|
50 [+]
|
list
state region pop
in 1/5
All properties
key |
content |
command |
list |
in |
1/5 |
indent |
0 |
parameters |
state region pop |
|
:
|
54 [+]
|
list
state region pop medagel
, sep(0)
|
:
|
63 [+]
|
list
state pop smallpop largepop
, sep(0)
|
:
|
129 [+]
|
list
region state pop totpop
, sepby(region)
|
:
|
134 [+]
|
list
region state pop meanpop
, sepby(region)
|
:
|
141 [+]
|
list
region popsize state pop meanpop2
, sepby(region popsize)
|
ch3.01.do:
|
4 [+]
|
list
state pop
in 1/5
All properties
key |
content |
command |
list |
in |
1/5 |
indent |
0 |
parameters |
state pop |
|
:
|
5 [+]
|
list
state pop medage
if medage >= 32
|
:
|
8 [+]
|
describe
state stateid
All properties
key |
content |
command |
describe |
indent |
0 |
parameters |
state stateid |
|
:
|
9 [+]
|
list
state stateid
in 1/5
All properties
key |
content |
command |
list |
in |
1/5 |
indent |
0 |
parameters |
state stateid |
|
:
|
28 [+]
|
list
state medage pop
if newengland
, sep(0)
|
:
|
30 [+]
|
list
state medage pop
if inrange(pop, 5000, 9999)
, sep(0)
|
:
|
45 [+]
|
list
state pop avgpop popratio
if size == 0
, sep(0)
|
Data Manipulations with state
file |
# |
command |
ch2.0.do:
|
16 [+]
|
label
var state "State"
All properties
key |
content |
command |
label |
indent |
0 |
parameters |
var state "State" |
|
:
|
26 [+]
|
keep
state region pop popurb medage marr divr
|
ch3.01.do:
|
7 [+]
|
encode
state
, generate(stateid)
|
:
|
25 [+]
|
generate
byte newengland = inlist(state, "Connecticut", "Maine", ///
"Massachusetts", "New Hampshire", "Rhode Island", "Vermont")
-
generate byte newengland = inlist(state, "Connecticut", "Maine", ///
"Massachusetts", "New Hampshire", "Rhode Island", "Vermont")
|
-
-
Script Output
@freq 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
@values "Connecticut", "Illinois", "Indiana", "Iowa", "Kansas", "Maine", "Massachusetts", "Michigan", "Minnesota", "Missouri", "N. Dakota", "Nebraska", "New Hampshire", "New Jersey", "New York", "Ohio", "Pennsylvania", "Rhode Island", "S. Dakota", "Vermont", "Wisconsin"
@example0 Connecticut
@type str13
@label State
@class identifier
@N_unique 21
@N 21
|