Assignment 4
- #intro-econometrics
- #assignment
- #OLS
- #omitted-variable-bias
- #F-test
- #t-test
- #quadratic
- #multicollinearity
- #log-log
Toolkit
- 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.
- 1b
(b) A variable that affects the outcome variable is missing from the model.
- 1c
(c) Two of the explanatory variables have a high correlation of 0.95.
- 2a
Q2. Consider the following estimated regression on observations.
Standard errors: intercept 112.28, totwrk 0.017, educ 5.88, age 1.45. The goodness-of-fit is .
(a) Are educ and age each statistically significantly different from zero at ? (Make sure to show how you calculate the t-statistic.)
- 2b
(b) Test the hypothesis that the effect size of totwrk is positive (at ).
- 2c
(c) Running the regression omitting educ and age we estimate the following, with :
Standard errors: intercept 38.91, totwrk 0.017.
Are educ and age jointly statistically significant in the original estimation at ? (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 values.)
- 2d
(d) Does inclusion of educ and age have an impact on the marginal effect of totwrk on sleep?
- 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 + drinkTerm 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); , adjusted ; on (6, 1325), .
(a) Test the significance of the control variables in the regression. Report which ones are statistically significant at and which ones are not.
- 3b
(b) For any variables that are statistically significant, interpret the coefficient estimates.
- 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?
- 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.
- 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?
- 4b
(b) What is the optimal age to give birth if the goal is to reach the highest birthweight?
- 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 tolm.BW(bwght ~ cigs), returns an error.(a) Explain the error above. Why does it occur?
- 5b
(b) Consider the output below (
lm.BW.Risbwght ~ 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 - 5c
(c) The coefficient on number of cigarettes smoked each day in
lm.BW.Ris . What can we learn from the comparison of this with the coefficient fromlm.BW.control()? (Hint: in your answer refer to A2 in the Gauss-Markov assumptions.) - 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 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.
- 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.
- 6d
(d) What can we learn from the scatterplots about the correct model and the relation between these variables?
- 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):
(a) Report the results of the OLS estimation of this regression in the form of a formula. (Hint: use the variables lpsoda, lprpblck, ldensity.)
- 7b
(b) Test if the estimated parameters are each (separately) statistically significant (at ), and report the minimal statistical significance level for each variable.
- 7c
(c) Interpret the estimated coefficient of lprpblck. Discuss whether or not you think it is economically significant (meaningful).
- 8a
Q8. Restricted model.
(a) Run the single-variate regression of lpsoda (outcome) on lprpblck. Model (2):
- 8b
(b) Compare the estimated in Model (1) to that from Model (2). Is the effect of discrimination larger or smaller when we control for population density?
- 8c
(c) Use an F-test to test the null hypothesis that in Model (1).
- 9a
Q9. Control model. Add another explanatory variable to create Model (3):
(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.
- 9b
(b) Test the hypothesis that these two newly added variables do not belong in the model.
- 9c
(c) Compare , the estimated coefficient of lprpblck, to your estimate from Model (1).
- 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)?
- 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