Problem Set 4

Handed out: February 16, 2026 | Due: February 25, 2026

Submit on Gradescope

Download RR2010.dta from Canvas

1. Nonparametric Regression Estimation

(40 points total)

Load the RR2010 dataset from Carmen M. Reinhart and Kenneth S. Rogoff (2010) “Growth in a Time of Debt,” American Economic Review: Papers and Proceedings, 573-578. It contains observations on annual U.S. GDP growth rates, inflation rates, and the debt/gdp ratio for the long time span 1791-2009. The paper made the strong claim that gdp growth slows as debt/gdp increases and in particular that this relationship is nonlinear with debt negatively affecting growth for debt ratios exceeding 90%. While their full dataset includes 44 countries, this extract only includes the United States.

  • year: Calendar year, 1791-2009
  • debt: Debt to GDP ratio, in percentages
  • gdp: GDP growth rate, in percentages
  • inflation: Inflation rate, in percentages

Note: Even though this data includes information on time, time series methods should not be used.

  1. Use Nadaraya-Watson to estimate the regression of gdp growth on the debt ratio. Plot with 95% confidence intervals. (13 points)
Code
library(np) 

# Load data
us_gdp <- read_dta(here::here("assignment", "data", "RR2010.dta"))

# Fit Nadaraya-Watson estimator
us_gdp$gdp_num <- as.numeric(us_gdp$gdp)
us_gdp$debt_num <- as.numeric(us_gdp$debt)
nw_fit <- npreg(gdp_num ~ debt_num, data = us_gdp, regtype = "lc") # "lc" = local constant (Nadaraya-Watson)

Multistart 1 of 1 |
Multistart 1 of 1 |
Multistart 1 of 1 |
Multistart 1 of 1 /
Multistart 1 of 1 |
Multistart 1 of 1 |
                   
Code
# Predict fitted values and confidence intervals
pred <- data.frame(
  debt = us_gdp$debt,
  gdp_hat = fitted(nw_fit)
)
# Get 95% CI using npreg's predict method
ci <- predict(nw_fit, se.fit = TRUE)
pred$lower <- pred$gdp_hat - 1.96 * ci$se.fit
pred$upper <- pred$gdp_hat + 1.96 * ci$se.fit

# Plot
ggplot() +
  geom_point(data = us_gdp, aes(x = debt, y = gdp), color = "grey60", alpha = 0.6) +
  geom_line(data = pred, aes(x = debt, y = gdp_hat), color = "blue", linewidth = 1) +
  geom_ribbon(data = pred, aes(x = debt, ymin = lower, ymax = upper), alpha = 0.2, fill = "blue") +
  labs(
    title = "Nadaraya-Watson: GDP Growth vs. Debt Ratio",
    x = "Debt/GDP (%)",
    y = "GDP Growth Rate (%)"
  ) +
  theme_bw()

  1. Repeat using the Local Linear estimator. (13 points)
Code
# Fit local linear estimator
ll_fit <- npreg(gdp_num ~ debt_num, data = us_gdp, regtype = "ll") # "ll" = local linear

Multistart 1 of 1 |
Multistart 1 of 1 |
Multistart 1 of 1 |
Multistart 1 of 1 /
Multistart 1 of 1 |
Multistart 1 of 1 |
                   
Code
# Predict fitted values and confidence intervals
pred <- data.frame(
  debt = us_gdp$debt,
  gdp_hat = fitted(ll_fit)
)
# Get 95% CI using npreg's predict method
ci <- predict(ll_fit, se.fit = TRUE)
pred$lower <- pred$gdp_hat - 1.96 * ci$se.fit
pred$upper <- pred$gdp_hat + 1.96 * ci$se.fit

# Plot
ggplot() +
  geom_point(data = us_gdp, aes(x = debt, y = gdp), color = "grey60", alpha = 0.6) +
  geom_line(data = pred, aes(x = debt, y = gdp_hat), color = "blue", linewidth = 1) +
  geom_ribbon(data = pred, aes(x = debt, ymin = lower, ymax = upper), alpha = 0.2, fill = "blue") +
  labs(
    title = "Local Linear: GDP Growth vs. Debt Ratio",
    x = "Debt/GDP (%)",
    y = "GDP Growth Rate (%)"
  ) +
  theme_bw()

  1. Do you see evidence of nonlinearity and/or a change in the relationship at 90%? (6 points)

Yes, there is evidence of nonlinearity in the relationship between GDP growth and the debt-to-GDP ratio. The fitted curve from both the Nadaraya-Watson and local linear estimators is not a straight line, indicating that the effect of debt on growth varies across the range of debt ratios.

Specifically, around the 90% debt-to-GDP threshold, there appears to be a change in the relationship: GDP growth tends to decline more sharply as the debt ratio exceeds 90%. This supports the claim in Reinhart and Rogoff (2010) that high debt levels (above 90%) are associated with noticeably lower growth. However, the confidence intervals are relatively wide at high debt levels, so the evidence should be interpreted with caution.

  1. Now estimate a Local Linear regression of gdp growth on the inflation rate. Comment on what you find. (8 points)
Code
# Fit local linear estimator of gdp growth on inflation rate
us_gdp$inflation_num <- as.numeric(us_gdp$inflation)
inflation_fit <- npreg(gdp_num ~ inflation_num, data = us_gdp, regtype = "ll")

Multistart 1 of 1 |
Multistart 1 of 1 |
Multistart 1 of 1 |
Multistart 1 of 1 /
Multistart 1 of 1 |
Multistart 1 of 1 |
                   
Code
# Predict fitted values and confidence intervals
pred_inflation <- data.frame(
  inflation = us_gdp$inflation,
  gdp_hat = fitted(inflation_fit)
)
# Get 95% CI using npreg's predict method
ci_inflation <- predict(inflation_fit, se.fit = TRUE)
pred_inflation$lower <- pred_inflation$gdp_hat - 1.96 * ci_inflation$se.fit
pred_inflation$upper <- pred_inflation$gdp_hat + 1.96 * ci_inflation$se.fit

# Plot
ggplot() +
  geom_point(data = us_gdp, aes(x = inflation, y = gdp), color = "grey60", alpha = 0.6) +
  geom_line(data = pred_inflation, aes(x = inflation, y = gdp_hat), color = "blue", linewidth = 1) +
  geom_ribbon(data = pred_inflation, aes(x = inflation, ymin = lower, ymax = upper), alpha = 0.2, fill = "blue") +
  labs(
    title = "Local Linear: GDP Growth vs. Inflation Rate",
    x = "Inflation Rate (%)",
    y = "GDP Growth Rate (%)"
  ) +
  theme_bw()

The estimated relationship between GDP growth and the inflation rate is highly irregular and jagged, with no clear monotonic or linear pattern. This suggests that, in this historical U.S. data, there is not a strong or stable association between inflation and GDP growth. The jaggedness of the curve may reflect substantial noise, limited data at extreme inflation values, or the influence of outliers.

2. Stochastic Volatility and Martingale Difference Sequences

(30 points total)

A stochastic volatility model is \[ \begin{aligned} Y_t &= \sigma_t e_t \\ \log \sigma_t^2 &= \omega + \beta \log \sigma_{t-1}^2 + u_t \end{aligned} \]

where \(e_t\) and \(u_t\) are independent i.i.d. \(N(0, 1)\) shocks.

  1. Write down an information set for which \(Y_t\) is a MDS. (15 points)

Let \(\mathcal{F}_{t-1} = \sigma(e_{t-1}, e_{t-2}, \ldots, u_{t-1}, u_{t-2}, \ldots)\). By the Law of Iterated Expectations:

\[ \mathbb{E}[Y_t \mid \mathcal{F}_{t-1}] = \mathbb{E}\!\left[\mathbb{E}[\sigma_t e_t \mid \mathcal{F}_{t-1}, u_t] \mid \mathcal{F}_{t-1}\right]. \]

Given \((\mathcal{F}_{t-1}, u_t)\), \(\sigma_t\) is measurable. Since \(e_t \perp (\mathcal{F}_{t-1}, u_t)\) and \(\mathbb{E}[e_t] = 0\):

\[ \mathbb{E}[\sigma_t e_t \mid \mathcal{F}_{t-1}, u_t] = \sigma_t \mathbb{E}[e_t \mid \mathcal{F}_{t-1}, u_t] = 0. \]

Therefore \(\mathbb{E}[Y_t \mid \mathcal{F}_{t-1}] = 0\), so \(\{Y_t\}\) is an MDS with respect to \(\mathcal{F}_{t-1}\).

  1. Show that if \(| \beta | < 1\) then \(Y_t\) is strictly stationary. (15 points)

Let \(h_t = \log \sigma_t^2\), so the model gives \(h_t = \omega + \beta h_{t-1} + u_t\). Iterating backwards:

\[ h_t = \frac{\omega}{1-\beta} + \sum_{j=0}^{\infty} \beta^j u_{t-j}. \]

Since \(|\beta| < 1\), the sum converges as \(\sum_{j=0}^\infty |\beta|^j < \infty\). This expresses \(h_t\) as a fixed, time-invariant function of the i.i.d. sequence \(\{u_t\}\), so \(\{h_t\}\) is strictly stationary. Since \(\sigma_t = \exp(h_t/2)\) is a continuous function of \(h_t\), \(\{\sigma_t\}\) is strictly stationary. Since \(\{(e_t, u_t)\}\) is i.i.d. and \(Y_t = \sigma_t e_t\) is a time-invariant measurable function of \(\{(e_s, u_s) : s \leq t\}\), \(\{Y_t\}\) is strictly stationary.

3. Impulse Responses in AR(2) Models

(30 points total)

Take the AR(2) model \(Y_t = \alpha_1 Y_{t-1} + \alpha_2 Y_{t-2} + e_t\).

  1. Find expressions for the impulse responses \(b_1, b_2, b_3\), and \(b_4\). (10 points)

The impulse response \(b_j\) is the effect on \(Y_{t+j}\) of a unit shock to \(e_t\), holding all other shocks fixed. By definition \(b_0 = 1\). For \(j \geq 1\), the AR(2) recursion gives: \[ b_j = \alpha_1 b_{j-1} + \alpha_2 b_{j-2}, \qquad b_{-1} = 0. \]

Applying this: \[ \begin{aligned} b_1 &= \alpha_1 b_0 + \alpha_2 b_{-1} = \alpha_1 \\ b_2 &= \alpha_1 b_1 + \alpha_2 b_0 = \alpha_1^2 + \alpha_2 \\ b_3 &= \alpha_1 b_2 + \alpha_2 b_1 = \alpha_1(\alpha_1^2 + \alpha_2) + \alpha_2 \alpha_1 = \alpha_1^3 + 2\alpha_1\alpha_2 \\ b_4 &= \alpha_1 b_3 + \alpha_2 b_2 = \alpha_1(\alpha_1^3 + 2\alpha_1\alpha_2) + \alpha_2(\alpha_1^2 + \alpha_2) = \alpha_1^4 + 3\alpha_1^2\alpha_2 + \alpha_2^2 \end{aligned} \]

  1. Let \((\hat{\alpha}_1, \hat{\alpha}_2)\) be the least squares estimator. Find an estimator of \(b_2\). (10 points)

From part (a), \(b_2 = \alpha_1^2 + \alpha_2\). By the plug-in principle, a natural estimator is: \[ \hat{b}_2 = \hat{\alpha}_1^2 + \hat{\alpha}_2. \] This is consistent for \(b_2\) by the continuous mapping theorem, since \(b_2 = g(\alpha_1, \alpha_2) = \alpha_1^2 + \alpha_2\) is a continuous function and \((\hat{\alpha}_1, \hat{\alpha}_2) \xrightarrow{p} (\alpha_1, \alpha_2)\).

  1. Let \(\hat{\mathbf{V}}\) be the estimated covariance matrix for \((\hat{\alpha}_1, \hat{\alpha}_2)\). Use the delta method to find a 95% asymptotic confidence interval for \(b_2\). (10 points)

The delta method states that for \(\hat{b}_2 = g(\hat{\alpha}_1, \hat{\alpha}_2)\): \[ \sqrt{n}(\hat{b}_2 - b_2) \xrightarrow{d} N\!\left(0,\; \nabla g(\pmb{\alpha})^\top \mathbf{V} \, \nabla g(\pmb{\alpha})\right) \] where \(\mathbf{V} = \text{Avar}[(\hat{\alpha}_1, \hat{\alpha}_2)]\) and the gradient of \(g(\alpha_1, \alpha_2) = \alpha_1^2 + \alpha_2\) is: \[ \nabla g(\pmb{\alpha}) = \begin{pmatrix} \partial g / \partial \alpha_1 \\ \partial g / \partial \alpha_2 \end{pmatrix} = \begin{pmatrix} 2\alpha_1 \\ 1 \end{pmatrix}. \]

The asymptotic variance of \(\hat{b}_2\) is estimated by: \[ \widehat{\text{Var}}(\hat{b}_2) = \hat{\nabla}g^\top \hat{\mathbf{V}} \, \hat{\nabla}g, \qquad \hat{\nabla}g = \begin{pmatrix} 2\hat{\alpha}_1 \\ 1 \end{pmatrix}. \]

Writing out \(\hat{\mathbf{V}} = \begin{pmatrix} \hat{v}_{11} & \hat{v}_{12} \\ \hat{v}_{12} & \hat{v}_{22} \end{pmatrix}\), this gives: \[ \widehat{\text{Var}}(\hat{b}_2) = 4\hat{\alpha}_1^2 \hat{v}_{11} + 4\hat{\alpha}_1 \hat{v}_{12} + \hat{v}_{22}. \]

The 95% asymptotic confidence interval is then: \[ \hat{b}_2 \;\pm\; 1.96 \sqrt{\widehat{\text{Var}}(\hat{b}_2)}. \]