Before I opened the dataset I increased the memory:
. set mem 20m
--------------------------------------------------------------------------------
log: /Network/afs/ir.stanford.edu/users/m/r/mrosenfe/Desktop/first secti
> on.log
log type: text
opened on: 13 May 2004, 10:22:54
. tabulate race
p25 | Freq. Percent Cum.
------------+-----------------------------------
White | 113,475 84.87 84.87
Black | 13,626 10.19 95.06
Amer Indian | 1,894 1.42 96.47
Asian | 4,715 3.53 100.00
------------+-----------------------------------
Total | 133,710 100.00
. describe
Contains data from /Network/afs/ir.stanford.edu/users/m/r/mrosenfe/Desktop/cps_y
> 2k_numeric.dta
obs: 133,710
vars: 42 8 May 2004 13:26
size: 9,894,540 (52.8% 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 %25.0g hisplbl 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
edlvl byte %16.0g edlabel 4 categories ed attainment
hispanic byte %12.0g smhisplbl
dichotomoy hispanic yes/no
new_race byte %18.0g new_race race and Hispanic combined
-------------------------------------------------------------------------------
Sorted by:
. tabulate race [fweight=wgt2]
p25 | Freq. Percent Cum.
------------+-----------------------------------
White | 224256269 82.07 82.07
Black | 35370557 12.95 95.02
Amer Indian | 2,837,831 1.04 96.06
Asian | 10769164 3.94 100.00
------------+-----------------------------------
Total | 273233821 100.00
. tabulate citizen
citizenship p733 | Freq. Percent Cum.
----------------------------------+-----------------------------------
native born in US | 116,220 86.92 86.92
native, born in territories | 1,090 0.82 87.73
native, born abroad of US parents | 976 0.73 88.46
foreign born, naturalized | 5,348 4.00 92.46
foreign born, non US citizen | 10,076 7.54 100.00
----------------------------------+-----------------------------------
Total | 133,710 100.00
. tabulate citizen, nolab
citizenship |
p733 | Freq. Percent Cum.
------------+-----------------------------------
1 | 116,220 86.92 86.92
2 | 1,090 0.82 87.73
3 | 976 0.73 88.46
4 | 5,348 4.00 92.46
5 | 10,076 7.54 100.00
------------+-----------------------------------
Total | 133,710 100.00
. tabulate race [fweight= wgt2] if citizen ==1
p25 | Freq. Percent Cum.
------------+-----------------------------------
White | 202518396 83.72 83.72
Black | 32855204 13.58 97.30
Amer Indian | 2,602,267 1.08 98.38
Asian | 3,919,511 1.62 100.00
------------+-----------------------------------
Total | 241895378 100.00
. tabulate race [fweight= wgt2] if citizen >3
p25 | Freq. Percent Cum.
------------+-----------------------------------
White | 18903396 67.82 67.82
Black | 2,204,617 7.91 75.73
Amer Indian | 186,251 0.67 76.40
Asian | 6,576,912 23.60 100.00
------------+-----------------------------------
Total | 27871176 100.00
. *This variable for race folds the Hispanics invisibly in.
. *There is a different race variable, new_race
. tabulate new_race [fweight= wgt2] if citizen ==1
race and Hispanic |
combined | Freq. Percent Cum.
-------------------+-----------------------------------
Non Hispanic White | 184802546 76.40 76.40
Non Hispanic Black | 32335886 13.37 89.77
NH American Indian | 2,396,086 0.99 90.76
NH Asian | 3,839,534 1.59 92.34
Hispanic | 18521326 7.66 100.00
-------------------+-----------------------------------
Total | 241895378 100.00
. tabulate new_race [fweight= wgt2] if citizen >3
race and Hispanic |
combined | Freq. Percent Cum.
-------------------+-----------------------------------
Non Hispanic White | 7,017,464 25.18 25.18
Non Hispanic Black | 1,782,459 6.40 31.57
NH American Indian | 67,368 0.24 31.82
NH Asian | 6,505,081 23.34 55.16
Hispanic | 12498804 44.84 100.00
-------------------+-----------------------------------
Total | 27871176 100.00
. sort sex
. by sex: tabulate new_race [fweight=wgt2] if citizen>3
_______________________________________________________________________________
-> sex = male
race and Hispanic |
combined | Freq. Percent Cum.
-------------------+-----------------------------------
Non Hispanic White | 3,451,074 24.98 24.98
Non Hispanic Black | 902,122 6.53 31.51
NH American Indian | 28,876 0.21 31.72
NH Asian | 3,045,028 22.04 53.77
Hispanic | 6,386,703 46.23 100.00
-------------------+-----------------------------------
Total | 13813803 100.00
_______________________________________________________________________________
-> sex = female
race and Hispanic |
combined | Freq. Percent Cum.
-------------------+-----------------------------------
Non Hispanic White | 3,566,390 25.37 25.37
Non Hispanic Black | 880,337 6.26 31.63
NH American Indian | 38,492 0.27 31.91
NH Asian | 3,460,053 24.61 56.52
Hispanic | 6,112,101 43.48 100.00
-------------------+-----------------------------------
Total | 14057373 100.00
. *there's only a slight difference in the racial profile of immigrant men and im
> migrant women
. *now on to summarize
. summarize yrsed
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
yrsed | 133710 9.672582 5.912728 0 22
. summarize yrsed [fweight=wgt2]
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
yrsed | 2.732e+08 9.862959 5.875305 0 22
. summarize yrsed [fweight=wgt2] if age>25 & age<36
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
yrsed | 38455845 13.30201 2.706947 0 22
. by sex: summarize yrsed [fweight=wgt2] if age>25 & age<36
_______________________________________________________________________________
-> sex = male
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
yrsed | 18915396 13.23455 2.769998 0 22
_______________________________________________________________________________
-> sex = female
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
yrsed | 19540449 13.36731 2.642841 0 22
. by sex: summarize yrsed [fweight=wgt2] if age>25 & age<36, detail
_______________________________________________________________________________
-> sex = male
years of education, from hga
-------------------------------------------------------------
Percentiles Smallest
1% 5.5 0
5% 9 0
10% 11 0 Obs 18915396
25% 12 0 Sum of Wgt. 18915396
50% 13 Mean 13.23455
Largest Std. Dev. 2.769998
75% 16 22
90% 16 22 Variance 7.672888
95% 17 22 Skewness -.704283
99% 19 22 Kurtosis 6.569923
_______________________________________________________________________________
-> sex = female
years of education, from hga
-------------------------------------------------------------
Percentiles Smallest
1% 5.5 0
5% 9 0
10% 12 0 Obs 19540449
25% 12 0 Sum of Wgt. 19540449
50% 13 Mean 13.36731
Largest Std. Dev. 2.642841
75% 16 22
90% 16 22 Variance 6.984611
95% 17 22 Skewness -.8039238
99% 19 22 Kurtosis 6.885792
. *so the educational distributions of adult men and women look about the same
. exit, clear