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
Please note how the `WorkerModel` namedtuple creates all of the objects required to compute an associated state-space representation {eq}`ssrepresent`.
204
204
205
-
This is handy, because in order to simulate a history $\{y_t, h_t\}$ for a worker, we'll want to form state space system for him/her by using the [`LinearStateSpace`](https://quanteconpy.readthedocs.io/en/latest/tools/lss.html) class.
205
+
This is handy, because in order to simulate a history $\{y_t, h_t\}$ for a worker, we'll want to form a state space system for him/her by using the [`LinearStateSpace`](https://quanteconpy.readthedocs.io/en/latest/tools/lss.html) class.
206
206
207
207
```{code-cell} ipython3
208
208
# Define A, C, G, R, μ_0, Σ_0
@@ -241,9 +241,9 @@ y_{t} & = G \hat x_t + a_t
241
241
where $K_t$ is the Kalman gain matrix at time $t$.
242
242
243
243
244
-
We accomplish this in the following code that uses the [`Kalman`](https://quanteconpy.readthedocs.io/en/latest/tools/kalman.html) class.
244
+
We accomplish this in the following code that uses the [`Kalman`](https://quanteconpy.readthedocs.io/en/latest/tools/kalman.html) class.
245
245
246
-
Suppose the belief of firm coincides with the real distribution of $x_0$.
246
+
Suppose the belief of the firm coincides with the real distribution of $x_0$.
For a draw of $h_0, u_0$, we plot $E[y_t | y^{t-1}] = G \hat x_t $ where $\hat x_t = E [x_t | y^{t-1}]$.
272
+
For a draw of $h_0, u_0$, we plot $E[y_t | y^{t-1}] = G \hat x_t $ where $\hat x_t = E [x_t | y^{t-1}]$.
274
273
275
-
We also plot $\hat u_t = E [u_t | y^{t-1}]$, which is the firm inference about a worker's hard-wired "work ethic" $u_0$, conditioned on information $y^{t-1}$ that it has about him or her coming into period $t$.
274
+
We also plot $\hat u_t = E [u_t | y^{t-1}]$, which is the firm's inference about a worker's hard-wired "work ethic" $u_0$, conditioned on information $y^{t-1}$ that it has about him or her coming into period $t$.
276
275
277
-
We can watch as the firm's inference $E [u_t | y^{t-1}]$ of the worker's work ethic converges toward the hidden $u_0$, which is not directly observed by the firm.
276
+
We can watch as the firm's inference $E [u_t | y^{t-1}]$ of the worker's work ethic converges toward the hidden $u_0$, which is not directly observed by the firm.
278
277
279
278
```{code-cell} ipython3
280
279
fig, ax = plt.subplots(1, 2)
@@ -309,9 +308,9 @@ print(Σ_hat[:, :, 0])
309
308
print(Σ_hat[:, :, -1])
310
309
```
311
310
312
-
Evidently, entries in the conditional covariance matrix become smaller over time.
311
+
Evidently, entries in the conditional covariance matrix become smaller over time.
313
312
314
-
It is enlightening to portray how conditional covariance matrices $\Sigma_t$ evolve by plotting confidence ellipsoides around $E [x_t |y^{t-1}] $ at various $t$'s.
313
+
It is enlightening to portray how conditional covariance matrices $\Sigma_t$ evolve by plotting confidence ellipsoids around $E [x_t |y^{t-1}] $ at various $t$'s.
315
314
316
315
```{code-cell} ipython3
317
316
# Create a grid of points for contour plotting
@@ -341,9 +340,9 @@ for i, t in enumerate(np.linspace(0, T-1, 3, dtype=int)):
0 commit comments