------------------------------------------------------------------------------- log: /afs/uncg.edu/html/bae/people/rosenbaum/643/lab3.log log type: text opened on: 23 Aug 2006, 22:24:56 . *********************************************************** > LAB3.DO is a STATA do-file that inputs data from > the 1997 March CPS, runs regressions, tests for and > corrects for heteroskedasticity and autocorrelation. > - written by Dan Rosenbaum, 2006 > > Located at my website course > (http://www.uncg.edu/bae/people/rosenbaum/Eco643/main.html) > is a file containing a 1 in 100 subsample of all persons > in the 1997 March CPS who are 25-54 and not in the armed > forces. The file is named cps97.raw and is stored > space-delimited ASCII. Here is a short description of > the variables in the order that they are found in the data. > > AGE = age in years > RACE = 1 if white > = 2 if black > = 3 if other > FEMALE = 1 if female, 0 otherwise > EDUCATT = 11 if high school dropout > = 12 if high school graduate > = 14 if some college > = 16 if bachelors degree > = 18 if masters degree or above > EARN = annual earnings in nominal dollars > WEEKS = total weeks worked last year > HOURS = total hours worked last year > NUMKID = number of children > MS = 1 if married with spouse present > = 2 if married but spouse absent > = 3 if separated > = 4 if divorced > = 5 if never married > = 6 if widowed > WGT = March Supplement Weight > YEAR = year (four digits) in July of previous year > STATE = state of residence, alphabetical order (1-51) > INSCHOOL = 1 if attending school, 0 otherwise > UR = state unemployment rate (in percentage points) > ***********************************************************; . *********************************************************** > I start by inputting the data using an INFILE statement, > since the data is space-delimited rather than tab-delimited. > I also calculate summary statistics for the sample. > ***********************************************************; . infile age race female educatt earn weeks hours numkid ms > wgt year state inschool ur using cps97; (560 observations read) . *********************************************************** > I rescale the annual earnings variable, so that the > coefficient estimates are easier to interpret. > ***********************************************************; . gen earn1=earn/1000; . sum; Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- age | 560 38.64286 8.130485 25 54 race | 560 1.194643 .5210831 1 3 female | 560 .55 .4979385 0 1 educatt | 560 13.73393 2.089823 11 18 earn | 560 26247.52 28289.89 0 171998.5 -------------+-------------------------------------------------------- weeks | 560 39.97321 20.04729 0 52 hours | 560 1663.879 963.6095 0 3952 numkid | 560 .9535714 1.195394 0 8 ms | 560 2.282143 1.705207 1 6 wgt | 560 2090.138 1010.363 222.61 6623.81 -------------+-------------------------------------------------------- year | 560 1996 0 1996 1996 state | 560 25.45893 14.30758 1 51 inschool | 560 .0125 .1112018 0 1 ur | 560 5.426429 1.131552 2.9 8.5 earn1 | 560 26.24752 28.2899 0 171.9985 . *********************************************************** > Here I regress annual earnings onto age and educational > attainment. I then calculate and plot the residuals. > It appears that the variance of the error term increases > with educational attainment. > ***********************************************************; . reg earn1 female age educatt; Source | SS df MS Number of obs = 560 -------------+------------------------------ F( 3, 556) = 61.42 Model | 111358.699 3 37119.5662 Prob > F = 0.0000 Residual | 336019.161 556 604.35101 R-squared = 0.2489 -------------+------------------------------ Adj R-squared = 0.2449 Total | 447377.86 559 800.318175 Root MSE = 24.584 ------------------------------------------------------------------------------ earn1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- female | -16.45497 2.088641 -7.88 0.000 -20.55756 -12.35238 age | .4267766 .1280957 3.33 0.001 .175166 .6783873 educatt | 5.206538 .4982619 10.45 0.000 4.227832 6.185244 _cons | -52.70034 8.354286 -6.31 0.000 -69.11016 -36.29052 ------------------------------------------------------------------------------ . predict uhat, resid; . plot uhat educatt; 157.593 + | * | | | | R | * * e | * * s | * i | d | * u | * * * a | * * * * * l | * * * * s | * * * * * | * * * * * | * * * * * | * * * * * | * * * * * | * * * * -53.6502 + * * +----------------------------------------------------------------+ 11 educatt 18 . *********************************************************** > YOU CAN IGNORE THIS! > Here I run the Goldfield/Quandt test. My high variance > group is those with 16 or more years of education and my > low variance group is those with 12 or fewer years of > education. Note how I use the DISP statement and > FPROB function to display the p-value for the F-statistic. > We reject the null hypothesis of homoskedasticity. > ***********************************************************; . reg earn1 female age educatt if educatt>=16; Source | SS df MS Number of obs = 153 -------------+------------------------------ F( 3, 149) = 11.57 Model | 43185.4373 3 14395.1458 Prob > F = 0.0000 Residual | 185326.265 149 1243.80044 R-squared = 0.1890 -------------+------------------------------ Adj R-squared = 0.1727 Total | 228511.703 152 1503.36646 Root MSE = 35.268 ------------------------------------------------------------------------------ earn1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- female | -27.89664 5.93939 -4.70 0.000 -39.63295 -16.16033 age | .4494362 .3480376 1.29 0.199 -.2382907 1.137163 educatt | 6.762781 3.175184 2.13 0.035 .4885757 13.03699 _cons | -72.2223 54.58872 -1.32 0.188 -180.0903 35.64573 ------------------------------------------------------------------------------ . reg earn1 female age educatt if educatt<=12; Source | SS df MS Number of obs = 240 -------------+------------------------------ F( 3, 236) = 16.65 Model | 11741.1607 3 3913.72023 Prob > F = 0.0000 Residual | 55476.0833 236 235.06815 R-squared = 0.1747 -------------+------------------------------ Adj R-squared = 0.1642 Total | 67217.244 239 281.243699 Root MSE = 15.332 ------------------------------------------------------------------------------ earn1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- female | -11.13099 1.99483 -5.58 0.000 -15.06094 -7.20104 age | .301219 .1233678 2.44 0.015 .0581761 .5442618 educatt | 8.952539 2.18898 4.09 0.000 4.640103 13.26498 _cons | -93.16117 26.23774 -3.55 0.000 -144.8513 -41.47107 ------------------------------------------------------------------------------ . disp fprob(149,236,1244/235); 4.336e-30 . *********************************************************** > YOU CAN IGNORE THIS! > Here I run the Breusch-Pagan test. Note that I create > "normalized" squared residuals. I compute the null > hypothesis uder the assumption that the errors in the > original model are normally distributed and not normally > distributed. The null hypothesis of homoskedasticity > is rejected in both cases. > ***********************************************************; . gen u2=uhat^2; . egen u2ave=mean(u2); . gen u2bp=u2/u2ave; . sum uhat u2 u2ave u2bp; Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- uhat | 560 4.12e-08 24.5175 -53.65021 157.5929 u2 | 560 600.0342 1867.681 .0044034 24835.51 u2ave | 560 600.0342 0 600.0342 600.0342 u2bp | 560 1 3.112624 7.34e-06 41.39016 . reg u2bp female age educatt; Source | SS df MS Number of obs = 560 -------------+------------------------------ F( 3, 556) = 13.38 Model | 364.788206 3 121.596069 Prob > F = 0.0000 Residual | 5051.04318 556 9.08461004 R-squared = 0.0674 -------------+------------------------------ Adj R-squared = 0.0623 Total | 5415.83139 559 9.68842824 Root MSE = 3.0141 ------------------------------------------------------------------------------ u2bp | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- female | -.4506849 .256078 -1.76 0.079 -.9536835 .0523136 age | .0244532 .0157052 1.56 0.120 -.0063956 .0553019 educatt | .3552007 .0610894 5.81 0.000 .2352063 .475195 _cons | -4.575364 1.024278 -4.47 0.000 -6.587291 -2.563436 ------------------------------------------------------------------------------ . predict u2bphat; (option xb assumed; fitted values) . disp chiprob(3,364.8/2); 2.674e-39 . disp chiprob(3,560*0.0674); 3.202e-08 . *********************************************************** > Here I run the White test. Again, the null hypothesis of > homoskedasticity is rejected. > ***********************************************************; . gen age2=age^2; . gen educatt2=educatt^2; . gen ageeduc=age*educatt; . gen fage=female*age; . gen feducatt=female*educatt; . sum age2 educatt2 ageeduc fage feducatt; Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- age2 | 560 1559.257 638.4793 625 2916 educatt2 | 560 192.9804 59.77074 121 324 ageeduc | 560 531.625 143.8582 275 972 fage | 560 21.3375 20.20933 0 54 feducatt | 560 7.560714 7.010845 0 18 . reg u2 female age age2 educatt educatt2 ageeduc fage feducatt; Source | SS df MS Number of obs = 560 -------------+------------------------------ F( 8, 551) = 7.45 Model | 190430698 8 23803837.2 Prob > F = 0.0000 Residual | 1.7595e+09 551 3193268.92 R-squared = 0.0977 -------------+------------------------------ Adj R-squared = 0.0846 Total | 1.9499e+09 559 3488232.33 Root MSE = 1787 ------------------------------------------------------------------------------ u2 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- female | 3011.399 1211.235 2.49 0.013 632.1972 5390.601 age | -59.50377 108.2292 -0.55 0.583 -272.096 153.0884 age2 | 1.128165 1.194856 0.94 0.345 -1.218866 3.475195 educatt | -684.0432 531.4733 -1.29 0.199 -1728.005 359.9184 educatt2 | 30.07406 17.88292 1.68 0.093 -5.052979 65.20111 ageeduc | 1.489583 4.46965 0.33 0.739 -7.290054 10.26922 fage | -68.85573 18.69297 -3.68 0.000 -105.5739 -32.13753 feducatt | -43.82015 72.93245 -0.60 0.548 -187.0798 99.4395 _cons | 4083.58 4526.388 0.90 0.367 -4807.506 12974.67 ------------------------------------------------------------------------------ . disp chiprob(8,560*0.0977); 5.022e-09 . *********************************************************** > Here I run GLS assuming that the variance of the error > term is a linear function of age. > Note the AWEIGHT=x option implies that the observations > are weighted by the square root of x. > ***********************************************************; . reg earn1 female age educatt [aweight=1/age]; (sum of wgt is 1.5176e+01) Source | SS df MS Number of obs = 560 -------------+------------------------------ F( 3, 556) = 57.68 Model | 99942.8325 3 33314.2775 Prob > F = 0.0000 Residual | 321110.44 556 577.536762 R-squared = 0.2374 -------------+------------------------------ Adj R-squared = 0.2332 Total | 421053.272 559 753.225889 Root MSE = 24.032 ------------------------------------------------------------------------------ earn1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- female | -14.88136 2.041052 -7.29 0.000 -18.89047 -10.87224 age | .4695499 .126889 3.70 0.000 .2203096 .7187902 educatt | 5.080008 .4956463 10.25 0.000 4.10644 6.053576 _cons | -53.48094 8.143832 -6.57 0.000 -69.47738 -37.48451 ------------------------------------------------------------------------------ . *********************************************************** > Here I run GLS assuming that the variance of the error > term is a linear function of educational attainment. > ***********************************************************; . reg earn1 female age educatt [aweight=1/educatt]; (sum of wgt is 4.1687e+01) Source | SS df MS Number of obs = 560 -------------+------------------------------ F( 3, 556) = 60.64 Model | 98595.2969 3 32865.099 Prob > F = 0.0000 Residual | 301323.793 556 541.949268 R-squared = 0.2465 -------------+------------------------------ Adj R-squared = 0.2425 Total | 399919.09 559 715.418765 Root MSE = 23.28 ------------------------------------------------------------------------------ earn1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- female | -15.56604 1.977766 -7.87 0.000 -19.45085 -11.68123 age | .4160264 .1211227 3.43 0.001 .1781125 .6539404 educatt | 5.1145 .4898261 10.44 0.000 4.152364 6.076636 _cons | -51.50979 8.058198 -6.39 0.000 -67.33802 -35.68156 ------------------------------------------------------------------------------ . *********************************************************** > Here I run GLS assuming that the variance of the error > term is a exponential function of an intercept, female, > age, and educational attainment. > ***********************************************************; . gen lnu2=log(u2); . reg lnu2 female age educatt; Source | SS df MS Number of obs = 560 -------------+------------------------------ F( 3, 556) = 20.77 Model | 326.431086 3 108.810362 Prob > F = 0.0000 Residual | 2912.68306 556 5.23863859 R-squared = 0.1008 -------------+------------------------------ Adj R-squared = 0.0959 Total | 3239.11414 559 5.79447968 Root MSE = 2.2888 ------------------------------------------------------------------------------ lnu2 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- female | -.5379671 .1944591 -2.77 0.006 -.9199314 -.1560028 age | .0451453 .0119261 3.79 0.000 .0217196 .0685711 educatt | .2871789 .0463898 6.19 0.000 .1960583 .3782995 _cons | -.87662 .7778108 -1.13 0.260 -2.404427 .6511869 ------------------------------------------------------------------------------ . predict lnu2hata; (option xb assumed; fitted values) . gen u2hata=exp(lnu2hata); . sum lnu2 lnu2hata u2 u2hata; Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- lnu2 | 560 4.516137 2.407173 -5.425373 10.12003 lnu2hata | 560 4.516137 .7641698 2.873014 6.685303 u2 | 560 600.0342 1867.681 .0044034 24835.51 u2hata | 560 125.9942 121.9383 17.69026 800.553 . reg earn1 female age educatt [aweight=1/u2hata]; (sum of wgt is 7.9135e+00) Source | SS df MS Number of obs = 560 -------------+------------------------------ F( 3, 556) = 42.60 Model | 46620.8294 3 15540.2765 Prob > F = 0.0000 Residual | 202820.862 556 364.785724 R-squared = 0.1869 -------------+------------------------------ Adj R-squared = 0.1825 Total | 249441.692 559 446.228429 Root MSE = 19.099 ------------------------------------------------------------------------------ earn1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- female | -11.58701 1.714216 -6.76 0.000 -14.95414 -8.219884 age | .3072257 .1046062 2.94 0.003 .1017541 .5126973 educatt | 4.360549 .491084 8.88 0.000 3.395942 5.325155 _cons | -40.03598 7.414312 -5.40 0.000 -54.59947 -25.47249 ------------------------------------------------------------------------------ . *********************************************************** > Here I run GLS assuming that the variance of the error > term is a exponential function of an intercept, the > predicted value of EARN1 and its square. > ***********************************************************; . reg earn1 female age educatt; Source | SS df MS Number of obs = 560 -------------+------------------------------ F( 3, 556) = 61.42 Model | 111358.699 3 37119.5662 Prob > F = 0.0000 Residual | 336019.161 556 604.35101 R-squared = 0.2489 -------------+------------------------------ Adj R-squared = 0.2449 Total | 447377.86 559 800.318175 Root MSE = 24.584 ------------------------------------------------------------------------------ earn1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- female | -16.45497 2.088641 -7.88 0.000 -20.55756 -12.35238 age | .4267766 .1280957 3.33 0.001 .175166 .6783873 educatt | 5.206538 .4982619 10.45 0.000 4.227832 6.185244 _cons | -52.70034 8.354286 -6.31 0.000 -69.11016 -36.29052 ------------------------------------------------------------------------------ . predict yhat; (option xb assumed; fitted values) . gen yhat2=yhat^2; . reg lnu2 yhat yhat2; Source | SS df MS Number of obs = 560 -------------+------------------------------ F( 2, 557) = 28.09 Model | 296.775874 2 148.387937 Prob > F = 0.0000 Residual | 2942.33827 557 5.28247445 R-squared = 0.0916 -------------+------------------------------ Adj R-squared = 0.0884 Total | 3239.11414 559 5.79447968 Root MSE = 2.2984 ------------------------------------------------------------------------------ lnu2 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- yhat | .074376 .0238073 3.12 0.002 .0276129 .1211392 yhat2 | -.0003983 .0003907 -1.02 0.308 -.0011656 .0003691 _cons | 2.917522 .3244644 8.99 0.000 2.280199 3.554846 ------------------------------------------------------------------------------ . predict lnu2hatb; (option xb assumed; fitted values) . gen u2hatb=exp(lnu2hatb); . sum lnu2 lnu2hatb u2 u2hatb; Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- lnu2 | 560 4.516137 2.407173 -5.425373 10.12003 lnu2hatb | 560 4.516137 .7286323 2.826645 6.037752 u2 | 560 600.0342 1867.681 .0044034 24835.51 u2hatb | 560 117.8904 86.30568 16.8887 418.95 . reg earn1 female age educatt [aweight=1/u2hatb]; (sum of wgt is 7.9544e+00) Source | SS df MS Number of obs = 560 -------------+------------------------------ F( 3, 556) = 48.19 Model | 52483.9246 3 17494.6415 Prob > F = 0.0000 Residual | 201866.716 556 363.069634 R-squared = 0.2063 -------------+------------------------------ Adj R-squared = 0.2021 Total | 254350.641 559 455.010091 Root MSE = 19.054 ------------------------------------------------------------------------------ earn1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- female | -12.77161 1.86795 -6.84 0.000 -16.44072 -9.10251 age | .2497331 .1011824 2.47 0.014 .0509867 .4484795 educatt | 4.464354 .4773457 9.35 0.000 3.526732 5.401975 _cons | -38.25087 7.310814 -5.23 0.000 -52.61107 -23.89068 ------------------------------------------------------------------------------ . *********************************************************** > Here I run GLS assuming that the variance of the error > term is a exponential function an intercept, the predicted > value of EARN1, and its square. > ***********************************************************; . gen earn1_t=earn1/sqrt(u2hatb); . gen int_t=1/sqrt(u2hatb); . gen age_t=age/sqrt(u2hatb); . gen educ_t=educatt/sqrt(u2hatb); . gen fem_t=female/sqrt(u2hatb); . reg earn1_t fem_t age_t educ_t int_t, noc; Source | SS df MS Number of obs = 560 -------------+------------------------------ F( 4, 556) = 162.66 Model | 3355.33162 4 838.832905 Prob > F = 0.0000 Residual | 2867.36239 556 5.1571266 R-squared = 0.5392 -------------+------------------------------ Adj R-squared = 0.5359 Total | 6222.69401 560 11.1119536 Root MSE = 2.2709 ------------------------------------------------------------------------------ earn1_t | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- fem_t | -12.77161 1.86795 -6.84 0.000 -16.44072 -9.102511 age_t | .2497331 .1011824 2.47 0.014 .0509867 .4484795 educ_t | 4.464354 .4773457 9.35 0.000 3.526732 5.401975 int_t | -38.25088 7.310814 -5.23 0.000 -52.61107 -23.89068 ------------------------------------------------------------------------------ . *********************************************************** > Here I calculate White standard errors. > **********************************************************; . reg earn1 female age educatt, robust; Regression with robust standard errors Number of obs = 560 F( 3, 556) = 37.69 Prob > F = 0.0000 R-squared = 0.2489 Root MSE = 24.584 ------------------------------------------------------------------------------ | Robust earn1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- female | -16.45497 2.155961 -7.63 0.000 -20.6898 -12.22015 age | .4267766 .1370467 3.11 0.002 .1575842 .6959691 educatt | 5.206538 .6366067 8.18 0.000 3.95609 6.456986 _cons | -52.70034 9.635321 -5.47 0.000 -71.62642 -33.77426 ------------------------------------------------------------------------------ . *********************************************************** > Here I clear the data so that I can read in a new dataset. > **********************************************************; . clear; . *********************************************************** > Located at my website course > (http://www.uncg.edu/bae/people/rosenbaum/Eco643/main.html) > is a file containing inflation and unemployment data from 1948 through > 1996. The file is named phillips.raw and is stored > space-delimited ASCII. Here is a short description of > the variables in the order that they are found in the data. > Notice that I limit the sample to just data from 1970 onward. > > > YEAR = year (1948-1996) > UNEM = civilian unemployment rate > INF = CPI inflation rate > UNEM_1 = UNEM lagged once > INF_1 = INF lagged once > UNEM_2 = UNEM lagged twice > INF_2 = INF lagged twice > CUNEM = UNEM - UNEM_1 > CINF = INF - INF_1 > CUNEM_1 = CUNEM lagged once > CINF_1 = CINF lagged once > **********************************************************; . infile year unem inf unem_1 inf_1 unem_2 inf_2 cunem cinf cunem_1 cinf_1 usin > g phillips; (49 observations read) . drop if year<1970; (22 observations deleted) . sum; Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- year | 27 1983 7.937254 1970 1996 unem | 27 6.618519 1.287525 4.9 9.7 inf | 27 5.566667 3.052742 1.9 13.5 unem_1 | 27 6.548148 1.403394 3.5 9.7 inf_1 | 27 5.659259 3.009505 1.9 13.5 -------------+-------------------------------------------------------- unem_2 | 27 6.474074 1.504504 3.5 9.7 inf_2 | 27 5.711111 2.970151 1.9 13.5 cunem | 27 .0703704 1.07016 -2.1 2.9 cinf | 27 -.0925926 2.125473 -4.1 4.8 cunem_1 | 27 .0740741 1.069361 -2.1 2.9 -------------+-------------------------------------------------------- cinf_1 | 27 -.0518519 2.141777 -4.1 4.8 . *********************************************************** > Here I first set the variable that order the data, in this > case the YEAR variable. > Then I regressin the inflation rate onto unemployment and > calculate the Durbin-Watson statistic. > **********************************************************; . tsset year; time variable: year, 1970 to 1996 . reg inf unem; Source | SS df MS Number of obs = 27 -------------+------------------------------ F( 1, 25) = 0.08 Model | .7267317 1 .7267317 Prob > F = 0.7862 Residual | 241.573275 25 9.66293101 R-squared = 0.0030 -------------+------------------------------ Adj R-squared = -0.0369 Total | 242.300007 26 9.31923104 Root MSE = 3.1085 ------------------------------------------------------------------------------ inf | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- unem | .1298508 .4734914 0.27 0.786 -.8453229 1.105025 _cons | 4.707247 3.190401 1.48 0.153 -1.863508 11.278 ------------------------------------------------------------------------------ . dwstat; Durbin-Watson d-statistic( 2, 27) = .5080594 . *********************************************************** > Here I regress the residuals onto the lagged residuals to > test for AR(1) serial correlation. > **********************************************************; . predict uhat1,resid; . gen uhat1_1=uhat1[_n-1]; (1 missing value generated) . reg uhat1 uhat1_1; Source | SS df MS Number of obs = 26 -------------+------------------------------ F( 1, 24) = 29.64 Model | 133.418468 1 133.418468 Prob > F = 0.0000 Residual | 108.02284 24 4.50095167 R-squared = 0.5526 -------------+------------------------------ Adj R-squared = 0.5339 Total | 241.441308 25 9.65765231 Root MSE = 2.1215 ------------------------------------------------------------------------------ uhat1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- uhat1_1 | .7526045 .1382328 5.44 0.000 .4673061 1.037903 _cons | -.0834265 .4162661 -0.20 0.843 -.9425575 .7757046 ------------------------------------------------------------------------------ . *********************************************************** > Here I use the Prais-Winsten estimation method to estimate > Feasible GLS. > **********************************************************; . prais inf unem; Iteration 0: rho = 0.0000 Iteration 1: rho = 0.7518 Iteration 2: rho = 0.8062 Iteration 3: rho = 0.8100 Iteration 4: rho = 0.8103 Iteration 5: rho = 0.8103 Iteration 6: rho = 0.8103 Iteration 7: rho = 0.8103 Prais-Winsten AR(1) regression -- iterated estimates Source | SS df MS Number of obs = 27 -------------+------------------------------ F( 1, 25) = 3.37 Model | 13.1100356 1 13.1100356 Prob > F = 0.0782 Residual | 97.1687554 25 3.88675022 R-squared = 0.1189 -------------+------------------------------ Adj R-squared = 0.0836 Total | 110.278791 26 4.24149196 Root MSE = 1.9715 ------------------------------------------------------------------------------ inf | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- unem | -.5613194 .3965063 -1.42 0.169 -1.377939 .2553007 _cons | 8.791098 3.035089 2.90 0.008 2.540214 15.04198 -------------+---------------------------------------------------------------- rho | .8103459 ------------------------------------------------------------------------------ Durbin-Watson statistic (original) 0.508059 Durbin-Watson statistic (transformed) 1.289116 . end of do-file