-------------------------------------------------------------------------------------------------------
log: :acomp hd (2001-02):save stuff here
(temporary):second class 2002.log
log type: text
opened on: 15 May 2002, 11:20:49
. tabulate citizen
citizenship p733 | Freq. Percent Cum.
----------------------------------+-----------------------------------
native born in US |
116220 86.92 86.92
native, born
in territories | 1090 0.82 87.73
native, born abroad of US parents | 976 0.73 88.46
foreign
born, naturalized | 5348 4.00 92.46
foreign born,
non US citizen | 10076 7.54 100.00
----------------------------------+-----------------------------------
Total | 133710
100.00
. *in order to know about the US population as a whole,
use the weights
. tabulate citizen [fweight=wgt2]
citizenship p733 | Freq.
Percent Cum.
----------------------------------+-----------------------------------
native born in US |
241895378 88.53 88.53
native, born
in territories | 1587797 0.58
89.11
native, born abroad of US parents | 1879470 0.69 89.80
foreign
born, naturalized | 10496702 3.84 93.64
foreign born,
non US citizen | 17374474 6.36 100.00
----------------------------------+-----------------------------------
Total | 273233821
100.00
. tabulate citizen [fweight=wgt2], nolabel
citizenship |
p733 | Freq.
Percent Cum.
------------+-----------------------------------
1 | 241895378 88.53 88.53
2 | 1587797 0.58 89.11
3 | 1879470 0.69 89.80
4 | 10496702 3.84 93.64
5 | 17374474 6.36 100.00
------------+-----------------------------------
Total | 273233821
100.00
. gen immigr=1 if
citizen==4 | citizen==5
(118286 missing values generated)
. replace immigr=0 if citizen==1| citizen==2 | citizen==3
(118286 real changes made)
. tabulate citizen immigr
| immigr
citizenship
p733 | 0 1 | Total
----------------------+----------------------+----------
native born in
US | 116220 0 |
116220
native, born in terri | 1090 0 | 1090
native, born abroad o | 976 0 | 976
foreign born, natural | 0
5348 | 5348
foreign born, non US
| 0 10076 | 10076
----------------------+----------------------+----------
Total | 118286 15424 |
133710
. label define immigrlab 0 "US born" 1
"Immigrant"
. label values immigr immigrlab
. tabulate citizen immigr
| immigr
citizenship
p733 | US born Immigrant | Total
----------------------+----------------------+----------
native born in
US | 116220 0 |
116220
native, born in terri | 1090 0 | 1090
native, born abroad o | 976 0 | 976
foreign born, natural | 0
5348 | 5348
foreign born, non US
| 0 10076 | 10076
----------------------+----------------------+----------
Total | 118286 15424 |
133710
. tabulate state
HG-ST60, or |
simply |
state of |
residence |
h40 | Freq.
Percent Cum.
------------+-----------------------------------
11 | 1353 1.01 1.01
12 | 1297 0.97 1.98
13 | 1237 0.93 2.91
14 | 2885 2.16 5.06
15 | 1289 0.96 6.03
16 | 1409 1.05 7.08
21 | 8669 6.48 13.57
22 | 4029 3.01 16.58
23 | 5036 3.77 20.35
31 | 4628 3.46 23.81
32 | 1686 1.26 25.07
33 |
5626 4.21 29.28
34 | 4511 3.37 32.65
35 | 1860 1.39 34.04
41 | 1809 1.35 35.39
42 | 1630 1.22 36.61
43 | 1503 1.12 37.74
44 | 1485 1.11 38.85
45 | 1629 1.22 40.07
46 | 1728 1.29 41.36
47 | 1662 1.24 42.60
51 | 1327 0.99 43.59
52 | 1430 1.07 44.66
53 | 1183 0.88 45.55
54 | 1940 1.45 47.00
55 | 1615 1.21 48.21
56 | 3271
2.45 50.65
57 | 1306 0.98 51.63
58 | 2004 1.50 53.13
59 | 6939 5.19 58.32
61 | 1629 1.22 59.54
62 | 1646 1.23 60.77
63 | 1736 1.30 62.06
64 | 1553 1.16 63.23
71 | 1715 1.28 64.51
72 | 1702 1.27 65.78
73 | 1855 1.39
67.17
74 | 8027 6.00 73.17
81 | 1730 1.29 74.47
82 | 1963 1.47 75.93
83 | 1664 1.24 77.18
84 | 2042 1.53 78.71
85 | 2347 1.76 80.46
86 | 2562 1.92 82.38
87 | 1968 1.47 83.85
88 | 2106 1.58 85.42
91 | 1661 1.24 86.67
92 | 1598 1.20 87.86
93 | 13325 9.97 97.83
94 | 1607 1.20 99.03
95 | 1298 0.97 100.00
------------+-----------------------------------
Total | 133710
100.00
. describe
Contains data from :AComp HD (2001-02):Save Stuff Here
(Temporary):cps_y2k_numeric.dta
obs: 133,710
vars: 40 30 May 2001 12:57
size: 10,028,250 (44.6% of memory free)
-------------------------------------------------------------------------------
storage display value
variable name
type format label
variable label
-------------------------------------------------------------------------------
phseq
str5 %9s household sequence number
p2
pernum
byte %8.0g
age
byte %8.0g p15
maritl
byte %26.0g marlbl
Marital Status p17
sex
byte %8.0g sexnm p20
vet
byte %22.0g vetnm
veteran status p21
hga
byte %8.0g Educational Attainment p22
race
byte %11.0g racenm
p25
reorigin
byte %8.0g Hispanic Origin p27
hrs1
byte %8.0g hours worked last week p76
clswkr
byte %32.0g cwrknm
sector of worker p109
grswk
int %9.0g gross weekly wages p135
unmem
byte %13.0g unnm
labor union member p139
lfsr
byte %28.0g lfsrnm
labor force status p145
ernval
float %9.0g main job last year earnings
p228
ssval
long %12.0g last year soc security
payments
p291
pawval
int %12.0g last year welfare payments
p305
wgt2
int %9.0g rounded weight based on p50
ernval2
float %9.0g main job earnings, losses
recoded to zero
htype
byte %37.0g htpnm
household type h25
state byte
%8.0g HG-ST60, or
simply state of
residence h40
hpmsasz
byte %8.0g metropolitan area size h56
hcccr
byte %8.0g residence in central city h58
frelu18
byte %8.0g number of kids in fam under
18
f29
povll
byte %8.0g ratio of fam income to
poverty
level f38
fwsval
float %9.0g family income f48
famwgt2
int %8.0g adjusted family weight f233
yrsed
float %9.0g years of education, from hga
citizen
byte %33.0g citnm
citizenship p733
health
byte %11.0g hlthnm
self reported health status p800
occ
int %8.0g occupation P 106
ptotr
byte %8.0g total person income
categories
P466
penatvty
int %8.0g country of birth P 722,
Appendix H
pemntvty
int %8.0g Mother's country of birth,
P725, appendix H
pefntvty
int %8.0g Father's country of birth,
P728, appendix H
peinusyr
byte %8.0g time of immigration, P 731
pxnatvty
byte %8.0g allocation flag for country
of
birth P 734
hgmsac
int %8.0g metropolitan area code, h44,
appendix E
pppos2
byte %8.0g family sequence number within
each household p46
immigr
float %9.0g immigrlab
-------------------------------------------------------------------------------
Sorted by:
race
Note: dataset has changed since last saved
. tabulate immigr [fweight=wgt2] if state==93
immigr | Freq.
Percent Cum.
------------+-----------------------------------
US born | 25135056 74.58 74.58
Immigrant | 8568580 25.42 100.00
------------+-----------------------------------
Total | 33703636
100.00
. tabulate immigr [fweight=wgt2]
immigr | Freq.
Percent Cum.
------------+-----------------------------------
US born | 245362645 89.80 89.80
Immigrant | 27871176 10.20 100.00
------------+-----------------------------------
Total | 273233821
100.00
. display 700/22.3
31.390135
. tabulate hga
Educational |
Attainment |
p22 | Freq.
Percent Cum.
------------+-----------------------------------
0 | 30484 22.80 22.80
31 | 457 0.34 23.14
32 | 1187 0.89 24.03
33 | 2320 1.74 25.76
34 | 4527
3.39 29.15
35 | 4161 3.11 32.26
36 | 4695 3.51 35.77
37 | 4721 3.53 39.30
38 | 1491 1.12 40.42
39 | 31970 23.91 64.33
40 | 18797 14.06 78.39
41 | 3758 2.81 81.20
42 | 3328 2.49 83.69
43 | 14705 11.00 94.68
44 | 4918 3.68
98.36
45 | 1229 0.92 99.28
46 | 962 0.72 100.00
------------+-----------------------------------
Total | 133710
100.00
. summarize yrsed
Variable | Obs
Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
yrsed | 133710
9.672582 5.912728 0 22
. summarize yrsed if age >21
Variable | Obs
Mean Std. Dev. Min
Max
-------------+-----------------------------------------------------
yrsed | 90135
12.79628 3.123646 0 22
. summarize yrsed if age >21 [fweight=wgt2]
Variable | Obs
Mean Std. Dev. Min
Max
-------------+-----------------------------------------------------
yrsed |
1.9e+08 12.93181 3.025563 0 22
. summarize yrsed if age>21 & yrsed <12
[fweight=wgt2]
Variable | Obs
Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
yrsed |
2.7e+07 7.978367 2.948155 0 11
. tabulate yrsed if age >21 [fweight=wgt2]
years of |
education, |
from hga | Freq.
Percent Cum.
------------+-----------------------------------
0 | 846281 0.46 0.46
1.5 | 1915270 1.03 1.49
5.5 | 3579830 1.93 3.42
7.5 | 5929941
3.20 6.62
9 | 3814216 2.06 8.68
10 | 5243762 2.83 11.51
11 | 5417897 2.92 14.44
12 | 63535725 34.30 48.74
13 | 33889234 18.29 67.03
14 | 14292778 7.72 74.74
16 | 31630544 17.07 91.82
17 | 10506450 5.67 97.49
19 | 2609996 1.41 98.90
22 | 2038628
1.10 100.00
------------+-----------------------------------
Total | 185250552
100.00
. display 185250552*.1444
26750180
. summarize yrsed if age>21 & yrsed <12
Variable | Obs
Mean Std. Dev. Min
Max
-------------+-----------------------------------------------------
yrsed | 14252
7.79866 2.986127 0 11
. sort race
. by race: summarize yrsed
_______________________________________________________________________________
-> race = White
Variable | Obs
Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
yrsed | 113475
9.782124 5.885755 0 22
_______________________________________________________________________________
-> race = Black
Variable | Obs
Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
yrsed | 13626
8.795428 5.871105 0 22
_______________________________________________________________________________
-> race = Amer Indian
Variable | Obs
Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
yrsed | 1894
8.131204 5.86337 0 22
_______________________________________________________________________________
-> race = Asian
Variable | Obs
Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
yrsed | 4715
10.19035 6.368575 0 22
. by race: summarize yrsed [fweight=wgt2] if age>21
_______________________________________________________________________________
-> race = White
Variable | Obs
Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
yrsed |
1.6e+08 12.98031 3.01231 0 22
_______________________________________________________________________________
-> race = Black
Variable | Obs
Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
yrsed |
2.1e+07 12.4166 2.72107 0 22
_______________________________________________________________________________
-> race = Amer Indian
Variable | Obs
Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
yrsed |
1.6e+06 12.02077 3.008345 0 22
_______________________________________________________________________________
-> race = Asian
Variable | Obs
Mean Std. Dev.
Min Max
-------------+-----------------------------------------------------
yrsed |
7.0e+06 13.6364 3.840663 0 22
. save ":AComp HD (2001-02):Save Stuff Here
(Temporary):cps_y2k_numeric.dta", replace
file :AComp HD (2001-02):Save Stuff Here
(Temporary):cps_y2k_numeric.dta saved
. exit, clear