econ, keep the project (HW3)
name: <unnamed>
log: /Users/NONAME/Desktop/Eco 490/DATA_2.txt
log type: text
opened on: 13 Mar 2017, 15:37:22
. ********************************************;
. /*bring in the data*/
> ********************************************;
. use DATA_2.dta, clear;
. /*bring in thr stata data set*/
>
> ********************************************;
. gen age1529= Age1519+Age2024+Age2529;
. gen age3054= Age3034+Age3539+Age4044+Age4549+Age5054;
. gen age5569= Age5559+Age6064+Age6569;
. gen totalcrime= ViolentCrimes + PropertyCrimes;
. **********************************************;
. summarize;
Variable | Obs Mean Std. Dev. Min Max
-------------+---------------------------------------------------------
State | 0
Year | 350 2012 2.002863 2009 2015
ViolentCri~s | 350 360.6469 135.5629 99.3 730.2
PropertyCr~s | 350 2746.115 599.2977 1406.6 4015.3
RealGDP | 350 46925.79 8955.848 31169 73464
-------------+---------------------------------------------------------
MedianInco~s | 350 52847.16 8646.483 36796 74551
socialwelf~e | 0
Unemployme~e | 350 .1034743 .4531606 .029 8.55
White | 350 .8020629 .1157772 .269 .972
Black | 350 .1111743 .0954121 .006 .38
-------------+---------------------------------------------------------
Asian | 350 .04538 .0765542 .006 .573
Age59 | 350 .0654114 .0058252 .053 .089
Age1014 | 350 .0662429 .0045623 .057 .086
Age1519 | 350 .0701257 .0038026 .057 .082
Age2024 | 350 .0712 .0054683 .06 .101
-------------+---------------------------------------------------------
Age2529 | 350 .0675114 .0053805 .054 .085
Age3034 | 350 .0641286 .0046957 .054 .079
Age3539 | 350 .0635543 .0043941 .053 .076
Age4044 | 350 .0671514 .0049435 .054 .081
Age4549 | 350 .0715771 .0056201 .052 .088
-------------+---------------------------------------------------------
Age5054 | 350 .07226 .0048753 .053 .086
Age5559 | 350 .0655543 .0054815 .046 .081
Age6064 | 350 .0556514 .0060113 .035 .073
Age6569 | 350 .0417543 .0055688 .025 .058
age1529 | 350 .2088371 .0112244 .18 .261
-------------+---------------------------------------------------------
age3054 | 350 .3386714 .0139866 .306 .372
age5569 | 350 .16296 .0158842 .107 .212
totalcrime | 350 3106.761 682.8134 1524.6 4584.4
. sort State;
. encode State, gen(state_id);
. ********************************************;
. reg totalcrime MedianIncomedollars UnemploymentRate Black Asian White age1529 ag
> e3054 age5569 i.state_id i.Year, cluster(state_id);
Linear regression Number of obs = 350
F(13, 49) = .
Prob > F = .
R-squared = 0.9572
Root MSE = 156.04
(Std. Err. adjusted for 50 clusters in state_id)
---------------------------------------------------------------------------------
| Robust
totalcrime | Coef. Std. Err. t P>|t| [95% Conf. Interval]
----------------+----------------------------------------------------------------
MedianIncomed~s | .0340017 .0234119 1.45 0.153 -.0130463 .0810497
UnemploymentR~e | -16.65119 6.532601 -2.55 0.014 -29.77895 -3.523439
Black | -7538.481 6862.106 -1.10 0.277 -21328.4 6251.438
Asian | 1008.834 3081.123 0.33 0.745 -5182.915 7200.582
White | -2280.641 3716.126 -0.61 0.542 -9748.476 5187.194
age1529 | -14592.82 10139.17 -1.44 0.156 -34968.24 5782.606
age3054 | -19134.05 13572.59 -1.41 0.165 -46409.2 8141.097
age5569 | -28413.45 13913.67 -2.04 0.047 -56374.02 -452.872
|
state_id |
AL | 2794.649 1538.68 1.82 0.075 -297.4435 5886.742
AR | 2248.422 1125.901 2.00 0.051 -14.16128 4511.005
AZ | 598.7513 758.2609 0.79 0.434 -925.0311 2122.534
CA | -579.7617 634.9361 -0.91 0.366 -1855.713 696.1901
CO | 187.8131 583.7503 0.32 0.749 -985.2769 1360.903
CT | -474.2807 592.3469 -0.80 0.427 -1664.646 716.085
DE | 1898.41 1223.831 1.55 0.127 -560.9707 4357.791
FL | 1993.176 1034.39 1.93 0.060 -85.50872 4071.862
GA | 2557.042 1773.505 1.44 0.156 -1006.95 6121.033
HI | -1253.556 2876.414 -0.44 0.665 -7033.926 4526.814
IA | -409.3219 986.5208 -0.41 0.680 -2391.81 1573.166
ID | -1006.504 1142.367 -0.88 0.383 -3302.177 1289.17
IL | 372.744 787.5858 0.47 0.638 -1209.969 1955.457
IN | 925.7748 889.8455 1.04 0.303 -862.4367 2713.986
KS | 475.1278 888.9522 0.53 0.595 -1311.289 2261.544
KY | 780.3001 968.7744 0.81 0.424 -1166.525 2727.125
LA | 3184.109 1855.204 1.72 0.092 -544.0622 6912.281
MA | -283.4806 433.1931 -0.65 0.516 -1154.015 587.0535
MD | 1375.839 1776.42 0.77 0.442 -2194.012 4945.69
ME | 442.6504 1001.804 0.44 0.661 -1570.551 2455.852
MI | 1001.311 930.3432 1.08 0.287 -868.2832 2870.906
MN | -227.2924 639.3889 -0.36 0.724 -1512.192 1057.608
MO | 1556.673 936.0286 1.66 0.103 -324.3469 3437.693
MS | 2552.188 2192.992 1.16 0.250 -1854.795 6959.172
MT | 441.704 988.3052 0.45 0.657 -1544.37 2427.778
NC | 2114.997 1256.159 1.68 0.099 -409.3493 4639.343
ND | -751.4756 990.9015 -0.76 0.452 -2742.767 1239.815
NE | -103.8784 942.8834 -0.11 0.913 -1998.674 1790.917
NH | -205.2689 796.8403 -0.26 0.798 -1806.58 1396.042
NJ | -765.1607 765.9823 -1.00 0.323 -2304.46 774.1383
NM | 1148.722 829.2741 1.39 0.172 -517.7666 2815.211
NV | 712.1197 519.6412 1.37 0.177 -332.1385 1756.378
NY | -119.1532 841.3721 -0.14 0.888 -1809.954 1571.647
OH | 1368.827 948.2172 1.44 0.155 -536.6867 3274.341
OK | 1129.498 832.9005 1.36 0.181 -544.2786 2803.274
OR | 798.6929 725.3156 1.10 0.276 -658.8834 2256.269
PA | 272.5283 802.3861 0.34 0.736 -1339.927 1884.984
RI | 153.8444 555.9359 0.28 0.783 -963.3505 1271.039
SC | 3364.736 1617.108 2.08 0.043 115.0354 6614.437
SD | -1034.4 983.5772 -1.05 0.298 -3010.972 942.1725
TN | 2469.649 1078.489 2.29 0.026 302.3432 4636.954
TX | 955.9831 785.6349 1.22 0.229 -622.8094 2534.776
UT | -1136.217 1253.265 -0.91 0.369 -3654.748 1382.315
VA | 302.2839 1073.744 0.28 0.779 -1855.485 2460.052
VT | 196.5911 950.5993 0.21 0.837 -1713.71 2106.892
WA | 1059.793 364.0418 2.91 0.005 328.2237 1791.362
WI | 84.49974 777.1804 0.11 0.914 -1477.303 1646.302
WV | 817.2512 1094.294 0.75 0.459 -1381.815 3016.317
WY | -342.9281 882.9862 -0.39 0.699 -2117.355 1431.499
|
Year |
2010 | 81.0415 93.55354 0.87 0.391 -106.9614 269.0444
2011 | 78.12737 124.406 0.63 0.533 -171.8758 328.1305
2012 | 96.95096 161.8911 0.60 0.552 -228.3813 422.2832
2013 | 28.32709 202.8177 0.14 0.889 -379.2504 435.9045
2014 | -115.1868 237.6458 -0.48 0.630 -592.7539 362.3803
2015 | -161.8455 280.0034 -0.58 0.566 -724.5333 400.8423
|
_cons | 17417.11 9502.774 1.83 0.073 -1679.43 36513.65
---------------------------------------------------------------------------------
. outreg2 using replication2.xls, alpha(0.01,0.05,0.10) excel bd(3) bf(f) stats(
> coef se) rd(3) bra ctitle(clusterSE) replace;
~/Library/Application Support/Stata/ado/plus/o/outreg2.ado
replication2.xls
dir : seeout
. *******************************************************;
. /*ending*/