Assignment 5
- #intro-econometrics
- #assignment
- #solutions
- #answer-key
- #OLS
- #F-test
- #goodness-of-fit
- #quadratic
- #dummy-variables
- #interaction-terms
- #omitted-variable-bias
- #chow-test
- #wage-regression
Toolkit
- A1a
Part A, NBA salaries. This question uses data on player statistics for 269 players in the National Basketball Association (NBA). Consider the model that predicts the number of points scored in a game (points) as a function of years in the league (exper), age, and years played in college (coll). The first version of this model (1) is estimated below and includes the variable experience squared (expersq).
Model (1):
lm(points ~ exper + expersq + age + coll)Term Estimate Std. Error t p-value (Intercept) 34.984 6.971 5.018 9.6e-07 exper 2.337 0.405 5.776 2.1e-08 expersq -0.07577 0.02343 -3.234 0.0014 age -1.062 0.294 -3.606 0.0004 coll -1.276 0.450 -2.838 0.0049 , adjusted , residual SE on 264 df, F-statistic on , .
Q1. Model fit.
(a) Using the output above, conduct a test on the goodness-of-fit of the model, making sure to explicitly state the null hypothesis.
- A1b
(b) Is the model a good fit? At what significance level?
- A2
Q2. Quadratics. Holding age and years in college fixed, at what level of experience (years in the league) does one additional year in the league lower the number of points scored in a game? Is this reasonable?
- A3
Q3. Why might the variable for number of years in college have a negative, statistically significant, coefficient? (Hint: the NBA can draft players before they graduate from college, and even right out of high school.)
- A4a
Q4. The second version of the model (2) includes the variable age squared (agesq).
Model (2):
lm(points ~ exper + expersq + age + agesq + coll)Term Estimate Std. Error t p-value (Intercept) 73.863 35.850 2.060 0.040 exper 2.844 0.611 4.652 5.2e-06 expersq -0.1275 0.0523 -2.437 0.015 age -4.010 2.683 -1.495 0.136 agesq 0.05426 0.04908 1.106 0.270 coll -1.303 0.450 -2.894 0.004 , adjusted , F on .
(a) Is it necessary to include age squared in the model?
- A4b
(b) What does it tell us about the effect that age has, given that we control for years in the league (exper) and years played in college (coll)?
- A5a
Q5. The output below shows the regression of log(wage) (lwage) on points, exper, expersq, age, and coll.
lm(lwage ~ exper + expersq + points + age + coll)Term Estimate Std. Error t p-value (Intercept) 6.793 0.846 8.033 2.2e-14 exper 0.2194 0.0498 4.409 1.5e-05 expersq -0.00717 0.00271 -2.588 0.010 points 0.07789 0.00713 10.919 <2e-16 age -0.04898 0.03496 -1.401 0.163 coll -0.04056 0.05290 -0.767 0.444 , F on .
(a) Are age and coll statistically significant in the wage regression?
- A5b
(b) Given the results from the first model (1), what might we be concerned about with respect to the inclusion of experience and points in the wage equation?
- B1ab
Part B, post-secondary education. Use the dataset
mosad_v2026.xlsx(mosad means institution in Hebrew). It is a sample dataset from the Israeli central bureau of statistics. The survey contains 31,000 individuals who completed their undergraduate degrees in the early 2000s. 46% studied at universities and the rest were at colleges ("mechlalot") which are either government subsidized or private.Q1. Data exploration.
(a) Create a dummy variable for each field of study (social science, business, law, engineering, computer science, or design) using the categorical variable thum. (Hint: use either
as.numeric()orifelse()and make sure that your dummy variables take values of 0 or 1 and not TRUE or FALSE.)(b) Create dummy variables for each type of degree-granting institution (university, subsidized college, and non-subsidized college) using the variable mosad_type4.
- B1c
(c) Create the outcome variable log_wageafter3: the log of the average monthly wage three years after completing the degree (wageafter3). Provide a statistical description of the sample distribution for this variable.
- B1d
(d) How does the distribution of log_wageafter3 change for each type of degree-granting institution?
- B1e
(e) Create a variable experience measuring the total number of months worked for the first three years after graduation (including year of degree completion). (Hint: unlike in part c, you should add up all four variables on number of months worked.)
- B1f
(f) How does the distribution of experience (from 1e) change for each type of degree-granting institution?
- B1g
(g) What is your opinion? Are students who graduate university vs. those from colleges similar in how much they earn three years out?
- B2a
Q2. Wage regression.
(a) Run a log-level regression using your outcome variable (log monthly wage 3 years after completing the degree). The explanatory variables are: degree-granting institution (use private as the base category), field of study (use computer science as the base category), gender, and experience. Use the respective dummy variables you created in Q1. (Hint: your final model should have 10 parameters including the intercept.)
- B2b
(b) Interpret the coefficient estimates and report on their significance.
- B2c
(c) Is there a significant difference between the three types of degree-granting institutions? Conduct the appropriate hypothesis test.
- B3ab
Q3. Omitted variables.
(a) Rerun the regression in (2a), this time adding the explanatory variable for IQ proxy.
(b) How does inclusion of IQ proxy affect the estimation results?
- B3c
(c) A colleague of yours claims that the difference in wages between university and college graduates are not due to gaps in quality of institution but rather because better students opt to attend university. Do your regression results support this claim?
- B4a
Q4. Interactions (answerable after the lecture on interaction terms).
(a) Use interaction terms to run a regression to check if the rate of return of wage from experience is different between university and colleges. (Hint: create new variables representing the interaction terms between your dummies on degree-granting institution and experience.)
- B4b
(b) Use an F-test to check if experience has a different rate of return depending on the institution type.
- B5a
Q5. Separate regressions.
(a) Run the regression from (3a) separately for each type of degree-granting institution: university, subsidized college, and non-subsidized college.
- B5b
(b) Use the results from (5a) to compare the predicted wage between someone who studied at a non-subsidized college versus a university. The person is a woman with 35 months of experience and a psychometric entrance exam score of 710 who studied business.
- B5c
(c) Repeat (5b) above except this time use the regression results from (3a).
- B5d
(d) Explain the differences between the predictions in 5b and 5c.
- B6
Q6. Conduct a Chow-Fisher test of structural change between the three degree-granting institutions and address the significance of the test. You can use either version of the test (optional: try both!).
Solutions are Alfie's submitted work, not an official key.
Related: Lec_08-Goodness of Fit & Multicollinearity, Lec_10-Dummy Variables, Lec_11-Interaction Terms