We are grateful to Ben Moll for suggesting this example. Any errors are our own.
In this notebook we will work through the basic logic of Cocci & Plagborg-Møller (2023) in the context of calibrating a simple version of the Neoclassical Growth Model (NGM). Though the model is highly stylized, it helps provide intuition for our procedures. Please see our paper for other, arguably more realistic, empirical applications.
We consider the simplest version of the NGM without population growth or technological growth. As explained in section 3.4 of Dirk Krueger's lecture notes (note the difference in notation), this model implies three key steady-state equations:
We want to use these equations to calibrate (i.e., estimate) the parameters $\rho$, $\delta$, and $\alpha$.
We can measure the steady-state values of the variables on the left-hand side of the above equations by computing sample averages of the relevant time series over a long time span. Denote these sample averages by $\hat{r}$, $\widehat{\frac{I}{K}}$, and $\widehat{\frac{K}{Y}}$, respectively. We can then obtain natural method-of-moment estimates of the three parameters as follows: $$\hat{\rho} = \hat{r},\quad \hat{\delta}=\widehat{\frac{I}{K}},\quad \hat{\alpha}=\widehat{\frac{K}{Y}}\left(\hat{\rho}+\hat{\delta} \right).$$
The sample averages above are subject to statistical noise due to the finite time sample. This statistical noise obviously carries over to the estimated parameters. To gauge the extent of the noise, we seek to compute standard errors for the estimated parameters.
The key ingredients into calculating standard errors for the parameters are the standard errors for the three sample averages. Denote these by $\hat{\sigma}\left(\hat{r}\right)$, $\hat{\sigma}\left(\widehat{\frac{I}{K}}\right)$, and $\hat{\sigma}\left(\widehat{\frac{K}{Y}}\right)$. To compute these standard errors, one would have to apply a formula that accounts for serial correlation in the data, such as the Newey-West long-run variance estimator. Let's assume that we have already done this.
It's immediate what the standard errors for $\hat{\rho}$ and $\hat{\delta}$ are: They simply equal $\hat{\sigma}\left(\hat{r}\right)$ and $\hat{\sigma}\left(\widehat{\frac{I}{K}}\right)$, respectively. However, the standard error for $\hat{\alpha}$ is not so obvious, as this estimator depends implicitly on all three sample averages: $$\hat{\alpha}=\widehat{\frac{K}{Y}}\left(\hat{r}+\widehat{\frac{I}{K}}\right) \approx \alpha + x_1\left(\hat{r}-r\right) + x_2\left(\widehat{\frac{I}{K}}-\frac{I}{K}\right) + x_3\left(\widehat{\frac{K}{Y}}-\frac{K}{Y}\right),$$ where the last approximation is a delta method linearization with $$x_1=x_2=\frac{K}{Y},\quad x_3=r+\frac{I}{K}.$$ Since $\hat{\alpha}$ is approximately a linear combination of several sample averages, computing its standard error requires not just the standard errors for the individual sample averages, but also their correlations.
If we observed annual data on the real interest rate, capital, investment, and output, it would not be too difficult to estimate the cross-correlations of the sample averages. This could again be done using the Newey-West estimator of the $3 \times 3$ long-run variance-covariance matrix. Yet, in practice we may face several potential complicating factors:
A pragmatic limited-information approach would therefore be to give up on computing the precise standard error of $\hat{\alpha}$ and instead compute an upper bound on it. We seek an upper bound that depends only on the standard errors of the individual moments, not their correlations.
The key to obtaining such a bound is the following inequality for random variables $X$ and $Y$: $$\begin{align*} \text{Std}(X+Y) &= \sqrt{\text{Var}(X+Y)} \\ &= \sqrt{\text{Var}(X) + \text{Var}(Y)+2\text{Corr}(X,Y)\text{Std}(X)\text{Std}(Y)} \\ &\leq \sqrt{\text{Var}(X) + \text{Var}(Y)+2\text{Std}(X)\text{Std}(Y)} \\ &= \sqrt{(\text{Std}(X)+\text{Std}(Y))^2} \\ &= \text{Std}(X)+\text{Std}(Y). \end{align*}$$ Applying this logic to the earlier approximation for $\hat{\alpha}$, we get the bound (up to a small approximation error) $$\text{Std}(\hat{\alpha}) \leq |x_1|\text{Std}\left(\hat{r}\right) + |x_2|\text{Std}\left(\widehat{\frac{I}{K}}\right) + |x_3|\text{Std}\left(\widehat{\frac{K}{Y}}\right).$$ We can therefore compute an upper bound for the standard error of $\hat{\alpha}$ as follows: $$\hat{\sigma}(\hat{\alpha}) \leq |\hat{x}_1|\hat{\sigma}\left(\hat{r}\right) + |\hat{x}_2|\hat{\sigma}\left(\widehat{\frac{I}{K}}\right) + |\hat{x}_3|\hat{\sigma}\left(\widehat{\frac{K}{Y}}\right),$$ where $$\hat{x}_1=\hat{x}_2=\widehat{\frac{K}{Y}},\quad \hat{x}_3=\left(\hat{r}+\widehat{\frac{I}{K}} \right).$$ Notice that this upper bound only depends on things that we know: the sample averages themselves and their individual standard errors (but not the correlations across moments).
It's impossible to improve the bound without further knowledge of the correlation structure: The bound turns out to equal the actual standard error when the three sample averages are perfectly correlated with each other. This is proved in Lemma 1 in our paper. For this reason, we refer to the standard error bound as the worst-case standard error.
Our software package makes it easy to calculate worst-case standard errors. As an illustration, suppose the sample averages (with standard errors in parentheses) equal $$\hat{r}=0.02\;(0.002), \quad \widehat{\frac{I}{K}}=0.08\;(0.01), \quad \widehat{\frac{K}{Y}} = 3\;(0.1).$$ We define the model equations and data as follows. Let $\theta=(\rho,\delta,\alpha)$ and $\mu=(r,\frac{I}{K},\frac{K}{Y})$ denote the vectors of parameters and moments, respectively.
import numpy as np
from stderr_calibration import MinDist # Minimum distance routines
# Define mapping from parameters to moments
h = lambda theta: np.array([theta[0],theta[1],theta[2]/(theta[0]+theta[1])])
# Define empirical moments and their s.e.
mu = np.array([0.02,0.08,3])
sigma = np.array([0.002,0.01,0.1])
# Define MinDist object used in later analysis
obj = MinDist(h,mu,moment_se=sigma)
We can now estimate the parameters and compute their worst-case standard errors:
param_estim = np.array([mu[0],mu[1],mu[2]*(mu[0]+mu[1])]) # Closed-form formula for estimates
res = obj.fit(param_estim=param_estim,eff=False)
print('Parameter estimates')
print(res['estim'])
print('Worst-case standard errors')
print(res['estim_se'])
Parameter estimates [0.02 0.08 0.3 ] Worst-case standard errors [0.002 0.01 0.046]
(Note: The derivatives required to compute $\hat{x}_1,\hat{x}_2,\hat{x}_3$ are produced under the hood by the software using finite differences. We could have also computed the parameter estimates $\hat{\rho},\hat{\delta},\hat{\alpha}$ numerically if we didn't have a closed-form formula. See our other example for details.)
The textbook NGM also implies that the steady-state labor share of income should equal $1-\alpha$. Suppose we measure the sample average of the labor share to be 0.6 with a standard error of 0.01. We wish to test the over-identifying restriction that the earlier estimate of $\hat{\alpha}$ is consistent with this moment. We can do this as follows.
# Define expanded mapping that also includes over-identifying moment
h_expand = lambda theta: np.append(h(theta),1-theta[2])
# Define expanded empirical moments and standard errors
mu_expand = np.append(mu,0.6)
sigma_expand = np.append(sigma,0.01)
# Define new MinDist object and fit
obj_expand = MinDist(h_expand,mu_expand,moment_se=sigma_expand)
res_expand = obj_expand.fit(param_estim=param_estim,weight_mat=np.diag(np.array([1,1,1,0])),eff=False)
# Same parameter estimates as before (weight matrix indicates that these estimates do not use the fourth moment)
# Over-identification test
res_overid = obj_expand.overid(res_expand)
print('Error in matching non-targeted moment')
print(res_overid['moment_error'][3]) # The non-targeted moment is the fourth one
print('Standard error')
print(res_overid['moment_error_se'][3])
print('t-statistic')
print(res_overid['tstat'][3])
pcost dcost gap pres dres k/t 0: 1.0118e-29 1.0118e-29 1e-02 2e+00 0e+00 1e+00 1: -4.4391e-18 1.0118e-29 1e-04 2e-02 7e-18 1e-02 2: -7.3161e-20 1.0118e-29 1e-06 2e-04 3e-18 1e-04 3: -8.8737e-22 1.0118e-29 1e-08 2e-06 5e-18 1e-06 4: -9.2425e-24 1.0118e-29 1e-10 2e-08 7e-18 1e-08 Optimal solution found. Error in matching non-targeted moment -0.09999999999999998 Standard error 0.0559999999999835 t-statistic -1.7857142857148114
Since the absolute value of the t-statistic lies between 1.64 and 1.96, we can reject the validity of the model at the 10% significance level, but not at the 5% level.
The over-identification test checks how different the estimate $\hat{\alpha}$ would have been if we had instead computed it as the sample average capital share of income $1-0.6=0.4$. Is the difference in parameter estimates between the two calibration strategies too large to be explained by statistical noise?
The above NGM example is very simple and stylized. In our paper we extend the basic ideas along various dimensions that are relevant for applied research. For example: