Skip to content

Commit ee1e32e

Browse files
authored
Updated one NB due to HARK PR 1713 (#238)
Format for `calc_expectation` with `DiscreteDistributionLabeled` has changed. Also adjusted brackets in one equation.
1 parent 689857f commit ee1e32e

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

notebooks/LC-Model-Expected-Vs-Realized-Income-Growth.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
"Using this notation, we construct all the necessary inputs to the regressors. The main input is the expected income growth of every agent at every time period, which is given by\n",
174174
"\\begin{equation}\n",
175175
"\\begin{split}\n",
176-
"\\Ex_t[\\yLvl_{t+1}/\\yLvl_{t}] &= \\mathbb{E}_t[\\left(\\frac{\\theta_{t+1}\\pLvl_{t} \\PermGroFac_{t+1} \\PermShk_{t+1}}{\\theta_{t}P_{t}}\\right)]\\\\\n",
176+
"\\Ex_t[\\yLvl_{t+1}/\\yLvl_{t}] &= \\mathbb{E}_t \\left[ \\left(\\frac{\\theta_{t+1}\\pLvl_{t} \\PermGroFac_{t+1} \\PermShk_{t+1}}{\\theta_{t}P_{t}}\\right) \\right]\\\\\n",
177177
" &= \\left(\\frac{\\PermGroFac_{t+1}}{\\theta_{t}}\\right)\\\\\n",
178178
"\\Ex_t[\\yLog_{t+1} - \\yLog_{t}] & = \\log \\Gamma_{t+1}-\\log \\theta_t\n",
179179
"\\end{split}\n",
@@ -188,7 +188,7 @@
188188
"outputs": [],
189189
"source": [
190190
"exp = [\n",
191-
" calc_expectation(Agent.IncShkDstn[i], func=lambda x: x[0] * x[1])\n",
191+
" calc_expectation(Agent.IncShkDstn[i], func=lambda x: x[\"PermShk\"] * x[\"TranShk\"])\n",
192192
" for i in range(Agent.T_cycle)\n",
193193
"]\n",
194194
"exp_df = pd.DataFrame(\n",
@@ -249,8 +249,8 @@
249249
"Dep. Variable: ExpBin R-squared: 0.1958\n",
250250
"Estimator: PanelOLS R-squared (Between): -0.0938\n",
251251
"No. Observations: 100000 R-squared (Within): 0.1958\n",
252-
"Date: Tue, Dec 02 2025 R-squared (Overall): 0.1888\n",
253-
"Time: 10:21:36 Log-likelihood -1.288e+05\n",
252+
"Date: Mon, Feb 02 2026 R-squared (Overall): 0.1888\n",
253+
"Time: 21:29:53 Log-likelihood -1.288e+05\n",
254254
"Cov. Estimator: Unadjusted \n",
255255
" F-statistic: 2.376e+04\n",
256256
"Entities: 2435 P-value 0.0000\n",
@@ -332,7 +332,7 @@
332332
"outputs": [],
333333
"source": [
334334
"exp = [\n",
335-
" calc_expectation(Agent_nt.IncShkDstn[i], func=lambda x: x[0] * x[1])\n",
335+
" calc_expectation(Agent_nt.IncShkDstn[i], func=lambda x: x[\"PermShk\"] * x[\"TranShk\"])\n",
336336
" for i in range(Agent_nt.T_cycle)\n",
337337
"]\n",
338338
"exp_df = pd.DataFrame(\n",
@@ -381,8 +381,8 @@
381381
"Dep. Variable: ExpBin R-squared: 0.0084\n",
382382
"Estimator: PanelOLS R-squared (Between): -0.0257\n",
383383
"No. Observations: 100000 R-squared (Within): 0.0084\n",
384-
"Date: Tue, Dec 02 2025 R-squared (Overall): 0.0088\n",
385-
"Time: 10:22:07 Log-likelihood -1.393e+05\n",
384+
"Date: Mon, Feb 02 2026 R-squared (Overall): 0.0088\n",
385+
"Time: 21:29:58 Log-likelihood -1.393e+05\n",
386386
"Cov. Estimator: Unadjusted \n",
387387
" F-statistic: 826.23\n",
388388
"Entities: 2435 P-value 0.0000\n",

0 commit comments

Comments
 (0)