ASSIGNMENT #2 ANSWERS

Winter 2018

QUESTION #1

1. Students may choose either the OLS estimator or the WLS (FGLS) estimator. However, if they choose the OLS estimator they must use White’s correction to obtain robust standard errors. Students should explain why they choose an estimator. For example, if students choose the OLS estimator and White robust standard errors they might say they are willing to give up some precision for the simplicity of OLS. White’s correction allows them to obtain unbiased estimates of standard errors so their hypothesis tests are valid. Or they might explain that the weights used for weighted-least squares are the reciprocal of the estimated standard deviation of the error term. The variance of the error term is P(1 – P) where P is the probability that Y = 1. The estimated error variance is Yt(1 -Yt), where Yt is the predicted probability that Y = 1 from the OLS estimates. A potential problem with using the WLS estimator is that the estimated variances for some observations may be negative. If so, these observations must be dropped, which decreases the sample size and precision. If students choose to use WLS, then they should state whether they lose any observations, and if so how many. They don’t lose any observations.

The OLS estimates with robust standard errors:

Linear regression Number of obs = 601

F( 4, 596) = 11.39

Prob > F = 0.0000

R-squared = 0.0775

Root MSE = .41741

------

| Robust

affair | Coef. Std. Err. t P>|t| [95% Conf. Interval]

------+------

yrsmarr | .0183409 .0049317 3.72 0.000 .0086552 .0280265

age | -.0080507 .0031636 -2.54 0.011 -.0142639 -.0018375

male | .0720184 .0357424 2.01 0.044 .0018221 .1422148

happy | -.274398 .0572399 -4.79 0.000 -.3868145 -.1619816

_cons | .5638325 .0936366 6.02 0.000 .3799346 .7477303

------

The WLS estimates:

. vwls affair yrsmarr age male happy, sd(standev)

Variance-weighted least-squares regression Number of obs = 601

Goodness-of-fit chi2(596) = 608.25 Model chi2(4) = 46.69

Prob > chi2 = 0.3550 Prob > chi2 = 0.0000

------

affair | Coef. Std. Err. z P>|z| [95% Conf. Interval]

------+------

yrsmarr | .0173351 .0045179 3.84 0.000 .0084801 .02619

age | -.0060169 .0027127 -2.22 0.027 -.0113337 -.0007002

male | .0664099 .0342083 1.94 0.052 -.0006371 .1334569

happy | -.2657832 .0583222 -4.56 0.000 -.3800926 -.1514739

_cons | .5032796 .085656 5.88 0.000 .3353969 .6711623

To assess whether each explanatory variable has an effect on the likelihood of an affair, students may choose either the strength of evidence approach or the hypothesis testing approach. If they use the strength of evidence approach, then they should conclude that there is strong evidence that each variable has an effect because the p-values are 0.05 or smaller. The possible exception is male for the WLS estimates. The p-value is 0.052. They may conclude this is either strong or moderate evidence of an effect. If they use the hypothesis test approach and a 5% level of significance, then they can be 95% confident that each variable has an effect on the likelihood of an affair. Once again the possible exception is male for the WLS estimates. The t-statistic is 1.94 and critical value 1.96 (p-value 0.052). The null is accepted and the conclusion is that there is insufficient evidence male has an effect. Using the OLS estimates, the direction and size of the effects are as follows. (The WLS estimates are interpreted similarly). A spouse is more likely to have an affair the longer he/she is married. A one year increase in length of marriage results in a 1.8 percent increase in the probability of an affair. For example, a spouse that has been married 15 years is 18 percent more likely than one who has been married for 5 years. The likelihood that a spouse will have an affair decreases with age. A spouse that is one year older is 0.8 percent less likely to have an affair. For example, a 40 year old spouse is 8 percent less likely to have an affair than a 30 year old spouse. A male spouse is 7.2 percent more likely to have an affair than a female spouse. And a happy spouse is 27.4 percent less likely to have an affair than an unhappy spouse. I would argue that all of these effects are relatively large. Students may disagree.

2. If students use the OLS estimator and White robust standard errors, the appropriate test is the sampleF-test. They cannot do a separate t-test for each variable.

H0: edu, kids, and rel have no joint effect on affair

H1: At least one has an effect on affair

Test statistic: F ~ F(3, 593)

LOS: 0.05.

Critical value: 2.60 (Only if using critical value approach)

Calculated Statistic: 1.77

P-value: 0.15

Conclusion: 1.77 < 2.60 or 0.15 > 0.05 so accept the null.

Interpretation: There is insufficient evidence that we should add educ, kids, and/or rel to the model as control variables.

If students use the WLS estimator, then the appropriate test is a large sample test. If they use Stata’s test command, Stata reports the calculated value of the Wald statistic. Students should state they are using a Wald test. I will accept two possible answers for the Wald test. 1) Students add the variables educ, kids, and rel to the model and use WLS without calculating new weights that include these three variables. Technically this is not correct, but I will accept it. If they do this, W = 7.22, LOS = 0.05, critical value = 7.81, p-value = 0.065, accept the null. 2) Students add the variables educ, kids, and rel to the model and use WLS and calculate new weights that include these three variables. If they do this, W = 53.66, LOS = 0.05, critical value = 7.81, p-value = <0.0001, reject the null and conclude that at least one variable should be added to the model as a control variable.

3. A predicted probability ≥ 0.5 if a spouse has had an affair is a correct prediction. A predicted probability < 0.5 has not had an affair is correct prediction. The percent of correct predictions:

Linear probability using OLS: correct predictions/observations = 465/601 = 0.774 = 77.4%.

Linear probability model using WLS: correct predictions/observations = 463/601 = .770 = 77.0%.

Zero predicted probabilities are less than zero are greater than one for either the OLS or WLS estimators.

4. For the linear probability model with the OLS estimator, the predicted probability that a spouse with these characteristics will choose to have an affair is 0.49. For the linear probability model with WLS estimator, the prediction probability is 0.47. To obtain the predicted probability for both of these models, you find the predicted value of work for the specific values of the explanatory variables for which you are generating the prediction. I rounded the coefficient estimate to three places to the right of the decimal point. Students may have rounded differently. Do not take off points for rounding differences.

5. The coefficient estimates of the probit model:

Probit regression Number of obs = 601

LR chi2(4) = 43.58

Prob > chi2 = 0.0000

Log likelihood = -315.89977 Pseudo R2 = 0.0645

------

affair | Coef. Std. Err. z P>|z| [95% Conf. Interval]

------+------

yrsmarr | .0603472 .0167969 3.59 0.000 .0274259 .0932685

age | -.025387 .0101225 -2.51 0.012 -.0452266 -.0055473

male | .2370061 .1187708 2.00 0.046 .0042197 .4697925

happy | -.768723 .1559513 -4.93 0.000 -1.074382 -.463064

_cons | .1698041 .2804973 0.61 0.545 -.3799604 .7195687

------

The estimates of the marginal effects at the sample means:

. margins, dydx(*) atmean

Conditional marginal effects Number of obs = 601

Model VCE : OIM

Expression : Pr(affair), predict()

dy/dx w.r.t. : yrsmarr age male happy

at : yrsmarr = 8.177696 (mean)

age = 32.48752 (mean)

male = .4758735 (mean)

happy = .8635607 (mean)

------

| Delta-method

| dy/dx Std. Err. z P>|z| [95% Conf. Interval]

------+------

yrsmarr | .0186779 .0051776 3.61 0.000 .0085299 .0288259

age | -.0078575 .0031306 -2.51 0.012 -.0139934 -.0017215

male | .0733552 .0367173 2.00 0.046 .0013907 .1453197

happy | -.2379256 .0485818 -4.90 0.000 -.3331442 -.1427071

------

If they use the strength of evidence approach, then they should conclude that there is strong evidence that each variable has an effect because the p-values are 0.05 or smaller. If they use the hypothesis test approach and a 5% level of significance, then they can be 95% confident that each variable has an effect on the likelihood of an affair. The direction and size of the effects are as follows. A spouse is more likely to have an affair the longer he/she is married. A one year increase in length of marriage results in a 1.9 percent increase in the probability of an affair. The likelihood that a spouse will have an affair decreases with age. A spouse that is one year older is 0.8 percent less likely to have an affair. A male spouse is 7.3 percent more likely to have an affair than a female spouse. And a happy spouse is 23.8 percent less likely to have an affair than an unhappy spouse. I would argue that all of these effects are relatively large. Students may disagree.

6. When estimating a probit model, a large sample test must be used. Students may use either a Wald test or a likelihood ratio test. If they use Stata’s test command, Stata will report the Wald statistic that has a chi-square distribution. If students use the estimate store and lrtest commands Stata will report the likelihhod ratio statistic that also has a chi-square distribution. Make sure students state which test they are using.

H0: edu, kids, and rel have no joint effect on affair

H1: At least one has an effect on affair

Test statistic: either W ~ χ2(3) or LR ~ χ2(3)

LOS: 0.05.

Critical value: 7.81 (Only if using critical value approach)

Calculated Statistic: W = 6.48 or LR = 6.53

P-value: W = 0.090 or LR =0.088

Conclusion: Accept the null.

Interpretation: There is insufficient evidence that we should add educ, kids, and/or rel to the model as control variables.

7. Stata’s estat class command calculates the percent of correct predictions for the probit model.

------

Correctly classified 77.37%

------

The probit model makes77.4% correct predictions or 465. This is identical to the linear probability model using the OLS estimator and two more than the linear probability model using the WLS estimator.

8. For the probit model to find the predicted probability that a spouse with these characteristic will have an affair you find the predicted value of the index function for the specific values of the explanatory variables. Next, you find the normal cumulative probability for this predicted value of the index function. The predicted value of the index function is I^ = -0.044. The predicted probability is,

^ -0.044

P = ∫ ƒ(I) dI = 0.48

-∞

The predicted probability that a spouse with these characteristics will choose to have an affair is 48%.

9. The three models produce estimates of marginal probabilities and p-values that are very similar. The measures of goodness-of-fit are also almost identical. The linear probability models have no predicted probabilities that are less than zero or greater than one. As a result, students are justified in choosing any model; however, they should explain why they choose the specific model they do.

QUESTION #2

1. The OLS parameter estimates are,

. regress alcfatal treat d88 inter

Source | SS df MS Number of obs = 96

------+------F( 3, 92) = 0.35

Model | 6.92679961 3 2.3089332 Prob > F = 0.7863

Residual | 599.957074 92 6.52127255 R-squared = 0.0114

------+------Adj R-squared = -0.0208

Total | 606.883874 95 6.38825131 Root MSE = 2.5537

------

alcfatal | Coef. Std. Err. t P>|t| [95% Conf. Interval]

------+------

treat | .186257 .7397565 0.25 0.802 -1.282963 1.655477

d88 | -.4073116 .7082629 -0.58 0.567 -1.813983 .9993596

treatd88 | -.2444203 1.046174 -0.23 0.816 -2.322211 1.833371

_cons | 6.618389 .5008175 13.22 0.000 5.623722 7.613055

------

The estimates of the means (rounded to two places to the right of the decimal point) are,

Control group 1984: 6.62

Treatment group 1984: 6.62 + 0.19 = 6. 81

Control group 1988: 6.62 – 0.41 = 6.21

Treatment group 1988:6.62 – 0.41 – 0.24 = 5.97

2. The appropriate test is a t-test.

H0: β3 = 0; NMDA has no effect on alcohol related traffic fatalities.

H1: β3 ≠ 0; NMDA has an effect on alcohol related traffic fatalities.

Test statistic: t ~ t(92)

LOS: 0.05.

Critical value: 1.98 (Only if using critical value approach)

Calculated Statistic: 0.23

P-value: 0.82

Conclusion: 0.23 < 1.96 or 0.82 > 0.05 so accept the null.

Interpretation: There is insufficient evidence that the NMDA had an effect on alcohol related traffic fatalities.

3. The variable treat controls for factors that differ between treatment and control states but are the same over time that affect alcfatal. The variable d88 controls for factors that are the same for treatment and control states but vary over time that affect alcfatal. However, neither of these variables control for factors that differ across treatment and control states and vary over time that affect alcfatal. The variables incap, spirits, and beertax differ across states and vary over time. Because you believe they may affect alcfatal you include them as control variables.

4. The OLS estimates are,

. regress alcfatal treat d88 treatd88 incap spirits beertax

Source | SS df MS Number of obs = 96

------+------F( 6, 89) = 10.00

Model | 244.340718 6 40.7234531 Prob > F = 0.0000

Residual | 362.543156 89 4.0735186 R-squared = 0.4026

------+------Adj R-squared = 0.3623

Total | 606.883874 95 6.38825131 Root MSE = 2.0183

------

alcfatal | Coef. Std. Err. t P>|t| [95% Conf. Interval]

------+------

treat | .0212219 .5896134 0.04 0.971 -1.150327 1.192771

d88 | .6652238 .5928071 1.12 0.265 -.5126713 1.843119

treatd88 | -.050195 .8282523 -0.06 0.952 -1.695915 1.595525

incap | -.7360614 .1158265 -6.35 0.000 -.9662061 -.5059167

spirits | .6776822 .3785332 1.79 0.077 -.0744553 1.42982

beertax | .3439674 .4895968 0.70 0.484 -.6288511 1.316786

_cons | 15.26348 1.499184 10.18 0.000 12.28463 18.24233

------

2. The appropriate test is a t-test.

H0: β3 = 0; NMDA has no effect on alcohol related traffic fatalities.

H1: β3 ≠ 0; NMDA has an effect on alcohol related traffic fatalities.

Test statistic: t ~ t(90)

LOS: 0.05.

Critical value: 1.98 (Only if using critical value approach)

Calculated Statistic: 0.06

P-value: 0.95

Conclusion: 0.06 < 1.96 or 0.95 > 0.05 so accept the null.

Interpretation: There is insufficient evidence that the NMDA had an effect on alcohol related traffic fatalities.

The result is the same for the models with and without the additional control variables.

5. We can conclude that there is insufficient evidence that the NMDA reduced alcohol related traffic fatalities.

QUESTION #3

1. The OLS estimates with White robust standard errors.

reg lpgas lgastax lincap lpoil ldriverscap urban demgov, robust

Linear regression Number of obs = 1920

F( 6, 1913) = 7376.20

Prob > F = 0.0000

R-squared = 0.9679

Root MSE = .09681

------

| Robust

lpgas | Coef. Std. Err. t P>|t| [95% Conf. Interval]

------+------

lgastax | .3186664 .0069443 45.89 0.000 .3050472 .3322856

lincap | .1981295 .0173286 11.43 0.000 .1641446 .2321145

lpoil | .4867678 .0041722 116.67 0.000 .4785852 .4949504

ldriverscap | -.1127667 .0328469 -3.43 0.001 -.1771862 -.0483472

urban | -.0008579 .0001458 -5.88 0.000 -.0011439 -.0005719

demgov | -.0132662 .0045068 -2.94 0.003 -.022105 -.0044274

_cons | 1.729541 .0330089 52.40 0.000 1.664804 1.794278

------

The OLS estimates with cluster robust standard errors.

. reg lpgas lgastax lincap lpoil ldriverscap urban demgov, vce(cluster id)

Linear regression Number of obs = 1920

F( 6, 47) =15575.69

Prob > F = 0.0000

R-squared = 0.9679

Root MSE = .09681

(Std. Err. adjusted for 48 clusters in id)

------

| Robust

lpgas | Coef. Std. Err. t P>|t| [95% Conf. Interval]

------+------

lgastax | .3186664 .0090909 35.05 0.000 .3003779 .3369549

lincap | .1981295 .0263951 7.51 0.000 .1450295 .2512296

lpoil | .4867678 .0038 128.10 0.000 .4791232 .4944124

ldriverscap | -.1127667 .0439599 -2.57 0.014 -.2012026 -.0243307

urban | -.0008579 .0001857 -4.62 0.000 -.0012315 -.0004843

demgov | -.0132662 .0064787 -2.05 0.046 -.0262997 -.0002327

_cons | 1.729541 .0450334 38.41 0.000 1.638946 1.820137

------

White robust standard errors are corrected for heteroscedasticity. Cluster robust standard errors are corrected for both heteroscedasticity and the correlation of errors. For example, states where a large portion of the population prefer larger fuel inefficient vehicles would be expected to have a persistently bigger demand for gasoline and a higher price of gasoline than states where a large portion of the population prefer smaller fuel efficient vehicles over the period 1969 to 2008. Since vehicle size is an unobserved variable, its effect on the price of gasoline is captured by the error term. As a result, the error would be correlated over time. Because the error term is correlated, the White robust estimates of the standard errors, t-statistics, and p-values will be biased and inconsistent. The standard errors and t-statistics for the gas tax and income are noticeably different for the two models. The cluster robust standard errors are noticeably higher and t-statistics lower than the White robust standard errors. However, a the hypothesis of no effect is still rejected at the 0.05% level of significance so the conclusions of the two models are still the same.

2. The vi parameters capture the net effect on the price of gasoline of all factors that vary across states but not over time. An example may be preferences for large and small vehicles that have different fuel efficiency, and therefore affect the demand for gasoline. λt captures the net effect on the price of gasoline of all factors that vary over time but affect all states. An example may be federal fuel economy standards. The fixed-effects model assumes that the vi are constant parameters. Each state has its own parameter. The reason that lpoil is dropped from the model is that the price of crude oil is the same for each state but varies over the period 1969 to 2008. As a result, its effect is captured by the time effects λt. If lpoil is included in the model this would result in perfect multicollinearity and it would not be possible to obtain estimates of the parameters. Omitting lpoil will not result in a biased estimate of the gas tax or income because the time effects control for it.

3. The random-effects model assumes the unobserved factors that affect the price of gasoline that differ across states but not over time are not correlated with the gas-tax or income. If they are, then the random-effects estimator will result in a biased estimate of the coefficients of these variables. The fixed-effects estimator controls for the state-specific unobserved factors, and therefore produces unbiased effects of the coefficients of the gas tax and income. It is very likely that vi is correlated with at least one of the variables of interest. To obtain unbiased estimates, we therefore should use the fixed-effects estimator.

4. The fixed-effects model with time-effects.

. xtreg lpgas lgastax lincap ldriverscap urban demgov i.year, fe vce(cluster id)

Fixed-effects (within) regression Number of obs = 1920

Group variable: id Number of groups = 48

R-sq: within = 0.9959 Obs per group: min = 40

between = 0.4890 avg = 40.0

overall = 0.9943 max = 40

F(44,47) = 45816.27

corr(u_i, Xb) = -0.0159 Prob > F = 0.0000

(Std. Err. adjusted for 48 clusters in id)

------

| Robust

lpgas | Coef. Std. Err. t P>|t| [95% Conf. Interval]

------+------

lgastax | .195219 .0222283 8.78 0.000 .1505014 .2399367

lincap | .1547357 .0558863 2.77 0.008 .042307 .2671644

ldriverscap | -.0772104 .0385607 -2.00 0.051 -.1547846 .0003637

urban | -.0012536 .0010736 -1.17 0.249 -.0034133 .0009061

demgov | .0010346 .0041814 0.25 0.806 -.0073774 .0094466

|

year |

1970 | .0166663 .0038817 4.29 0.000 .0088573 .0244752

1971 | .0299664 .0050335 5.95 0.000 .0198404 .0400924

1972 | .0061514 .0086778 0.71 0.482 -.011306 .0236088

1973 | .0709282 .0099009 7.16 0.000 .0510102 .0908463

1974 | .3910152 .0095469 40.96 0.000 .3718093 .4102211

1975 | .4702486 .009442 49.80 0.000 .4512539 .4892434

1976 | .5041567 .0119497 42.19 0.000 .480117 .5281964

1977 | .5567007 .0135334 41.14 0.000 .529475 .5839263

1978 | .5770016 .0153512 37.59 0.000 .546119 .6078842

1979 | .8797696 .0147359 59.70 0.000 .8501249 .9094144

1980 | 1.2024 .0137522 87.43 0.000 1.174735 1.230066

1981 | 1.293619 .0150731 85.82 0.000 1.263296 1.323942

1982 | 1.241744 .0154384 80.43 0.000 1.210686 1.272802

1983 | 1.042536 .0190136 54.83 0.000 1.004286 1.080787

1984 | 1.002608 .0220062 45.56 0.000 .9583367 1.046878

1985 | 1.011917 .0232801 43.47 0.000 .9650836 1.058751

1986 | .7215069 .023754 30.37 0.000 .6737199 .7692938

1987 | .7704161 .0259064 29.74 0.000 .718299 .8225331

1988 | .7790686 .0260096 29.95 0.000 .726744 .8313932

1989 | .8660549 .0278986 31.04 0.000 .8099303 .9221796

1990 | .9467669 .0320885 29.50 0.000 .8822132 1.011321

1991 | .9176558 .03198 28.69 0.000 .8533203 .9819913

1992 | .9072793 .0326255 27.81 0.000 .8416452 .9729134

1993 | .8661196 .0357824 24.21 0.000 .7941347 .9381044

1994 | .8800837 .0363741 24.20 0.000 .8069085 .9532588

1995 | .9042924 .0363463 24.88 0.000 .8311731 .9774116

1996 | .9661742 .0374033 25.83 0.000 .8909286 1.04142

1997 | .9579933 .0380335 25.19 0.000 .8814797 1.034507

1998 | .7985868 .0398831 20.02 0.000 .7183523 .8788213

1999 | .8864837 .0407022 21.78 0.000 .8046014 .9683659

2000 | 1.140019 .0415611 27.43 0.000 1.056409 1.223629

2001 | 1.053134 .0429826 24.50 0.000 .9666646 1.139604

2002 | .9856958 .0441587 22.32 0.000 .8968599 1.074532

2003 | 1.124616 .0443629 25.35 0.000 1.03537 1.213863

2004 | 1.298252 .045543 28.51 0.000 1.206632 1.389873

2005 | 1.500578 .045798 32.77 0.000 1.408444 1.592711

2006 | 1.621648 .0466409 34.77 0.000 1.527819 1.715478

2007 | 1.703264 .047537 35.83 0.000 1.607632 1.798896

2008 | 1.852395 .046949 39.46 0.000 1.757945 1.946844

|

_cons | 2.796464 .1558113 17.95 0.000 2.483012 3.109915

------+------

sigma_u | .02179087

sigma_e | .03533537

rho | .27552136 (fraction of variance due to u_i)

------

The estimate of β2 is noticeably smaller for the fixed-effects model than the classical model. It decreases from 0.32 to 0.19. The estimate of β3 is also smaller for the fixed effects model than the classical model, but the difference in the two estimates is much less. For both models, there is strong evidence that the gas tax and income have an effect on the price of gasoline. A comparison of the estimates for the fixed-effects and classical model suggests that the OLS estimates for the classical model are biased upward. This is particularly the case for the estimate of the coefficient of the gas tax. This supports the argument of the economists at the Energy Department that you did not adequately control for enough potential confounding factors, and therefore the OLS estimates of the coefficient of the excise tax and income are biased.

5. There is strong evidence that both the gasoline tax and income have an effect on the price of gasoline and the effects are positive. The size of the effects is indicated by the coefficient estimates. A 1 percent increase in the gasoline tax, ceteris paribus, results in a 0.19 percent increase in the price of gasoline. A 1 percent increase in income, ceteris paribus, results in a 0.15 percent increase in the price of gasoline. Because these are elasticity estimates, each variable is inelastic. This suggests that the price of gasoline is not very responsive to a change in the gasoline tax or consumer income, and therefore the size of the effects are relatively small. Because the elasticity estimate for the gasoline tax is bigger than income, there is evidence that the gasoline tax has a bigger effect than income on the price of gasoline; however, the difference is relatively small.

1