8.9 Practice problems

Work each one before opening the solution. The question bank that follows has no answers.

Numerical problems

8.1 A researcher estimates the effect of fertiliser on rice yield across farms, first alone and then controlling for irrigation:

\[\widehat{\text{yield}} = 12.4 + 0.85\,\text{fert} \qquad\qquad \widehat{\text{yield}} = 9.1 + 0.52\,\text{fert} + 6.3\,\text{irrig}\]

where irrig is hectares under irrigation.

  1. Interpret 0.52 precisely.
  2. Using the omitted variable bias formula, what must be the sign of the relationship between fertiliser use and irrigation?
  3. Compute the implied slope from a regression of irrigation on fertiliser.

(i) Among farms with the same irrigated area, one additional unit of fertiliser is associated with 0.52 more quintals of yield on average.

(ii) The short regression gives 0.85 and the long one 0.52, so the bias is \(0.85 - 0.52 = +0.33\). Since \(\beta_2 = 6.3 > 0\), the bias formula \(\beta_2\delta_1 = 0.33\) requires \(\delta_1 > 0\). Farms using more fertiliser also have more irrigation — plausible, since both are investments made by better-resourced farms.

(iii) \(\delta_1 = 0.33 / 6.3 = 0.052\) hectares of irrigation per unit of fertiliser.

8.2 A regression of household consumption on income and household size gives \(R^2 = 0.68\) with \(n = 240\).

  1. State the null hypothesis of the overall \(F\) test and compute the statistic.
  2. The 5% critical value with 2 and 237 degrees of freedom is 3.03. What do you conclude?

(i) \(H_0: \beta_1 = \beta_2 = 0\); both slopes are zero. With \(k = 2\) and \(n - k - 1 = 237\),

\[F = \frac{0.68/2}{(1-0.68)/237} = \frac{0.34}{0.00135} = 251.8\]

(ii) \(251.8 \gg 3.03\), so we reject decisively. Income and household size together explain a substantial share of variation in consumption. As Section 8.6 notes, this is a low bar and rejecting it establishes little beyond the model not being empty.

8.3 An unrestricted model with 5 explanatory variables and \(n = 90\) has \(\text{SSR}_{ur} = 148\). Dropping three of them gives \(\text{SSR}_r = 176\).

  1. Compute the \(F\) statistic.
  2. With 3 and 84 degrees of freedom the 5% critical value is 2.71. Conclude.
  3. Why must \(\text{SSR}_r\) exceed \(\text{SSR}_{ur}\)?

(i) \(q = 3\), \(n - k - 1 = 90 - 5 - 1 = 84\).

\[F = \frac{(176 - 148)/3}{148/84} = \frac{9.333}{1.762} = 5.30\]

(ii) \(5.30 > 2.71\): reject. At least one of the three dropped variables has a non-zero coefficient.

(iii) The unrestricted model can always reproduce the restricted one by setting those three coefficients to zero, and least squares chooses the values that minimise SSR. So the unrestricted SSR can never be larger.

8.4 In a wage regression, \(R_j^2\) from regressing years of education on the other explanatory variables is 0.10 in one specification and 0.90 in another. Holding \(\sigma^2\) and \(\sum(x_{ij}-\bar{x}_j)^2\) fixed, by what factor does the standard error of the education coefficient differ between the two?

The variance is proportional to \(1/(1-R_j^2)\), so the standard error is proportional to \(1/\sqrt{1-R_j^2}\).

\[\frac{\sqrt{1/(1-0.90)}}{\sqrt{1/(1-0.10)}} = \sqrt{\frac{0.90}{0.10}} = 3\]

The standard error is three times larger in the second specification. The point estimate may be no better; the reported uncertainty is three times worse.

Concept checks

8.5 A student says: “The coefficient on attendance fell from 0.189 to 0.136 when I added controls, so the controls made the estimate worse.” Respond.

The two numbers answer different questions, so neither is a corrupted version of the other. 0.189 compares all students to all students; 0.136 compares students alike in prior record.

If the goal is to describe how grades vary with attendance in the population, 0.189 is the correct answer to that question. If the goal is to isolate what attendance contributes, 0.136 is closer, because one identified source of contamination has been removed.

“Worse” presumes a target. The change is evidence that prior record was contributing to the simple slope — which is exactly what we suspected.

8.6 Explain why a variable that is strongly correlated with \(y\) can be insignificant in a multiple regression.

By Section 8.3, the coefficient uses only the part of the variable that the other regressors cannot explain. If the variable is closely related to the other regressors, that remaining part is small, and a small amount of variation supports only an imprecise estimate.

The variable may be strongly related to \(y\) while contributing nothing the other variables have not already contributed. That is a statement about what the variable adds, not about whether it matters.

8.7 A regression includes both attendance and classes_missed, and R reports NA for the second. Explain what has happened and what should be done.

The two sum to 32 for every student, so one is an exact linear function of the other and CLRM7 fails. There is no observation for which attendance changes while classes missed does not, so the ceteris paribus comparison the coefficient refers to does not exist in the data.

R drops one variable and reports NA rather than failing. The remedy is to include only one of them: they carry identical information.

8.8 Two variables are individually insignificant at 5% but jointly significant at 1%. What should be concluded, and what should not?

Conclude that at least one of the two has a non-zero coefficient, and that the data cannot say which — a signature of strongly correlated regressors.

Do not conclude that both are irrelevant, and do not drop both on the strength of the two \(t\)-tests. Do not conclude that both matter either: the joint test is silent about which.

R exercises

8.9 Using attendance-grades.csv, verify the Frisch–Waugh–Lovell result for cum_gpa rather than attendance: regress cum_gpa on the other two regressors, keep the residuals, regress sem_gpa on them, and compare the slope with the multiple regression coefficient.

students <- read.csv("data/attendance-grades.csv")
full <- lm(sem_gpa ~ attendance + cum_gpa + admission_score, data = students)

r <- residuals(lm(cum_gpa ~ attendance + admission_score, data = students))

c(two_step = coef(lm(students$sem_gpa ~ r))[2],
  direct   = coef(full)["cum_gpa"])

The two agree to machine precision. The result holds for every coefficient, not just the one of interest — each is the slope from a regression on the part of its own variable that the others cannot explain.

8.10 Using wages-india-synthetic.csv, test whether sex and residence jointly belong in a regression of annual earnings on education and age. Report the \(F\) statistic, its degrees of freedom and your conclusion.

wages <- read.csv("data/wages-india-synthetic.csv")
wages$male  <- as.integer(wages$sex == "Male")
wages$urban <- as.integer(wages$residence == "Urban")

r  <- lm(annual_earnings ~ education + age, data = wages)
ur <- lm(annual_earnings ~ education + age + male + urban, data = wages)

anova(r, ur)

\(F = 900.9\) on 2 and 19,995 degrees of freedom, with a \(p\)-value below any printable threshold. Sex and residence belong in the model.

That they belong does not make the model causal. It says earnings differ systematically by sex and residence among people of the same education and age — a fact about the labour market, not an explanation of it.

8.11 Show by simulation that omitted variable bias behaves as the formula predicts. Generate \(x_2\) correlated with \(x_1\), construct \(y = 1 + 2x_1 + 3x_2 + u\), estimate the short regression 2,000 times, and compare the average \(\hat{\alpha}_1\) with \(\beta_1 + \beta_2\delta_1\).

set.seed(20)
n <- 200

results <- replicate(2000, {
  x1 <- rnorm(n)
  x2 <- 0.5 * x1 + rnorm(n)              # delta_1 = 0.5 by construction
  y  <- 1 + 2 * x1 + 3 * x2 + rnorm(n, sd = 2)
  c(short = coef(lm(y ~ x1))[2], long = coef(lm(y ~ x1 + x2))[2])
})

c(mean_short = mean(results["short.x1", ]),
  predicted  = 2 + 3 * 0.5,
  mean_long  = mean(results["long.x1", ]))

The short regression averages about 3.5, matching \(\beta_1 + \beta_2\delta_1 = 2 + 3(0.5)\). The long regression averages about 2, the true value.

The bias does not shrink with sample size. Increasing \(n\) to 20,000 leaves it where it is — bias is not sampling error, and no amount of data removes it.

8.12 Investigate the cost of a redundant control. Regress sem_gpa on attendance alone, then add cum_gpa, then add a variable constructed to be almost identical to attendance. Compare the standard errors and explain.

students <- read.csv("data/attendance-grades.csv")
set.seed(5)
students$attendance_copy <- students$attendance + rnorm(nrow(students), sd = 0.4)

se <- function(m) round(coef(summary(m))["attendance", 2], 4)

c(alone      = se(lm(sem_gpa ~ attendance, data = students)),
  plus_cum   = se(lm(sem_gpa ~ attendance + cum_gpa, data = students)),
  plus_copy  = se(lm(sem_gpa ~ attendance + attendance_copy, data = students)))

Adding cum_gpa barely moves the standard error and removes a real source of bias. Adding the near-copy inflates it enormously while contributing no information at all: \(R_j^2\) for attendance is now close to one, so \((1-R_j^2)\) is close to zero.

This is the practical content of Section 8.4. Controls are not free, and a control that duplicates the variable of interest is all cost.