Department of Economics University of Essex Dr Gordon Kemp Session 2012/2013 Spring Term EC352 – Econometric Methods Solutions for Exercises from Week 09 1 Question E07.2 Suppose that you are interested in the relationship between the number of letters of application sent by a job seeker and the probability of being employed. You have data about a cohort of Essex students in 2005 and know their job status (employed or unemployed) and the number of letters of application they have sent in the last year of study. Let Ei denote a binary variable that takes the value 1 if person i is employed and 0, otherwise; and let Li denote the number of letters sent by person i. 1. Suppose that one student in the sample has sent 50 applications and is employed. Write down the probability of that particular event as a function of (unknown) parameters. Answer: • The probability of this particular event would be: exp(β0 + 50β1 ) 1 + exp(β0 + 50β1 ) 2. Derive formally the marginal effect on the probability of being employed of sending an additional letter. Answer: • Treating number of letters as continuous: d Pr {Ei = 1|Li } dLi dΛ (β0 + β1 Li ) = β1 λ (β0 + β1 Li ) dLi ) ( exp (β0 + β1 Li ) = β1 [1 + exp (β0 + β1 Li )]2 = β1 Λ (β0 + β1 Li ) [1 − Λ (β0 + β1 Li )] = • Note that for a full answer you would need to derive this formally: it helps to use property that d exp(z)/dz = exp(z). The formula is more complicated if you treat Li as discrete. 3. Within the context of a logit model, is the marginal effect of an application letter on the probability of being employed identical for all individuals? Explain. Answer: 1 • In general no – the marginal effects would only be the same here when either β1 = 0 or when Li is the same for all individuals. This is because Λ(β0 + β1 Li ) varies with Li provided that β1 6= 0. • For a more complete answer, it is useful to graph λ(z) = dΛ(z)/dz = exp(z)/[1 + exp(z)]2 = Λ(z)[1 − Λ(z)] against z. 2 Exercise C17.1 This question is about efficiency in spread betting markets. The data consists of 553 observations on games taken during the 1994-95 men’s college basketball season in the US and is contained in the file pntsprd.dta (this data is also used in computing Exercise C8.5 crom Wooldridge). The variable spread is the Las Vegas points spread for the day before the game was played. In spread betting, the gambler usually wagers that the difference between the scores of two teams will be less than or greater than the value specified by the bookmaker. The offered bet consists of specifying one of the teams as the “favorite”, the other as the “underdog”, and a points spread which is always positive. If the gambler bets $100 on the favorite and the favorite’s score minus the the underdog’s score is greater than the spread then the gambler wins $100; if it less than the spread than the gambler loses $100; while if it is equal to spread no money is won or lost. Often spreads are often offered in half-point fractions to aovid the last outcome (in which case bookmaker would still have to cover the transactions costs of the bet). 2 1. The variable favwin is a binary variable if the team favored by the Las Vegas points spread wins. A linear probability model (LPM) to estimate the probability that the favored team wins is: Pr(favwin = 1|spread) = β0 + β1 spread Explain why, if the spread incorporates all relevant information, we expect β0 = 0.5. Answer: • Suppose that there are no overheads to betting, bookmakers are risk neutral, the betting market is perfectly competitive, and pushes never occur. Then the bookmaker will offer a bet with an expected payout to the gambler of $0 which means that the probability of the gambler winning should equal the probability of the gambler losing and hence should equal 0.5. If the LPM is correct and the spread was equal to zero that should mean that the probability of the favorite winning should equal 0.5 which corresponds in the LPM to β0 = 0.5. • In practice, there are overheads and pushes do occur. Furthermore, the LPM may not be appropriate and in the data set bookmakers never offer zero spreads. All of these factors put some doubt on the conclusion that β0 should equal 0.5. 2. Estimate the model from Part (1) by OLS. Test H0 : β0 = 0.5 against a two-sided alternative. Use both the usual and heteroskedasticity-robust standard errors. Answer: • An standard OLS regression of f avwin on spread gives the results: . regress favwin spread Source | SS df MS -------------+-----------------------------Model | 11.0636261 1 11.0636261 Residual | 88.9038241 551 .161349953 -------------+-----------------------------Total | 99.9674503 552 .181100453 Number of obs F( 1, 551) Prob > F R-squared Adj R-squared Root MSE = = = = = = 553 68.57 0.0000 0.1107 0.1091 .40168 -----------------------------------------------------------------------------favwin | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------spread | .0193655 .0023386 8.28 0.000 .0147718 .0239593 _cons | .5769492 .0282345 20.43 0.000 .5214888 .6324097 ------------------------------------------------------------------------------ Then we can perform a test of H0 : β0 = 0.5 against a two-sided alternative based on the usual standard errors generating the results: . test _cons=0.5 ( 1) _cons = .5 F( 1, 551) = Prob > F = 7.43 0.0066 so this would lead us to reject the null hypothesis at all conventional significance levels. 3 • However, we know that binary response models (including the LPM) exhibit heteroskedasticity. Redoing the regression with robust standard errors generates the output: . regress favwin spread, vce(robust) Linear regression Number of obs F( 1, 551) Prob > F R-squared Root MSE = = = = = 553 101.54 0.0000 0.1107 .40168 -----------------------------------------------------------------------------| Robust favwin | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------spread | .0193655 .0019218 10.08 0.000 .0155905 .0231405 _cons | .5769492 .0316568 18.23 0.000 .5147664 .6391321 ------------------------------------------------------------------------------ and then the test of H0 : β0 = 0.5 against a two-sided alternative based on heteroskedasticity-robust standard errors generates the results: . test _cons=0.5 ( 1) _cons = .5 F( 1, 551) = Prob > F = 5.91 0.0154 This still rejects the null hypothesis although. 3. Is spread statistically significant? What is the estimated probability that the favored team wins when spread = 10? Answer: • With the usual standard errors the t-stat on the spread is 8.28 with a p-value of 0 to 3s.f. while with the heteroskedasticity-robust standard errors the t-stat is 10.08 with a p-value of 0 to 3s.f. Clearly the spread is highly significant for the LPM regardless of which standard errors are used. • The estimated probability that the favored team wins when spread = 10 is:sma 0.5769 + (0.0193 × 10) = 0.7699 i.e. about 77%. 4. Now estimate a probit model for Pr(favwin = 1|spread). Interpret and test the null hypothesis that the intercept is 0. [Hint: Remember that Φ(0) = 0.5.] Answer: • Fitting a probit model gives: 4 . probit favwin spread Iteration Iteration Iteration Iteration Iteration 0: 1: 2: 3: 4: log log log log log likelihood likelihood likelihood likelihood likelihood = = = = = -302.74988 -266.49244 -263.62542 -263.56223 -263.56219 Probit regression Number of obs LR chi2(1) Prob > chi2 Pseudo R2 Log likelihood = -263.56219 = = = = 553 78.38 0.0000 0.1294 -----------------------------------------------------------------------------favwin | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------spread | .092463 .0121811 7.59 0.000 .0685885 .1163374 _cons | -.0105926 .1037469 -0.10 0.919 -.2139328 .1927476 ------------------------------------------------------------------------------ When the spread is zero then the predicted probability that the favorite wins is Φ(βb0 ). Since βb0 = −0.0105926 this gives: . disp normal(-0.0105926) .49577424 i.e. almost a 50% chance of winning (very slightly under). The z-stat on the intercept is -0.10 with a p-value of 0.919 so we do not reject the null hypothesis that the intercept is 0. 5. Use the probit model to estimate the probability that the favored team wins when spread = 10. Compare this with the LPM estimate from Part (3). Answer: • Plugging this in we get: . disp normal(-.0105926 + (.092463 * 10)) .8196514 i.e. a predicted probability of winning of 82% (rather higher than with the LPM estimates) 6. Add the variables f avhome, f av25 and und25 to the probit model and test the joint significance of these variables using the Likelihood Ratio test. (How many df are in the chi-square distribution?) Interpret this result focusing on the question of whether the spread incorporates all observable information prior to a game. Answer: • Running this probit regression gives: . probit favwin spread favhome fav25 und25 Iteration 0: Iteration 1: log likelihood = -302.74988 log likelihood = -265.47417 5 Iteration 2: Iteration 3: Iteration 4: log likelihood = -262.70317 log likelihood = -262.64181 log likelihood = -262.64177 Probit regression Number of obs LR chi2(4) Prob > chi2 Pseudo R2 Log likelihood = -262.64177 = = = = 553 80.22 0.0000 0.1325 -----------------------------------------------------------------------------favwin | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------spread | .0878845 .0129491 6.79 0.000 .0625047 .1132642 favhome | .1485753 .1370571 1.08 0.278 -.1200517 .4172024 fav25 | .003068 .15869 0.02 0.985 -.3079587 .3140946 und25 | -.2198082 .2505842 -0.88 0.380 -.7109443 .2713278 _cons | -.0551801 .128763 -0.43 0.668 -.3075509 .1971907 ------------------------------------------------------------------------------ • To test the joint significance of these added variables using the Likelihood Ratio test we compare: h i bU R − L bR LR = 2 L with a χ2 (q), i.e. a chi-square with q d.f. where q is the number of restrictions we are testing. • Here we want to test that three coefficients are equal to zero so q = 3. Then: h i bU R − L b R = 2 × [(−262.64177) − (−263.56219)] LR = 2 L = 1.84084 Now the 10% significance level critical value from a χ2 (3) test is 6.25139.4 so we clearly do not reject the null. Thus adding these additional variables does not seem to provide any significant additional information relevant to predicting the probability of a favored team win that was not already accounted for by the spread. 3 Computing Exercise C17.2 This question is about discrimination in approval of loan applications. The data consists of 1989 observations on loan applications in Boston in 1990 and are contained in the file loanapp.dta (this data is also used in Computer Exercises C7.8, C8.7 and C9.7 from Wooldridge). 1. Estimate a probit model of approve on white. Find the estimated probability of loan approval for both whites and non-whites. How do these compare with the linear probability estimates? Answer: • Running the probit estimation gives: . probit approve white Iteration 0: Iteration 1: log likelihood = -740.34659 log likelihood = -701.33221 6 Iteration 2: Iteration 3: log likelihood = -700.87747 log likelihood = -700.87744 Probit regression Number of obs LR chi2(1) Prob > chi2 Pseudo R2 Log likelihood = -700.87744 = = = = 1989 78.94 0.0000 0.0533 -----------------------------------------------------------------------------approve | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------white | .7839465 .0867118 9.04 0.000 .6139946 .9538985 _cons | .5469463 .075435 7.25 0.000 .3990964 .6947962 ------------------------------------------------------------------------------ Running the LPM gives: . regress approve white Source | SS df MS -------------+-----------------------------Model | 10.4743407 1 10.4743407 Residual | 203.59303 1987 .102462521 -------------+-----------------------------Total | 214.067371 1988 .107679764 Number of obs F( 1, 1987) Prob > F R-squared Adj R-squared Root MSE = = = = = = 1989 102.23 0.0000 0.0489 0.0485 .3201 -----------------------------------------------------------------------------approve | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------white | .2005957 .01984 10.11 0.000 .1616864 .239505 _cons | .7077922 .0182393 38.81 0.000 .6720221 .7435623 ------------------------------------------------------------------------------ The coefficient estimates are quite different; however, they are not directly comparable. The estimate from the LPM suggests that the probability of approval in a loan application for a white applciant is about 20 perecntage points higher than for a non-white applicant. • In both models the coefficient on white is positive and very strongly statistically significant. 2. Now, add the variables hrat, obrat, loanprc, unem, male, married, dep, sch, cosign, chist, pubrec, mortlat1, mortlat2, and vr to the probit model. Is there statistically significant evidence of discrimination against non-whites? Answer: • Adding these variables to the probit generates the following results: . probit approve white hrat obrat loanprc unem male married dep sch cosign chist pubrec mortlat1 mortlat2 vr Iteration Iteration Iteration Iteration Iteration 0: 1: 2: 3: 4: log log log log log likelihood likelihood likelihood likelihood likelihood = = = = = -737.97933 -603.5925 -600.27774 -600.27099 -600.27099 Probit regression Number of obs 7 = 1971 LR chi2(15) Prob > chi2 Pseudo R2 Log likelihood = -600.27099 = = = 275.42 0.0000 0.1866 -----------------------------------------------------------------------------approve | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------white | .5202525 .0969588 5.37 0.000 .3302168 .7102883 hrat | .0078763 .0069616 1.13 0.258 -.0057682 .0215209 (remaining output suppressed) The estimated coefficient on white is smaller than in the earlier probit regression: here the estimate is 0.520 while the earlier estimate was 0.784. However, again the coefficients are not entirely comparable. We still seee that the coefficient is positive and highly statistically significnat (though not as significant as previously). • Note that the maximized log-likelihood has gone up by about 100 so that all this additional stuff in the probit is jointly highly statistically significant. 3. Estimate the model from Part (2) by logit. Compare the coefficient on white to the probit estimate. Answer: • Running the logit estimation of the model from Part (2) gives: . logit approve white hrat obrat loanprc unem male married dep sch cosign chist pubrec mortlat1 mortlat2 vr Iteration Iteration Iteration Iteration Iteration Iteration 0: 1: 2: 3: 4: 5: log log log log log log likelihood likelihood likelihood likelihood likelihood likelihood = = = = = = -737.97933 -634.97536 -601.41194 -600.49724 -600.49616 -600.49616 Logistic regression Number of obs LR chi2(15) Prob > chi2 Pseudo R2 Log likelihood = -600.49616 = = = = 1971 274.97 0.0000 0.1863 -----------------------------------------------------------------------------approve | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------white | .9377643 .1729043 5.42 0.000 .598878 1.27665 hrat | .0132631 .0128802 1.03 0.303 -.0119816 .0385078 (remaining output suppressed) The coefficient estimate on white is now 0.938 but again this is not directly comparable with the earlier estimates. It is both positive and highly statistically significant. • Note that the maximized log-likelihood from this logit estimation is −600.49616 while that from th earlier probit estimation was −600.27099 so these are not very different. 4. Use Equation (17.17) from Wooldridge to estimate the sizes of the discrimination effects for probit and logit. 8 Answer: • Equation (17.17) from Wooldridge outline a way of calculating the average partial effect (APE) of a discrete explanatory variable in a binary response model. This can be done in Stata by using the margins command with the at option and then combining the results. To do this for the probit model we re-run the probit estimation and then we run the margins command at white=0 and at white=1 : . probit approve white hrat obrat loanprc unem male married dep sch cosign chist pubrec mortlat1 mortlat2 vr (output suppressed) . margins, at(white=0 white=1) Predictive margins Model VCE : OIM Number of obs Expression : Pr(approve), predict() 1._at : white = 0 2._at : white = 1 = 1971 -----------------------------------------------------------------------------| Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------_at | 1 | .7923174 .0210981 37.55 0.000 .7509659 .8336689 2 | .8965419 .0072597 123.49 0.000 .8823131 .9107707 -----------------------------------------------------------------------------. disp (.8965419 - .7923174) .1042245 From this we see that for the probit model, the estimated APE on loan approval of being white as compared to non-white is an increase of 0.104, i.e. 10.4 percentage points. We can do the same for the logit model which gives: . logit approve white hrat obrat loanprc unem male married dep sch cosign chist pubrec mortlat1 mortlat2 vr (output suppressed) . margins, at(white=0 white=1) Predictive margins Model VCE : OIM Number of obs Expression : Pr(approve), predict() 1._at : white = 0 2._at : white = 1 = 1971 -----------------------------------------------------------------------------| Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- 9 _at | 1 | .7955101 .0203441 39.10 0.000 .7556364 .8353838 2 | .8963808 .0072951 122.87 0.000 .8820826 .9106789 -----------------------------------------------------------------------------. disp (.8963808-.7955101) .1008707 From this we see that for the logit model, the estimated APE on loan approval of being white as compared to non-white is an increase of 0.101, i.e. 10.1 percentage points. We can see that these answers are fairly similar and are both noticeably positive, suggesting tht there is discrimination in loan approval even after controlling for this additional collection of factors. Note that the corresponding estimated APE from the LPM is simply the coefficient on white in the regression with the other factors included: . regress approve white hrat obrat loanprc unem male married dep sch cosign chist pubrec mortlat1 mortlat2 vr Source | SS df MS -------------+-----------------------------Model | 35.4004787 15 2.36003192 Residual | 178.393534 1955 .09124989 -------------+-----------------------------Total | 213.794013 1970 .10852488 Number of obs F( 15, 1955) Prob > F R-squared Adj R-squared Root MSE = = = = = = 1971 25.86 0.0000 0.1656 0.1592 .30208 -----------------------------------------------------------------------------approve | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------white | .1288196 .0197317 6.53 0.000 .0901223 .1675169 hrat | .001833 .0012632 1.45 0.147 -.0006444 .0043104 (remaining output suppressed) This gives an estimated APE of 0.129, i.e. about 12.9 percentage points which is rather above the estimated APE’s from the probit and logit estimations. 10