You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,9 @@ Python package that computes worst-case standard errors (SE) for minimum distanc
5
5
The computed worst-case SE for the estimated parameters are sharp upper bounds on the true SE (which depend on the unknown moment correlation structure). For over-identified models, the package also computes the efficient moment selection that minimizes the worst-case SE. Additionally, the package can carry out tests of parameter restrictions or over-identifying restrictions.
6
6
7
7
**Reference:**
8
-
Cocci, Matthew D., and Mikkel Plagborg-Møller (2021), "Standard Errors for Calibrated Parameters", [arXiv:2109.08109](https://arxiv.org/abs/2109.08109)
8
+
Cocci, Matthew D., and Mikkel Plagborg-Møller (2023), "Standard Errors for Calibrated Parameters", [arXiv:2109.08109](https://arxiv.org/abs/2109.08109)
9
9
10
-
Tested in: Python 3.8.11 (Anaconda distribution) on Windows 10 PC
10
+
Tested in: Python 3.8.18 (Anaconda distribution) on Windows 10 PC with NumPy version 1.24.3.
11
11
12
12
Other versions: [Matlab](https://github.com/mikkelpm/stderr_calibration_matlab)
13
13
@@ -19,9 +19,9 @@ Other versions: [Matlab](https://github.com/mikkelpm/stderr_calibration_matlab)
19
19
20
20
-[stderr_calibration](stderr_calibration): Python package for minimum distance estimation, standard errors, and testing
21
21
22
-
-[estimate_hank.py](estimate_hank.py): Empirical application to estimation of a heterogeneous agent New Keynesian macro model, using impulse response estimates from [Chang, Chen & Schorfheide (2021)](https://cpb-us-w2.wpmucdn.com/web.sas.upenn.edu/dist/e/242/files/2021/05/EvalHAmodels_v6_pub.pdf) and [Miranda-Agrippino & Ricco (2021)](https://doi.org/10.1257/mac.20180124), which are stored in the [data](data) folder
22
+
-[estimate_hank.py](estimate_hank.py): Empirical application to estimation of a heterogeneous agent New Keynesian macro model, using impulse response estimates from [Chang, Chen & Schorfheide (2023)](https://web.sas.upenn.edu/schorf/files/2023/09/EvalHAmodels_v15_nocolor.pdf) and [Miranda-Agrippino & Ricco (2021)](https://doi.org/10.1257/mac.20180124), which are stored in the [data](data) folder
23
23
24
-
-[sequence_jacobian](sequence_jacobian): Copy of the [Sequence-Space Jacobian](https://github.com/shade-econ/sequence-jacobian) package developed by [Auclert, Bardóczy, Rognlie & Straub (2021)](http://web.stanford.edu/~aauclert/sequence_space_jacobian.pdf), with minor changes made to the file [hank.py](sequence_jacobian/hank.py)
24
+
-[sequence_jacobian](sequence_jacobian): Copy of the [Sequence-Space Jacobian](https://github.com/shade-econ/sequence-jacobian) package developed by [Auclert, Bardóczy, Rognlie & Straub (2021)](https://doi.org/10.3982/ECTA17434), with minor changes made to the file [hank.py](sequence_jacobian/hank.py)
25
25
26
26
-[tests](tests): Unit tests intended for use with the [pytest](https://docs.pytest.org/) framework
@@ -13976,7 +13977,7 @@ <h1 id="Standard-errors-for-calibrated-parameters:-Example">Standard errors for
13976
13977
<p>We observe the noisy estimates $(\hat{\mu}_1,\hat{\mu}_2,\hat{\mu}_3) = (1.1,0.8,-0.1)$ of the true moments. The standard errors of the three empirical moments are $(\hat{\sigma}_1,\hat{\sigma}_2,\hat{\sigma}_3)=(0.1,0.2,0.05)$.</p>
13977
13978
<p>We will estimate the parameters $(\theta_1,\theta_2)$ by minimum distance, matching the model-implied moments $h(\theta_1,\theta_2)$ to the empirical moments:
<p>To compute standard errors for the estimated parameters, test hypotheses, and compute the efficient weight matrix $\hat{W}$, we use the formulas in <a href="https://scholar.princeton.edu/mikkelpm/calibration">Cocci & Plagborg-Møller (2021)</a>, which do not require knowledge of the correlation structure of the empirical moments.</p>
13980
+
<p>To compute standard errors for the estimated parameters, test hypotheses, and compute the efficient weight matrix $\hat{W}$, we use the formulas in <a href="https://arxiv.org/abs/2109.08109">Cocci & Plagborg-Møller (2023)</a>, which do not require knowledge of the correlation structure of the empirical moments.</p>
13980
13981
<h2 id="Define-the-model">Define the model<a class="anchor-link" href="#Define-the-model">¶</a></h2><p>We first import relevant packages and define the model and data.</p>
13981
13982
13982
13983
</div>
@@ -14119,12 +14120,12 @@ <h2 id="Test-of-parameter-restrictions">Test of parameter restrictions<a class="
<h1 id="Standard-errors-for-calibrated-parameters:-Neoclassical-Growth-Model-example">Standard errors for calibrated parameters: Neoclassical Growth Model example<a class="anchor-link" href="#Standard-errors-for-calibrated-parameters:-Neoclassical-Growth-Model-example">¶</a></h1><p><em>We are grateful to Ben Moll for suggesting this example. Any errors are our own.</em></p>
13975
-
<p>In this notebook we will work through the basic logic of <a href="https://scholar.princeton.edu/mikkelpm/calibration">Cocci & Plagborg-Møller (2021)</a> 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.</p>
13976
+
<p>In this notebook we will work through the basic logic of <a href="https://arxiv.org/abs/2109.08109">Cocci & Plagborg-Møller (2023)</a> 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.</p>
13976
13977
<h2 id="Model">Model<a class="anchor-link" href="#Model">¶</a></h2><p>We consider the simplest version of the NGM without population growth or technological growth. As explained in section 3.4 of <a href="https://perhuaman.files.wordpress.com/2014/06/macrotheory-dirk-krueger.pdf">Dirk Krueger's lecture notes</a> (note the difference in notation), this model implies three key steady-state equations:</p>
13977
13978
<ol>
13978
13979
<li><strong>Euler equation:</strong> $r = \rho$, where $\rho$ is the household discount rate and $r$ is the real interest rate.</li>
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).</p>
14015
-
<p>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 <a href="https://scholar.princeton.edu/mikkelpm/calibration">our paper</a>. For this reason, we refer to the standard error bound as the <em>worst-case standard error</em>.</p>
14016
+
<p>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 <a href="https://arxiv.org/abs/2109.08109">our paper</a>. For this reason, we refer to the standard error bound as the <em>worst-case standard error</em>.</p>
14016
14017
<h2 id="Numerical-example">Numerical example<a class="anchor-link" href="#Numerical-example">¶</a></h2><p>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
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.</p>
<p>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.</p>
14172
14173
<p>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?</p>
14173
-
<h2 id="Other-features-in-the-paper">Other features in the paper<a class="anchor-link" href="#Other-features-in-the-paper">¶</a></h2><p>The above NGM example is very simple and stylized. In <a href="https://scholar.princeton.edu/mikkelpm/calibration">our paper</a> we extend the basic ideas along various dimensions that are relevant for applied research. For example:</p>
14174
+
<h2 id="Other-features-in-the-paper">Other features in the paper<a class="anchor-link" href="#Other-features-in-the-paper">¶</a></h2><p>The above NGM example is very simple and stylized. In <a href="https://arxiv.org/abs/2109.08109">our paper</a> we extend the basic ideas along various dimensions that are relevant for applied research. For example:</p>
14174
14175
<ul>
14175
14176
<li>The matched moments need not be simple sample averages, but could be regression coefficients, quantiles, etc. The moments need not be related to steady-state quantities, but could involve essentially any feature of the available data.</li>
14176
14177
<li>The calibration (method-of-moments) estimator need not be available in closed form (usually one would obtain it by numerical optimization).</li>
Copy file name to clipboardExpand all lines: example.ipynb
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@
15
15
"We will estimate the parameters $(\\theta_1,\\theta_2)$ by minimum distance, matching the model-implied moments $h(\\theta_1,\\theta_2)$ to the empirical moments:\n",
"To compute standard errors for the estimated parameters, test hypotheses, and compute the efficient weight matrix $\\hat{W}$, we use the formulas in [Cocci & Plagborg-Møller (2021)](https://scholar.princeton.edu/mikkelpm/calibration), which do not require knowledge of the correlation structure of the empirical moments.\n",
18
+
"To compute standard errors for the estimated parameters, test hypotheses, and compute the efficient weight matrix $\\hat{W}$, we use the formulas in [Cocci & Plagborg-Møller (2023)](https://arxiv.org/abs/2109.08109), which do not require knowledge of the correlation structure of the empirical moments.\n",
19
19
"\n",
20
20
"## Define the model\n",
21
21
"We first import relevant packages and define the model and data."
Copy file name to clipboardExpand all lines: example_ngm.ipynb
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@
10
10
"*We are grateful to Ben Moll for suggesting this example. Any errors are our own.*\n",
11
11
"\n",
12
12
"\n",
13
-
"In this notebook we will work through the basic logic of [Cocci & Plagborg-Møller (2021)](https://scholar.princeton.edu/mikkelpm/calibration) 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.\n",
13
+
"In this notebook we will work through the basic logic of [Cocci & Plagborg-Møller (2023)](https://arxiv.org/abs/2109.08109) 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.\n",
"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).\n",
70
70
"\n",
71
-
"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](https://scholar.princeton.edu/mikkelpm/calibration). For this reason, we refer to the standard error bound as the *worst-case standard error*.\n",
71
+
"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](https://arxiv.org/abs/2109.08109). For this reason, we refer to the standard error bound as the *worst-case standard error*.\n",
72
72
"\n",
73
73
"\n",
74
74
"## Numerical example\n",
@@ -176,7 +176,7 @@
176
176
"\n",
177
177
"## Other features in the paper\n",
178
178
"\n",
179
-
"The above NGM example is very simple and stylized. In [our paper](https://scholar.princeton.edu/mikkelpm/calibration) we extend the basic ideas along various dimensions that are relevant for applied research. For example:\n",
179
+
"The above NGM example is very simple and stylized. In [our paper](https://arxiv.org/abs/2109.08109) we extend the basic ideas along various dimensions that are relevant for applied research. For example:\n",
180
180
"- The matched moments need not be simple sample averages, but could be regression coefficients, quantiles, etc. The moments need not be related to steady-state quantities, but could involve essentially any feature of the available data.\n",
181
181
"- The calibration (method-of-moments) estimator need not be available in closed form (usually one would obtain it by numerical optimization).\n",
182
182
"- If some, but not all, of the correlations between the empirical moments are known, this can be exploited to sharpen inference.\n",
0 commit comments