Assignment 4

  1. 1a

    Q1. In each of the following situations will the OLS estimator be biased? Explain why or why not.

    (a) The variance of the random errors is not constant.

  2. 1b

    (b) A variable that affects the outcome variable is missing from the model.

  3. 1c

    (c) Two of the explanatory variables have a high correlation of 0.95.

  4. 2a

    Q2. Consider the following estimated regression on N=706N = 706 observations.

    sleep^=3,638.25−0.148 totwrk−11.13 educ+2.20 age\widehat{sleep} = 3{,}638.25 - 0.148\,totwrk - 11.13\,educ + 2.20\,age

    Standard errors: intercept 112.28, totwrk 0.017, educ 5.88, age 1.45. The goodness-of-fit is R2=0.113R^2 = 0.113.

    (a) Are educ and age each statistically significantly different from zero at α=5%\alpha = 5\%? (Make sure to show how you calculate the t-statistic.)

  5. 2b

    (b) Test the hypothesis that the effect size of totwrk is positive (at α=5%\alpha = 5\%).

  6. 2c

    (c) Running the regression omitting educ and age we estimate the following, with R2=0.103R^2 = 0.103:

    sleep^=3,586.38−0.151 totwrk\widehat{sleep} = 3{,}586.38 - 0.151\,totwrk

    Standard errors: intercept 38.91, totwrk 0.017.

    Are educ and age jointly statistically significant in the original estimation at α=5%\alpha = 5\%? (Hint: when the unrestricted and restricted models have the same outcome variable, there are two ways to calculate the F-statistic, one using the sums of squared residuals and one using the R2R^2 values.)

  7. 2d

    (d) Does inclusion of educ and age have an impact on the marginal effect of totwrk on sleep?

  8. 3a

    Questions 3 to 5 use the dataset BWGHT2_v2026 on child birthweight (the same data as Assignment 1). No R is needed for these questions.

    Q3. All-controls regression. The results below show the estimated effect of the average number of cigarettes smoked on child birthweight, controlling for npvis, mage and drink. The variable magesq is the mother's age squared and npvissq is the number of physician visits squared.

    Model lm.BW.control: bwght ~ cigs + npvis + npvissq + mage + magesq + drink

    Term Estimate Std. Error t p-value
    (Intercept) 2188.3556 459.9037 4.758 2.17e-06
    cigs -10.9866 3.9199 -2.803 0.00514
    npvis 30.9516 11.4014 2.715 0.00672
    npvissq -0.5838 0.3595 -1.624 0.10465
    mage 62.7780 31.0093 2.024 0.04312
    magesq -0.9919 0.5199 -1.908 0.05660
    drink -5.1426 56.5638 -0.091 0.92757

    Residual SE 567.7 on 1325 df (133 observations deleted for missingness); R2=0.02363R^2=0.02363, adjusted R2=0.01921R^2=0.01921; F=5.344F=5.344 on (6, 1325), p=1.836×10−5p=1.836\times10^{-5}.

    (a) Test the significance of the control variables in the regression. Report which ones are statistically significant at α=5%\alpha = 5\% and which ones are not.

  9. 3b

    (b) For any variables that are statistically significant, interpret the coefficient estimates.

  10. 3c

    (c) What is the predicted birthweight for a woman aged 30, who smokes 20 cigarettes a day, does not drink, and visited the physician 5 times during her pregnancy? What is the birthweight of a baby born to a woman with identical characteristics except she does not smoke?

  11. 3d

    (d) What is the predicted difference in birthweight of a baby whose mother never visited the doctor and who smoked 20 cigarettes a day, and one whose mother visited the doctor 8 times and who never smoked? Assume both mothers are the same age and drink the same amount.

  12. 4a

    Q4. Quadratic terms.

    (a) Consider the variable measuring the squared number of visits to the physician (npvissq). Why might we want to include this variable in our model? Given the level of significance of this variable, what can we say about the relationship between child birthweight and number of physician visits?

  13. 4b

    (b) What is the optimal age to give birth if the goal is to reach the highest birthweight?

  14. 5a

    Q5. Model specification. The researcher wishes to test the significance of all the controls jointly. The R call anova(lm.BW.control, lm.BW), comparing the model with all controls to lm.BW (bwght ~ cigs), returns an error.

    (a) Explain the error above. Why does it occur?

  15. 5b

    (b) Consider the output below (lm.BW.R is bwght ~ cigs, refitted on the control model's sample). What null hypothesis is being tested? What is the alternative hypothesis? What is the test statistic? Can we reject the null hypothesis at the 5% significance level?

    Model Res.Df RSS Df Sum of Sq F p-value
    1 (unrestricted) 1325 426969123
    2 (restricted) 1330 433648214 -5 -6679091 4.1454 0.0009681
  16. 5c

    (c) The coefficient on number of cigarettes smoked each day in lm.BW.R is −12.906-12.906. What can we learn from the comparison of this with the coefficient from lm.BW.control (−10.98-10.98)? (Hint: in your answer refer to A2 in the Gauss-Markov assumptions.)

  17. 6a

    Part B. Multivariate regression, discrimination dataset. Use the file DISCRIM_v2026. This dataset was taken from research on discrimination in the United States. The claim was that fast-food restaurants charge higher prices in neighborhoods where a higher percentage of the population was black. Each observation ii is a different zipcode in New Jersey. The variables measure prices for different items at the restaurants and demographic characteristics of the populations living in the area.

    Q6. Data exploration.

    (a) Calculate the sample averages and standard deviations for the variables prpblck, psoda and density.

  18. 6b

    (b) Create a scatterplot comparing price of soda (y-axis) against the proportion of black people.

    (c) Create a scatterplot comparing price of soda (y-axis) against income.

  19. 6d

    (d) What can we learn from the scatterplots about the correct model and the relation between these variables?

  20. 7a

    Q7. Regression model. Consider the log-log model that explains the price of soda as a function of the proportion of black people living in the zipcode, and population density. Model (1):

    log⁡(psodai)=β0+β1log⁡(prpblcki)+β2log⁡(densityi)+ui\log(psoda_i)=\beta_0+\beta_1\log(prpblck_i)+\beta_2\log(density_i)+u_i

    (a) Report the results of the OLS estimation of this regression in the form of a formula. (Hint: use the variables lpsoda, lprpblck, ldensity.)

  21. 7b

    (b) Test if the estimated parameters are each (separately) statistically significant (at α=10%\alpha = 10\%), and report the minimal statistical significance level for each variable.

  22. 7c

    (c) Interpret the estimated coefficient of lprpblck. Discuss whether or not you think it is economically significant (meaningful).

  23. 8a

    Q8. Restricted model.

    (a) Run the single-variate regression of lpsoda (outcome) on lprpblck. Model (2):

    log⁡(psodai)=β0+β1log⁡(prpblcki)+ui\log(psoda_i)=\beta_0+\beta_1\log(prpblck_i)+u_i
  24. 8b

    (b) Compare the estimated β1\beta_1 in Model (1) to that from Model (2). Is the effect of discrimination larger or smaller when we control for population density?

  25. 8c

    (c) Use an F-test to test the null hypothesis that β2=0\beta_2 = 0 in Model (1).

  26. 9a

    Q9. Control model. Add another explanatory variable to create Model (3):

    log⁡(psodai)=β0+β1log⁡(prpblcki)+β2log⁡(densityi)+β3log⁡(hsevali)+β4log⁡(incomei)+ui\log(psoda_i)=\beta_0+\beta_1\log(prpblck_i)+\beta_2\log(density_i)+\beta_3\log(hseval_i)+\beta_4\log(income_i)+u_i

    (a) Report the results of adding the variables lhseval and lincome to the model. Write the new estimated regression model in the form of a formula.

  27. 9b

    (b) Test the hypothesis that these two newly added variables do not belong in the model.

  28. 9c

    (c) Compare β^1\hat\beta_1, the estimated coefficient of lprpblck, to your estimate from Model (1).

  29. 10a

    Q10. Multicollinearity.

    (a) What is the linear correlation between the variables lprpblck and ldensity? What are the implications of this correlation (if any) on your OLS estimates for Model (1)?

  30. 10b

    (b) What is the linear correlation between the variables lhseval and lincome? What are the implications of this correlation (if any) on your OLS estimates for Model (3)?

Solutions are Alfie's submitted work, not an official key.

Related: Lec_08-Goodness of Fit & Multicollinearity, Lec_13-Exam Review