------------------------------------------------------------------------------------------------------------------------- log: c:\drive\econ272\econ_771_February_21_2008.log log type: text opened on: 21 Feb 2008, 09:30:31 . use "C:\drive\econ170\simul_ex.dta", clear . corr error_1 error_2 (obs=500) | error_1 error_2 -------------+------------------ error_1 | 1.0000 error_2 | 0.7989 1.0000 . y1 x1 unrecognized command: y1 r(199); . regress y1 x1 Source | SS df MS Number of obs = 500 -------------+------------------------------ F( 1, 498) = 2227.74 Model | 2112.01778 1 2112.01778 Prob > F = 0.0000 Residual | 472.130586 498 .948053385 R-squared = 0.8173 -------------+------------------------------ Adj R-squared = 0.8169 Total | 2584.14836 499 5.17865403 Root MSE = .97368 ------------------------------------------------------------------------------ y1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- x1 | 2.062998 .0437086 47.20 0.000 1.977122 2.148874 _cons | .4941903 .043561 11.34 0.000 .4086043 .5797763 ------------------------------------------------------------------------------ . drop v1 . predict v1,resid . regress y2 y1 x2 Source | SS df MS Number of obs = 500 -------------+------------------------------ F( 2, 497) = 5674.77 Model | 9476.33776 2 4738.16888 Prob > F = 0.0000 Residual | 414.97185 497 .83495342 R-squared = 0.9580 -------------+------------------------------ Adj R-squared = 0.9579 Total | 9891.30961 499 19.8222638 Root MSE = .91376 ------------------------------------------------------------------------------ y2 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- y1 | 1.742817 .0213054 81.80 0.000 1.700957 1.784677 x2 | .6619962 .048434 13.67 0.000 .5668355 .7571568 _cons | .6233788 .0423749 14.71 0.000 .5401227 .7066349 ------------------------------------------------------------------------------ . regress y2 y1 x2 v1 Source | SS df MS Number of obs = 500 -------------+------------------------------ F( 3, 496) = 8493.74 Model | 9702.44846 3 3234.14949 Prob > F = 0.0000 Residual | 188.861155 496 .380768458 R-squared = 0.9809 -------------+------------------------------ Adj R-squared = 0.9808 Total | 9891.30961 499 19.8222638 Root MSE = .61706 ------------------------------------------------------------------------------ y2 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- y1 | 1.521158 .0170218 89.37 0.000 1.487714 1.554601 x2 | .9666232 .0350152 27.61 0.000 .8978269 1.03542 v1 | .8194945 .0336292 24.37 0.000 .7534213 .8855676 _cons | .7389348 .0290062 25.48 0.000 .6819446 .795925 ------------------------------------------------------------------------------ . ivregress 2sls y2 (y1=x1) x2 Instrumental variables (2SLS) regression Number of obs = 500 Wald chi2(2) = 7228.41 Prob > chi2 = 0.0000 R-squared = 0.9502 Root MSE = .99271 ------------------------------------------------------------------------------ y2 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- y1 | 1.537202 .026833 57.29 0.000 1.48461 1.589793 x2 | .9129263 .0551651 16.55 0.000 .8048046 1.021048 _cons | .7312557 .046584 15.70 0.000 .6399527 .8225587 ------------------------------------------------------------------------------ Instrumented: y1 Instruments: x2 x1 . ivregress gmm y2 (y1=x1) x2 Instrumental variables (GMM) regression Number of obs = 500 Wald chi2(2) = 7091.44 Prob > chi2 = 0.0000 R-squared = 0.9502 GMM weight matrix: Robust Root MSE = .99271 ------------------------------------------------------------------------------ | Robust y2 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- y1 | 1.537202 .0265599 57.88 0.000 1.485145 1.589258 x2 | .9129263 .055889 16.33 0.000 .8033858 1.022467 _cons | .7312557 .0469317 15.58 0.000 .6392713 .8232402 ------------------------------------------------------------------------------ Instrumented: y1 Instruments: x2 x1 . estat overid no overidentifying restrictions r(498); . clear . use "C:\drive\econ170\final_simul_2004.dta", clear . regress consumption income lagged_consumption Source | SS df MS Number of obs = 21 -------------+------------------------------ F( 2, 18) = 267.31 Model | 910.764619 2 455.38231 Prob > F = 0.0000 Residual | 30.66477 18 1.70359834 R-squared = 0.9674 -------------+------------------------------ Adj R-squared = 0.9638 Total | 941.429389 20 47.0714695 Root MSE = 1.3052 ------------------------------------------------------------------------------ consumption | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- income | .8103063 .0925276 8.76 0.000 .6159131 1.004699 lagged_con~n | .1043732 .1070065 0.98 0.342 -.1204391 .3291854 _cons | 14.89592 2.686733 5.54 0.000 9.251298 20.54053 ------------------------------------------------------------------------------ . ivregress consumption (income= lag_capital government profit) lagged_consumption consumption not a valid estimator r(198); . ivregress 2sls consumption (income= lag_capital government profit) lagged_consumption Instrumental variables (2SLS) regression Number of obs = 21 Wald chi2(2) = 589.44 Prob > chi2 = 0.0000 R-squared = 0.9674 Root MSE = 1.2096 ------------------------------------------------------------------------------ consumption | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- income | .827706 .1103598 7.50 0.000 .6114048 1.044007 lagged_con~n | .0860879 .1231431 0.70 0.484 -.155268 .3274439 _cons | 15.13544 2.667226 5.67 0.000 9.90777 20.36311 ------------------------------------------------------------------------------ Instrumented: income Instruments: lagged_consumption lag_capital government profit . estat overid Tests of overidentifying restrictions: Sargan (score) chi2(2) = 14.4101 (p = 0.0007) Basmann chi2(2) = 34.9871 (p = 0.0000) . ivregress 2sls consumption (income= lag_capital government ) lagged_consumption profit Instrumental variables (2SLS) regression Number of obs = 21 Wald chi2(3) = 1040.09 Prob > chi2 = 0.0000 R-squared = 0.9811 Root MSE = .92119 ------------------------------------------------------------------------------ consumption | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- income | .4763836 .1106699 4.30 0.000 .2594746 .6932926 lagged_con~n | .3394955 .1072017 3.17 0.002 .129384 .5496071 profit | .3612293 .0740293 4.88 0.000 .2161344 .5063241 _cons | 10.28529 2.261449 4.55 0.000 5.852933 14.71765 ------------------------------------------------------------------------------ Instrumented: income Instruments: lagged_consumption profit lag_capital government . estatoverid unrecognized command: estatoverid r(199); . estat overid Tests of overidentifying restrictions: Sargan (score) chi2(1) = 1.03516 (p = 0.3089) Basmann chi2(1) = .82959 (p = 0.3624) . ex,clear