-------------------------------------------------------------------------------
log: :acomp hd (2001-02):save stuff here (temporary):last section.smcl
log type: smcl
opened on: 29 May 2003, 11:04:46
. *OK, the first question has to do with controling many variables at the same
> time..
. sort maritl
. by maritl: summarize ernval2
_______________________________________________________________________________
-> maritl = married, spouse present
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 55585 25107.86 33382.64 0 362302
_______________________________________________________________________________
-> maritl = married, AF spouse present
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 351 12767.54 15041 0 79000
_______________________________________________________________________________
-> maritl = married, spouse absent
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 1355 17183.37 25211.66 0 362302
_______________________________________________________________________________
-> maritl = widowed
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 6561 4579.424 14777.52 0 362302
_______________________________________________________________________________
-> maritl = divorced
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 9523 22841.69 26690.46 0 362302
_______________________________________________________________________________
-> maritl = separated
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 2097 16972.64 23463.37 0 333564
_______________________________________________________________________________
-> maritl = never married
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 58238 5992.43 14760.09 0 284133
. by maritl: summarize ernval2 if sex==2 & age>19&age<30
_______________________________________________________________________________
-> maritl = married, spouse present
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 3324 13106.16 16905.48 0 333564
_______________________________________________________________________________
-> maritl = married, AF spouse present
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 117 9662.487 9964.866 0 42000
_______________________________________________________________________________
-> maritl = married, spouse absent
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 100 12065.56 14216.67 0 75000
_______________________________________________________________________________
-> maritl = widowed
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 12 9150 8681.066 0 24000
_______________________________________________________________________________
-> maritl = divorced
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 360 14690.75 12889.61 0 100005
_______________________________________________________________________________
-> maritl = separated
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 218 11551.29 15987.42 0 197387
_______________________________________________________________________________
-> maritl = never married
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 4677 12150.34 13586.76 0 197387
. tabulate
varlist required
r(100);
. tabulate race
p25 | Freq. Percent Cum.
------------+-----------------------------------
White | 113475 84.87 84.87
Black | 13626 10.19 95.06
Amer Indian | 1894 1.42 96.47
Asian | 4715 3.53 100.00
------------+-----------------------------------
Total | 133710 100.00
. tabulate race, nolab
p25 | Freq. Percent Cum.
------------+-----------------------------------
1 | 113475 84.87 84.87
2 | 13626 10.19 95.06
3 | 1894 1.42 96.47
4 | 4715 3.53 100.00
------------+-----------------------------------
Total | 133710 100.00
. by maritl: summarize ernval2 if sex==2 & age>19&age<30 & race==1
_______________________________________________________________________________
-> maritl = married, spouse present
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 2970 13118.6 17190.29 0 333564
_______________________________________________________________________________
-> maritl = married, AF spouse present
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 101 9073.574 9674.529 0 42000
_______________________________________________________________________________
-> maritl = married, spouse absent
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 80 11818.01 14154.56 0 75000
_______________________________________________________________________________
-> maritl = widowed
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 7 11685.71 6901.07 0 20000
_______________________________________________________________________________
-> maritl = divorced
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 307 14865.68 13300.78 0 100005
_______________________________________________________________________________
-> maritl = separated
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 188 11744.61 16739.01 0 197387
_______________________________________________________________________________
-> maritl = never married
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 3601 12536.76 13949.21 0 197387
. gen agecat=0
. replace agecat=1 if age>19 & age<30
(17159 real changes made)
. replace agecat=2 if age>29 & age<40
(20358 real changes made)
. replace agecat=3 if age>39 & age<50
(20255 real changes made)
. label define age_label 0 "young and old" 1 "20s" 2 "30s" 3 "40s"
. label values agecat age_label
. sort agecat sex
. by agecat sex: summarize ernval2 if race==1
_______________________________________________________________________________
-> agecat = young and old, sex = male
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 31294 11823.5 29732.65 0 362302
_______________________________________________________________________________
-> agecat = young and old, sex = female
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 33243 5145.573 13979.47 0 333564
_______________________________________________________________________________
-> agecat = 20s, sex = male
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 7090 19363.54 18809.32 0 229339
_______________________________________________________________________________
-> agecat = 20s, sex = female
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 7254 12796.05 15369.92 0 333564
_______________________________________________________________________________
-> agecat = 30s, sex = male
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 8575 36743.18 33627.08 0 362302
_______________________________________________________________________________
-> agecat = 30s, sex = female
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 8723 18508.68 21108.63 0 333564
_______________________________________________________________________________
-> agecat = 40s, sex = male
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 8498 43033.23 41037.98 0 362302
_______________________________________________________________________________
-> agecat = 40s, sex = female
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 8798 21434.34 23802.78 0 333564
. by agecat sex: summarize ernval2 if race==1 if agecat~=0
_______________________________________________________________________________
-> agecat = young and old, sex = male
invalid syntax
r(198);
. by agecat sex: summarize ernval2 if race==1 & agecat~=0
_______________________________________________________________________________
-> agecat = young and old, sex = male
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 0
_______________________________________________________________________________
-> agecat = young and old, sex = female
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 0
_______________________________________________________________________________
-> agecat = 20s, sex = male
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 7090 19363.54 18809.32 0 229339
_______________________________________________________________________________
-> agecat = 20s, sex = female
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 7254 12796.05 15369.92 0 333564
_______________________________________________________________________________
-> agecat = 30s, sex = male
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 8575 36743.18 33627.08 0 362302
_______________________________________________________________________________
-> agecat = 30s, sex = female
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 8723 18508.68 21108.63 0 333564
_______________________________________________________________________________
-> agecat = 40s, sex = male
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 8498 43033.23 41037.98 0 362302
_______________________________________________________________________________
-> agecat = 40s, sex = female
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 8798 21434.34 23802.78 0 333564
. by sex agecat: summarize ernval2 if race==1 & agecat~=0
not sorted
r(5);
. sort sex agecat
. by sex agecat: summarize ernval2 if race==1 & agecat~=0
_______________________________________________________________________________
-> sex = male, agecat = young and old
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 0
_______________________________________________________________________________
-> sex = male, agecat = 20s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 7090 19363.54 18809.32 0 229339
_______________________________________________________________________________
-> sex = male, agecat = 30s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 8575 36743.18 33627.08 0 362302
_______________________________________________________________________________
-> sex = male, agecat = 40s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 8498 43033.23 41037.98 0 362302
_______________________________________________________________________________
-> sex = female, agecat = young and old
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 0
_______________________________________________________________________________
-> sex = female, agecat = 20s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 7254 12796.05 15369.92 0 333564
_______________________________________________________________________________
-> sex = female, agecat = 30s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 8723 18508.68 21108.63 0 333564
_______________________________________________________________________________
-> sex = female, agecat = 40s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 8798 21434.34 23802.78 0 333564
. sort maritl sex agecat
. by maritl sex agecat: summarize ernval2 if race==1 & agecat~=0
_______________________________________________________________________________
-> maritl = married, spouse present, sex = male, agecat = young and old
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 0
_______________________________________________________________________________
-> maritl = married, spouse present, sex = male, agecat = 20s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 2203 26294.58 20523.37 0 229339
_______________________________________________________________________________
-> maritl = married, spouse present, sex = male, agecat = 30s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 5580 41007.61 35231.48 0 362302
_______________________________________________________________________________
-> maritl = married, spouse present, sex = male, agecat = 40s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 6101 47686.6 43124.78 0 362302
_______________________________________________________________________________
-> maritl = married, spouse present, sex = female, agecat = young and old
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 0
_______________________________________________________________________________
-> maritl = married, spouse present, sex = female, agecat = 20s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 2970 13118.6 17190.29 0 333564
_______________________________________________________________________________
-> maritl = married, spouse present, sex = female, agecat = 30s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 5917 17469.42 20902.9 0 333564
_______________________________________________________________________________
-> maritl = married, spouse present, sex = female, agecat = 40s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 6144 20684.99 24111.76 0 284133
_______________________________________________________________________________
-> maritl = married, AF spouse present, sex = male, agecat = young and old
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 0
_______________________________________________________________________________
-> maritl = married, AF spouse present, sex = male, agecat = 20s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 8 26525 14594.69 4200 42000
_______________________________________________________________________________
-> maritl = married, AF spouse present, sex = male, agecat = 30s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 7 20571.43 18201.26 0 57000
_______________________________________________________________________________
-> maritl = married, AF spouse present, sex = male, agecat = 40s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 4 48618 27770.3 21600 75000
_______________________________________________________________________________
-> maritl = married, AF spouse present, sex = female, agecat = young and old
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 0
_______________________________________________________________________________
-> maritl = married, AF spouse present, sex = female, agecat = 20s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 101 9073.574 9674.529 0 42000
_______________________________________________________________________________
-> maritl = married, AF spouse present, sex = female, agecat = 30s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 102 10783.88 13342.11 0 69000
_______________________________________________________________________________
-> maritl = married, AF spouse present, sex = female, agecat = 40s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 43 13732.23 19976.24 0 79000
_______________________________________________________________________________
-> maritl = married, spouse absent, sex = male, agecat = young and old
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 0
_______________________________________________________________________________
-> maritl = married, spouse absent, sex = male, agecat = 20s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 97 14569.03 11074.17 0 57000
_______________________________________________________________________________
-> maritl = married, spouse absent, sex = male, agecat = 30s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 130 27592.39 39780.03 0 362302
_______________________________________________________________________________
-> maritl = married, spouse absent, sex = male, agecat = 40s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 118 26595.35 22128.19 0 140000
_______________________________________________________________________________
-> maritl = married, spouse absent, sex = female, agecat = young and old
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 0
_______________________________________________________________________________
-> maritl = married, spouse absent, sex = female, agecat = 20s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 80 11818.01 14154.56 0 75000
_______________________________________________________________________________
-> maritl = married, spouse absent, sex = female, agecat = 30s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 97 20005.24 21264.07 0 120005
_______________________________________________________________________________
-> maritl = married, spouse absent, sex = female, agecat = 40s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 106 21588.24 23270.3 0 127888
_______________________________________________________________________________
-> maritl = widowed, sex = male, agecat = young and old
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 0
_______________________________________________________________________________
-> maritl = widowed, sex = male, agecat = 20s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 3 29333.33 31722.76 0 63000
_______________________________________________________________________________
-> maritl = widowed, sex = male, agecat = 30s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 22 31677.27 24073.32 0 95000
_______________________________________________________________________________
-> maritl = widowed, sex = male, agecat = 40s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 37 30114.57 25843.14 0 100000
_______________________________________________________________________________
-> maritl = widowed, sex = female, agecat = young and old
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 0
_______________________________________________________________________________
-> maritl = widowed, sex = female, agecat = 20s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 7 11685.71 6901.07 0 20000
_______________________________________________________________________________
-> maritl = widowed, sex = female, agecat = 30s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 81 12420.89 13783.08 0 57000
_______________________________________________________________________________
-> maritl = widowed, sex = female, agecat = 40s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 182 16872.57 19714.99 0 119652
_______________________________________________________________________________
-> maritl = divorced, sex = male, agecat = young and old
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 0
_______________________________________________________________________________
-> maritl = divorced, sex = male, agecat = 20s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 185 23990.61 21877.82 0 229339
_______________________________________________________________________________
-> maritl = divorced, sex = male, agecat = 30s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 807 31617.56 27817.45 0 229339
_______________________________________________________________________________
-> maritl = divorced, sex = male, agecat = 40s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 1125 34084.67 34999.11 0 362302
_______________________________________________________________________________
-> maritl = divorced, sex = female, agecat = young and old
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 0
_______________________________________________________________________________
-> maritl = divorced, sex = female, agecat = 20s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 307 14865.68 13300.78 0 100005
_______________________________________________________________________________
-> maritl = divorced, sex = female, agecat = 30s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 979 21068.21 20671.84 0 197387
_______________________________________________________________________________
-> maritl = divorced, sex = female, agecat = 40s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 1367 23749.74 22245.65 0 333564
_______________________________________________________________________________
-> maritl = separated, sex = male, agecat = young and old
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 0
_______________________________________________________________________________
-> maritl = separated, sex = male, agecat = 20s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 85 20819.32 17111.45 0 75000
_______________________________________________________________________________
-> maritl = separated, sex = male, agecat = 30s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 144 26695.02 21086.23 0 125000
_______________________________________________________________________________
-> maritl = separated, sex = male, agecat = 40s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 163 33543.81 36939.14 0 229339
_______________________________________________________________________________
-> maritl = separated, sex = female, agecat = young and old
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 0
_______________________________________________________________________________
-> maritl = separated, sex = female, agecat = 20s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 188 11744.61 16739.01 0 197387
_______________________________________________________________________________
-> maritl = separated, sex = female, agecat = 30s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 264 14405.8 17827.71 0 197387
_______________________________________________________________________________
-> maritl = separated, sex = female, agecat = 40s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 232 18202.89 26860.14 0 333564
_______________________________________________________________________________
-> maritl = never married, sex = male, agecat = young and old
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 0
_______________________________________________________________________________
-> maritl = never married, sex = male, agecat = 20s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 4509 15843.7 16875.53 0 229339
_______________________________________________________________________________
-> maritl = never married, sex = male, agecat = 30s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 1885 27831.8 28817.68 0 244805
_______________________________________________________________________________
-> maritl = never married, sex = male, agecat = 40s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 950 27895.29 28874.1 0 229339
_______________________________________________________________________________
-> maritl = never married, sex = female, agecat = young and old
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 0
_______________________________________________________________________________
-> maritl = never married, sex = female, agecat = 20s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 3601 12536.76 13949.21 0 197387
_______________________________________________________________________________
-> maritl = never married, sex = female, agecat = 30s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 1283 23078.15 22860.47 0 197387
_______________________________________________________________________________
-> maritl = never married, sex = female, agecat = 40s
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
ernval2 | 724 26038.81 23261.97 0 197387
. tabulate age agecat
| agecat
p15 | young and 20s 30s 40s | Total
-----------+--------------------------------------------+----------
0 | 1713 0 0 0 | 1713
1 | 1932 0 0 0 | 1932
2 | 1950 0 0 0 | 1950
3 | 1939 0 0 0 | 1939
4 | 1965 0 0 0 | 1965
5 | 1998 0 0 0 | 1998
6 | 2059 0 0 0 | 2059
7 | 2176 0 0 0 | 2176
8 | 2163 0 0 0 | 2163
9 | 2243 0 0 0 | 2243
10 | 2202 0 0 0 | 2202
11 | 2083 0 0 0 | 2083
12 | 2035 0 0 0 | 2035
13 | 2047 0 0 0 | 2047
14 | 1979 0 0 0 | 1979
15 | 2046 0 0 0 | 2046
16 | 1965 0 0 0 | 1965
17 | 1998 0 0 0 | 1998
18 | 1847 0 0 0 | 1847
19 | 1826 0 0 0 | 1826
20 | 0 1722 0 0 | 1722
21 | 0 1687 0 0 | 1687
22 | 0 1638 0 0 | 1638
23 | 0 1622 0 0 | 1622
24 | 0 1662 0 0 | 1662
25 | 0 1666 0 0 | 1666
26 | 0 1640 0 0 | 1640
27 | 0 1726 0 0 | 1726
28 | 0 1801 0 0 | 1801
29 | 0 1995 0 0 | 1995
30 | 0 0 1907 0 | 1907
31 | 0 0 1991 0 | 1991
32 | 0 0 1890 0 | 1890
33 | 0 0 1898 0 | 1898
34 | 0 0 2024 0 | 2024
35 | 0 0 2134 0 | 2134
36 | 0 0 2123 0 | 2123
37 | 0 0 2099 0 | 2099
38 | 0 0 2064 0 | 2064
39 | 0 0 2228 0 | 2228
40 | 0 0 0 2190 | 2190
41 | 0 0 0 2115 | 2115
42 | 0 0 0 2137 | 2137
43 | 0 0 0 2091 | 2091
44 | 0 0 0 2114 | 2114
45 | 0 0 0 2118 | 2118
46 | 0 0 0 1939 | 1939
47 | 0 0 0 1957 | 1957
48 | 0 0 0 1827 | 1827
49 | 0 0 0 1767 | 1767
50 | 1865 0 0 0 | 1865
51 | 1802 0 0 0 | 1802
52 | 1825 0 0 0 | 1825
53 | 1695 0 0 0 | 1695
54 | 1301 0 0 0 | 1301
55 | 1323 0 0 0 | 1323
56 | 1324 0 0 0 | 1324
57 | 1304 0 0 0 | 1304
58 | 1128 0 0 0 | 1128
59 | 1129 0 0 0 | 1129
60 | 1154 0 0 0 | 1154
61 | 1051 0 0 0 | 1051
62 | 1073 0 0 0 | 1073
63 | 938 0 0 0 | 938
64 | 952 0 0 0 | 952
65 | 1014 0 0 0 | 1014
66 | 869 0 0 0 | 869
67 | 926 0 0 0 | 926
68 | 908 0 0 0 | 908
69 | 904 0 0 0 | 904
70 | 913 0 0 0 | 913
71 | 885 0 0 0 | 885
72 | 770 0 0 0 | 770
73 | 797 0 0 0 | 797
74 | 814 0 0 0 | 814
75 | 796 0 0 0 | 796
76 | 704 0 0 0 | 704
77 | 646 0 0 0 | 646
78 | 687 0 0 0 | 687
79 | 602 0 0 0 | 602
80 | 514 0 0 0 | 514
81 | 476 0 0 0 | 476
82 | 425 0 0 0 | 425
83 | 427 0 0 0 | 427
84 | 325 0 0 0 | 325
85 | 306 0 0 0 | 306
86 | 248 0 0 0 | 248
87 | 209 0 0 0 | 209
88 | 172 0 0 0 | 172
89 | 155 0 0 0 | 155
90 | 416 0 0 0 | 416
-----------+--------------------------------------------+----------
Total | 75938 17159 20358 20255 | 133710
. *It's always a good idea to cross tabulate your new variables with the old va
> riables.
. summarize grswk if grswk>0
Variable | Obs Mean Std. Dev. Min Max
-------------+-----------------------------------------------------
grswk | 13422 601.9655 461.0122 1 2885
. 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
. *let's see about isolating LA
. generate LA=0
. replace LA=1 if hgmsac==49
(0 real changes made)
. browse
. *OK, the msa variable seems to have big rather than small numbers, so let's t
> ry this:
. replace LA=1 if hgmsac==4480
(5612 real changes made)
. tabulate LA [fweight=wgt2]
LA | Freq. Percent Cum.
------------+-----------------------------------
0 | 263845726 96.56 96.56
1 | 9388095 3.44 100.00
------------+-----------------------------------
Total | 273233821 100.00
. *That seems about right.
. exit, clear