You are on page 1of 12

The Australian National University Research School of Economics Economic Models and Introductory Econometrics (EMET8005) Semester 1, 2012

Assignment 2 Solutions (questions 6.13 and 5.33) Question 1. Text, Q6.13, parts a, b, c, d.

a.

Logit model
Dependent Variable: Y Method: ML - Binary Logit (Quadratic hill climbing) Sample: 1 258 Included observations: 258 Convergence achieved after 6 iterations Covariance matrix computed using second derivatives Coefficient C EDUC MINORITY PREVEXP McFadden R-squared S.D. dependent var Akaike info criterion Schwarz criterion Hannan-Quinn criter. LR statistic Prob(LR statistic) -26.95253 1.674803 -2.395242 0.003865 0.589999 0.453157 0.522420 0.577505 0.544570 182.4448 0.000000 Std. Error 4.400953 0.280053 0.847987 0.003078 z-Statistic -6.124248 5.980311 -2.824620 1.255799 Prob. 0.0000 0.0000 0.0047 0.2092 0.286822 0.258646 16.99207 -63.39219 -154.6146 -0.245706

Mean dependent var S.E. of regression Sum squared resid Log likelihood Restr. log likelihood Avg. log likelihood

Following is a plot of xb versus the predicted probs, showing the familiar shape of the cdf.
1.0

0.8

E 1 L _ P R O B

0.6

0.4

0.2

0.0 -20 -15 -10 -5 E 1L_INDE X 0 5 10

b. c.

Marginal effects, by minority. The prob of being in a management role is higher for non-minorities (controlling for education and previous experience), and the marginal effect on the probability of an extra year of education is also higher in non-minorities.
Descriptive Statistics for MEFFECT Categorized by values of MINORITY Sample: 1 258 Included observations: 258 MINORITY 0 1 All Mean 0.157760 0.047869 0.130501 Std. Dev. 0.152645 0.095511 0.148309 Obs. 194 64 258

That is a numerical result, following from the fact that there are very few minorities in management roles. A cross-tab follows.
MINORITY 1 60 4 64

Count Y 0 1 Total

0 124 70 194

Total 184 74 258

So most of the minorities have large negative values for xbeta and are in the range where the marginal effect is small. See the next two figures.
16 14 12 10 8 6 4 2 0 -16 -14 -12 -10 -8 -6 -4 -2 0 2

Series: E1L_INDEX Sample 1 258 IF MINORITY = 1 Observations 64 Mean Median Maximum Minimum Std. Dev. Skewness Kurtosis Jarque-Bera Probability -7.137146 -8.100274 2.856125 -15.84885 4.752135 -0.290591 2.363118 1.982377 0.371135

1. 0

0. 8

E 1 L _ P R O B

0. 6

0. 4

0. 2

0. 0 -16 -12 -8 -4 0 4

E 1L_INDE X

d.

T-test. The t-stat, from above, = 1.25. So we do not reject the null (tested at the 5% level) and conclude that PREVEXP is not a relevant variable. LR test LR = 2*(-63.39 + 64.15) = 1.52. c.v. (5% level ) = 3.84, so same conclusion.
Dependent Variable: Y Method: ML - Binary Logit (Quadratic hill climbing) Sample: 1 258 Included observations: 258 Convergence achieved after 6 iterations Covariance matrix computed using second derivatives Coefficient C EDUC MINORITY McFadden R-squared S.D. dependent var Akaike info criterion Schwarz criterion Hannan-Quinn criter. LR statistic Prob(LR statistic) -26.21473 1.644799 -2.119683 0.585097 0.453157 0.520543 0.561857 0.537156 180.9289 0.000000 Std. Error 4.311685 0.276716 0.794003 z-Statistic -6.079926 5.943992 -2.669618 Prob. 0.0000 0.0000 0.0076 0.286822 0.257461 16.90299 -64.15011 -154.6146 -0.248644

( 1.252).

Mean dependent var S.E. of regression Sum squared resid Log likelihood Restr. log likelihood Avg. log likelihood

Probit model
Dependent Variable: Y Method: ML - Binary Probit (Quadratic hill climbing) Sample: 1 258 Included observations: 258 Convergence achieved after 6 iterations Covariance matrix computed using second derivatives Coefficient Std. Error z-Statistic Prob.

C EDUC MINORITY McFadden R-squared S.D. dependent var Akaike info criterion Schwarz criterion Hannan-Quinn criter. LR statistic Prob(LR statistic)

-11.76786 0.729909 -0.741846 0.553802 0.453157 0.558052 0.599366 0.574665 171.2517 0.000000

1.523436 0.096324 0.338923

-7.724553 7.577620 -2.188832

0.0000 0.0000 0.0286 0.286822 0.271351 18.77604 -68.98874 -154.6146 -0.267398

Mean dependent var S.E. of regression Sum squared resid Log likelihood Restr. log likelihood Avg. log likelihood

Comparison of estimators
logit coefficient'

probit coefficient

ratio

C EDUC MINORITY

-26.21473 1.644799 -2.119683

-11.76786 0.729909 -0.741846

2.2276548 2.2534302 2.8573087

The ratio is larger than the standard 1.6-1.8 because the data lies around the xbeta = -1.5, rather than around zero (where the ratio of the pdf is 1/1.6). Heteroskedasticity i2 = 2zi Here, 2 is a parameter, not a variance. The solution for the first two components of the questions is in the other part of the solution set. The estimated model follows. Create a weight series,
series wt = 4/@sqrt(educ)

with the 4 to normalise the parameter estimates so that they are comparable to the standard probit estimates. Using the 4, or some other value, does not change the value of the log LF, it just scales the parameter estimates. The value of the log LF is less than that in the standard probit model.
Dependent Variable: Y Method: ML - Binary Probit (Quadratic hill climbing) Sample: 1 258 Included observations: 258 Convergence achieved after 5 iterations Covariance matrix computed using second derivatives Coefficient Std. Error z-Statistic Prob.

WT EDUC*WT MINORITY*WT Mean dependent var S.E. of regression Sum squared resid Log likelihood Avg. log likelihood Obs with Dep=0 Obs with Dep=1

-11.44164 0.710640 -0.629099 0.286822 0.271575 18.80697 -70.49504 -0.273237 184 74

1.496565 0.094645 0.325487

-7.645269 7.508488 -1.932795

0.0000 0.0000 0.0533 0.453157 0.569729 0.611043 0.586341

S.D. dependent var Akaike info criterion Schwarz criterion Hannan-Quinn criter.

Total obs

258

Exponential form of variance and LR test for heteroskedasticity. You will have noticed the slight difference between the model in the assignment question, i2 = exp(zi) and the model in the textbook question, i = exp(zi) The former implies that i2 = exp(0.5 zi) so there is really no difference between the two models. The form in the textbook question makes coding slightly easier and I use that here. In the logit model, the EViews command is
equation e3a.logit y = c(1)/exp(c(5)*educ) + c(2)*educ/exp(c(5)*educ) + _ c(3)*minority/exp(c(5)*educ) + c(4)*prevexp/exp(c(5)*educ)

and the LR test is almost zero (suggesting no heteroskedasticity of this form).


Dependent Variable: Y Method: ML - Binary Logit (Quadratic hill climbing) Sample: 1 258 Included observations: 258 Convergence achieved after 21 iterations Covariance matrix computed using second derivatives Y = C(1)/EXP(C(5)*EDUC) + C(2)*EDUC/EXP(C(5)*EDUC) + C(3) *MINORITY/EXP(C(5)*EDUC) Variable C(1) C(5) C(2) C(3) Coefficient -24.46696 -0.004320 1.534889 -1.990022 Std. Error 37.11471 0.095132 2.335545 3.105886 z-Statistic -0.659225 -0.045409 0.657187 -0.640726 Prob. 0.5098 0.9638 0.5111 0.5217

Mean dependent var S.E. of regression Sum squared resid Log likelihood Avg. log likelihood

0.286822 0.258134 16.92485 -64.14771 -0.248635

S.D. dependent var Akaike info criterion Schwarz criterion Hannan-Quinn criter.

0.453157 0.528277 0.583361 0.550427

Testing for heteroskedasticity wrt minority gives a different result:


Dependent Variable: Y Method: ML - Binary Logit (Quadratic hill climbing) Sample: 1 258 Included observations: 258 Convergence achieved after 7 iterations Covariance matrix computed using second derivatives Y = C(1)/EXP(C(5)*MINORITY) + C(2)*EDUC/EXP(C(5)*MINORITY) + C(3) *MINORITY/EXP(C(5)*MINORITY) Variable C(1) C(5) C(2) C(3) Mean dependent var S.E. of regression Sum squared resid Log likelihood Avg. log likelihood Coefficient -37.09794 1.337902 2.344974 -7.458573 0.286822 0.242920 14.98857 -59.21572 -0.229518 Std. Error 6.852789 0.531585 0.440638 4.664802 z-Statistic -5.413553 2.516816 5.321765 -1.598904 Prob. 0.0000 0.0118 0.0000 0.1098 0.453157 0.490044 0.545129 0.512194

S.D. dependent var Akaike info criterion Schwarz criterion Hannan-Quinn criter.

Probit model with prevexp: LR = 0.76 and we again accept the null (tested at teh 5% level) of no heteroskedasticity wrt education.
Dependent Variable: Y Method: ML - Binary Probit (Quadratic hill climbing) Sample: 1 258 Included observations: 258 Convergence achieved after 52 iterations Covariance matrix computed using second derivatives Y = C(1)/EXP(C(5)*EDUC) + C(2)*EDUC/EXP(C(5)*EDUC) + C(3) *MINORITY/EXP(C(5)*EDUC) + C(4)*PREVEXP/EXP(C(5)*EDUC) Variable C(1) C(5) C(2) C(3) Coefficient -6.771994 -0.039342 0.413339 -0.555948 Std. Error 5.534217 0.051881 0.338879 0.492640 z-Statistic -1.223659 -0.758317 1.219725 -1.128507 Prob. 0.2211 0.4483 0.2226 0.2591

C(4) Mean dependent var S.E. of regression Sum squared resid Log likelihood Avg. log likelihood Obs with Dep=0 Obs with Dep=1

0.001402 0.286822 0.273989 18.99271 -67.04469 -0.259863 184 74

0.001586

0.884325

0.3765 0.453157 0.558486 0.627342 0.586173

S.D. dependent var Akaike info criterion Schwarz criterion Hannan-Quinn criter.

Total obs

258

Dependent Variable: Y Method: ML - Binary Probit (Quadratic hill climbing) Sample: 1 258 Included observations: 258 Convergence achieved after 6 iterations Covariance matrix computed using second derivatives Coefficient C EDUC MINORITY PREVEXP McFadden R-squared S.D. dependent var Akaike info criterion Schwarz criterion Hannan-Quinn criter. LR statistic Prob(LR statistic) Obs with Dep=0 Obs with Dep=1 -12.56922 0.767627 -0.960505 0.002939 0.563915 0.453157 0.553683 0.608767 0.575832 174.3790 0.000000 184 74 Std. Error 1.626388 0.100705 0.370453 0.001622 z-Statistic -7.728307 7.622500 -2.592783 1.811961 Prob. 0.0000 0.0000 0.0095 0.0700 0.286822 0.272847 18.90919 -67.42505 -154.6146 -0.261337

Mean dependent var S.E. of regression Sum squared resid Log likelihood Restr. log likelihood Avg. log likelihood

Total obs

258

e.

R2 and hit rate

McFaddens R2 = 0.58. Hit ratio. For EViews, we get a hit rate of 93.8. Almost the same value is obtained if p_hat is used as the cut-off (see p. 453). Also, q = 0.59 and the std error = 0.03, so z = 11.33, which is greater that the cv of 1.645. So we reject the null that the model is no better than a random prediction model (tested at the 5% level).

Expectation-Prediction Evaluation for Binary Specification Equation: E2L Success cutoff: C = 0.5 Estimated Equation Dep=0 Dep=1 Total P(Dep=1)<=C P(Dep=1)>C Total Correct % Correct % Incorrect Total Gain* Percent Gain** 175 9 184 175 95.11 4.89 -4.89 NA 7 67 74 67 90.54 9.46 90.54 90.54 182 76 258 242 93.80 6.20 22.48 78.38 Constant Probability Dep=0 Dep=1 Total 184 0 184 184 100.00 0.00 74 0 74 0 0.00 100.00 258 0 258 184 71.32 28.68

Estimated Equation Dep=0 Dep=1 Total E(# of Dep=0) E(# of Dep=1) Total Correct % Correct % Incorrect Total Gain* Percent Gain** 165.36 18.64 184.00 165.36 89.87 10.13 18.55 64.68 18.64 55.36 74.00 55.36 74.81 25.19 46.13 64.68 184.00 74.00 258.00 220.72 85.55 14.45 26.46 64.68

Constant Probability Dep=0 Dep=1 Total 131.22 52.78 184.00 131.22 71.32 28.68 52.78 21.22 74.00 21.22 28.68 71.32 184.00 74.00 258.00 152.45 59.09 40.91

*Change in "% Correct" from default (constant probability) specification **Percent of incorrect (default) prediction corrected by equation

Question 2. Text, question 5.33 a. Regression of Buchanan on Gore


Dependent Variable: BUCHANAN Method: Least Squares Sample: 1 67 Included observations: 67 Coefficient C GORE R-squared Adjusted R-squared S.E. of regression Sum squared resid 79.20578 0.004136 0.474513 0.466428 328.2027 7001605. Std. Error 46.42388 0.000540 t-Statistic 1.706143 7.661246 Prob. 0.0928 0.0000 258.4627 449.3096 14.45454 14.52035

Mean dependent var S.D. dependent var Akaike info criterion Schwarz criterion

Log likelihood F-statistic Prob(F-statistic)

-482.2270 58.69469 0.000000

Hannan-Quinn criter. Durbin-Watson stat

14.48058 1.892998

It is easy to spot the potential outlier.


3,500 3,000 2,500 B U C H A N A N 2,000 1,500 1,000 500 0 0 100,000 200,000 GORE 300,000 400,000

b.

Add dummy for Palm Beach. This suggests that there are 2614 extra votes that predicted by the model excluding that observation. (The same result is obtained by running the regression without the Palm Beach observation and then using that mode to predict the Palm Beach vote.) For the hypothesis, t = (2614 975)/149 = 11.0, and we reject the null that v = 975 (tested at the 5% level).
Dependent Variable: BUCHANAN Method: Least Squares Sample: 1 67 Included observations: 67 Coefficient C GORE DUMPALM R-squared Adjusted R-squared S.E. of regression Sum squared resid Log likelihood F-statistic Prob(F-statistic) 109.3512 0.002540 2614.515 0.909241 0.906405 137.4587 1209273. -423.3969 320.5828 0.000000 Std. Error 19.51945 0.000244 149.3264 t-Statistic 5.602164 10.41929 17.50873 Prob. 0.0000 0.0000 0.0000 258.4627 449.3096 12.72827 12.82698 12.76733 1.617734

Mean dependent var S.D. dependent var Akaike info criterion Schwarz criterion Hannan-Quinn criter. Durbin-Watson stat

c.

Test for heteroskedasticity. I have included DUMPALM in the model so that the outlier does not affect the test statistic. Plot of residuals versus total (residual for Palm Beach = 0)
400 300 200 E 2 _ R E S 100 0 -100 -200 -300 -400 0 200,000 400,000 TOTAL 600,000 800,000

Palm Beach is the observation with just over 400,000 total votes. We might expect a residual of up to around 400, rather than 2600. BP = 32, cv = 3.84 (5% level) and we reject the null of no heteroskedasticity (tested at the 5% level).
Heteroskedasticity Test: Breusch-Pagan-Godfrey F-statistic Obs*R-squared Scaled explained SS 60.90326 32.40995 54.57011 Prob. F(1,65) Prob. Chi-Square(1) Prob. Chi-Square(1) 0.0000 0.0000 0.0000

Test Equation: Dependent Variable: RESID^2 Method: Least Squares Sample: 1 67 Included observations: 67 Coefficient C TOTAL R-squared Adjusted R-squared S.E. of regression Sum squared resid Log likelihood F-statistic Prob(F-statistic) 1630.654 0.184520 0.483731 0.475788 25293.93 4.16E+10 -773.3211 60.90326 0.000000 Std. Error 3738.314 0.023644 t-Statistic 0.436200 7.804054 Prob. 0.6641 0.0000 18048.84 34935.17 23.14391 23.20972 23.16995 1.864673

Mean dependent var S.D. dependent var Akaike info criterion Schwarz criterion Hannan-Quinn criter. Durbin-Watson stat

10

d.

Fractions of votes. Here, Palm Beach (the third point from the right) does not look so unusual. But taking the spread of adjacent observations into account, it does nook too big. Correcting for heteroskedasticity is aiming at that comparison.
.020

.016 B U C H A N A N /T O T A L

.012

.008

.004

.000 .2 .3 .4 .5 .6 .7

GORE/TOTAL

The dummy variable is statistically significant (at the 5% level in a one-sided test). There is still heteroskedasticity (tested at the 5% level).
Dependent Variable: BUCHANAN/TOTAL Method: Least Squares Sample: 1 67 Included observations: 67 Coefficient C GORE/TOTAL DUMPALM R-squared Adjusted R-squared S.E. of regression Sum squared resid Log likelihood F-statistic Prob(F-statistic) 0.009721 -0.012109 0.005694 0.123561 0.096172 0.003046 0.000594 294.6647 4.511365 0.014693 Std. Error 0.001860 0.004313 0.003187 t-Statistic 5.226990 -2.807785 1.786560 Prob. 0.0000 0.0066 0.0787 0.004655 0.003204 -8.706410 -8.607693 -8.667348 1.941474

Mean dependent var S.D. dependent var Akaike info criterion Schwarz criterion Hannan-Quinn criter. Durbin-Watson stat

Heteroskedasticity Test: Breusch-Pagan-Godfrey F-statistic Obs*R-squared Scaled explained SS 12.97469 11.14854 42.17015 Prob. F(1,65) Prob. Chi-Square(1) Prob. Chi-Square(1) 0.0006 0.0008 0.0000

Test Equation: Dependent Variable: RESID^2

11

Method: Least Squares Sample: 1 67 Included observations: 67 Coefficient C 1/TOTAL R-squared Adjusted R-squared S.E. of regression Sum squared resid Log likelihood F-statistic Prob(F-statistic) 4.55E-07 0.109049 0.166396 0.153571 2.37E-05 3.64E-08 619.6371 12.97469 0.000612 Std. Error 3.71E-06 0.030274 t-Statistic 0.122399 3.602039 Prob. 0.9030 0.0006 8.86E-06 2.57E-05 -18.43693 -18.37112 -18.41089 2.055035

Mean dependent var S.D. dependent var Akaike info criterion Schwarz criterion Hannan-Quinn criter. Durbin-Watson stat

e.

Thinking of the number of votes for Buchanan as a binomial gives var(error) is proportional to the total number of votes:

series wt = 1/@sqrt(total) equation w1.ls buchanan*wt wt gore*wt dumpalm*wt

The procedure is similar to that in Tutorial 6. The conclusions are the same as before.
Dependent Variable: BUCHANAN*WT Method: Least Squares Sample: 1 67 Included observations: 67 Coefficient WT GORE*WT DUMPALM*WT R-squared Adjusted R-squared S.E. of regression Sum squared resid Log likelihood Durbin-Watson stat 37.39407 0.003980 2299.089 0.600237 0.587745 0.418919 11.23154 -35.23899 1.937994 Std. Error 6.198231 0.000390 294.0064 t-Statistic 6.033024 10.21666 7.819861 Prob. 0.0000 0.0000 0.0000 0.830463 0.652449 1.141462 1.240180 1.180525

Mean dependent var S.D. dependent var Akaike info criterion Schwarz criterion Hannan-Quinn criter.

Assumptions needed: No omitted variables (like gender, race, income and age variable). That is, is Palm Beach an unusual district? Normal errors a histogram shows that they are not normal. But the effect of the tests should be small. Other standard assumptions for OLS.

12

You might also like