------------------------------------------------------------------------------- log: /disk/admin/homes/web/html/data/census-intercensal-population/pop7 > 099s.log log type: text opened on: 28 Apr 2006, 18:07:13 . . /* This program reads the Census files from Steve Pischke, combines them, > and adds a new "state2" variable with a uniform 2 letter abbreviation. > There is probably a recode statement in stata that could do this more > easily, however the plain "recode" command is numeric only. > > DRF > > http://www.nber.org/data/census-intercensal-population > > */ . set memory 100m (102400k) . use pop70s (Intercensal Est. of the Resident Pop. of States 1970-79, source P-25 No. 998) . append using pop80s . append using pop90s state was str2 now str20 . label data "US Intercensal Est of Res Pop by State 1970-2000. P-25 #998,1106, > +99-10,99-19" . . gen state2 = "AL" if fips == 1 (97500 missing values generated) . replace state2 = "AK" if fips == 2 (1950 real changes made) . replace state2 = "AZ" if fips == 4 (1950 real changes made) . replace state2 = "AR" if fips == 5 (1950 real changes made) . replace state2 = "CA" if fips == 6 (1950 real changes made) . replace state2 = "CO" if fips == 8 (1950 real changes made) . replace state2 = "CT" if fips == 9 (1950 real changes made) . replace state2 = "DE" if fips == 10 (1950 real changes made) . replace state2 = "DC" if fips == 11 (1950 real changes made) . replace state2 = "FL" if fips == 12 (1950 real changes made) . replace state2 = "GA" if fips == 13 (1950 real changes made) . replace state2 = "HI" if fips == 15 (1950 real changes made) . replace state2 = "ID" if fips == 16 (1950 real changes made) . replace state2 = "IL" if fips == 17 (1950 real changes made) . replace state2 = "IN" if fips == 18 (1950 real changes made) . replace state2 = "IA" if fips == 19 (1950 real changes made) . replace state2 = "KS" if fips == 20 (1950 real changes made) . replace state2 = "KY" if fips == 21 (1950 real changes made) . replace state2 = "LA" if fips == 22 (1950 real changes made) . replace state2 = "ME" if fips == 23 (1950 real changes made) . replace state2 = "MD" if fips == 24 (1950 real changes made) . replace state2 = "MA" if fips == 25 (1950 real changes made) . replace state2 = "MI" if fips == 26 (1950 real changes made) . replace state2 = "MN" if fips == 27 (1950 real changes made) . replace state2 = "MS" if fips == 28 (1950 real changes made) . replace state2 = "MO" if fips == 29 (1950 real changes made) . replace state2 = "MT" if fips == 30 (1950 real changes made) . replace state2 = "NE" if fips == 31 (1950 real changes made) . replace state2 = "NV" if fips == 32 (1950 real changes made) . replace state2 = "NH" if fips == 33 (1950 real changes made) . replace state2 = "NJ" if fips == 34 (1950 real changes made) . replace state2 = "NM" if fips == 35 (1950 real changes made) . replace state2 = "NY" if fips == 36 (1950 real changes made) . replace state2 = "NC" if fips == 37 (1950 real changes made) . replace state2 = "ND" if fips == 38 (1950 real changes made) . replace state2 = "OH" if fips == 39 (1950 real changes made) . replace state2 = "OK" if fips == 40 (1950 real changes made) . replace state2 = "OR" if fips == 41 (1950 real changes made) . replace state2 = "PA" if fips == 42 (1950 real changes made) . replace state2 = "RI" if fips == 44 (1950 real changes made) . replace state2 = "SC" if fips == 45 (1950 real changes made) . replace state2 = "SD" if fips == 46 (1950 real changes made) . replace state2 = "TN" if fips == 47 (1950 real changes made) . replace state2 = "TX" if fips == 48 (1950 real changes made) . replace state2 = "UT" if fips == 49 (1950 real changes made) . replace state2 = "VT" if fips == 50 (1950 real changes made) . replace state2 = "VA" if fips == 51 (1950 real changes made) . replace state2 = "WA" if fips == 53 (1950 real changes made) . replace state2 = "WV" if fips == 54 (1950 real changes made) . replace state2 = "WI" if fips == 55 (1950 real changes made) . replace state2 = "WY" if fips == 56, (1950 real changes made) . . summarize Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- fips | 99450 28.96078 15.67691 1 56 agegr | 0 year | 99450 1987.731 7.328718 1970 1999 state | 0 pop | 99450 71661.22 132888.3 110 3500835 -------------+-------------------------------------------------------- age | 87720 42.5 24.82452 0 85 popm | 87720 27684.08 35506.3 48 319478 popf | 87720 29123.33 35192.58 62 297046 state2 | 0 . tab agegr agegr | Freq. Percent Cum. ------------+----------------------------------- 0-2 | 510 4.35 4.35 14 | 510 4.35 8.70 15 | 510 4.35 13.04 16 | 510 4.35 17.39 17 | 510 4.35 21.74 18 | 510 4.35 26.09 19 | 510 4.35 30.43 20 | 510 4.35 34.78 21 | 510 4.35 39.13 22 | 510 4.35 43.48 23 | 510 4.35 47.83 24 | 510 4.35 52.17 25-29 | 510 4.35 56.52 3-4 | 510 4.35 60.87 30-34 | 510 4.35 65.22 35-44 | 510 4.35 69.57 45-54 | 510 4.35 73.91 5-13 | 510 4.35 78.26 55-59 | 510 4.35 82.61 60-61 | 510 4.35 86.96 62-64F | 510 4.35 91.30 62-64M | 510 4.35 95.65 65+ | 510 4.35 100.00 ------------+----------------------------------- Total | 11,730 100.00 . tab state2 state2 | Freq. Percent Cum. ------------+----------------------------------- AK | 1,950 1.96 1.96 AL | 1,950 1.96 3.92 AR | 1,950 1.96 5.88 AZ | 1,950 1.96 7.84 CA | 1,950 1.96 9.80 CO | 1,950 1.96 11.76 CT | 1,950 1.96 13.73 DC | 1,950 1.96 15.69 DE | 1,950 1.96 17.65 FL | 1,950 1.96 19.61 GA | 1,950 1.96 21.57 HI | 1,950 1.96 23.53 IA | 1,950 1.96 25.49 ID | 1,950 1.96 27.45 IL | 1,950 1.96 29.41 IN | 1,950 1.96 31.37 KS | 1,950 1.96 33.33 KY | 1,950 1.96 35.29 LA | 1,950 1.96 37.25 MA | 1,950 1.96 39.22 MD | 1,950 1.96 41.18 ME | 1,950 1.96 43.14 MI | 1,950 1.96 45.10 MN | 1,950 1.96 47.06 MO | 1,950 1.96 49.02 MS | 1,950 1.96 50.98 MT | 1,950 1.96 52.94 NC | 1,950 1.96 54.90 ND | 1,950 1.96 56.86 NE | 1,950 1.96 58.82 NH | 1,950 1.96 60.78 NJ | 1,950 1.96 62.75 NM | 1,950 1.96 64.71 NV | 1,950 1.96 66.67 NY | 1,950 1.96 68.63 OH | 1,950 1.96 70.59 OK | 1,950 1.96 72.55 OR | 1,950 1.96 74.51 PA | 1,950 1.96 76.47 RI | 1,950 1.96 78.43 SC | 1,950 1.96 80.39 SD | 1,950 1.96 82.35 TN | 1,950 1.96 84.31 TX | 1,950 1.96 86.27 UT | 1,950 1.96 88.24 VA | 1,950 1.96 90.20 VT | 1,950 1.96 92.16 WA | 1,950 1.96 94.12 WI | 1,950 1.96 96.08 WV | 1,950 1.96 98.04 WY | 1,950 1.96 100.00 ------------+----------------------------------- Total | 99,450 100.00 . . sort year state . table year, c( sum pop) f(%12.0) invalid %format r(120); end of do-file r(120); . table year,c(sum pop) f( ) required r(100); . exit,clear