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
[kalman_2] update exposition of first three sections (#903)
* typo in the opening paragraph
* update on the section A worker's output
* update on section A firm's wage-setting policy
* update doc reference for robustness
Copy file name to clipboardExpand all lines: lectures/kalman_2.md
+37-36Lines changed: 37 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ kernelspec:
29
29
:depth: 2
30
30
```
31
31
32
-
In this quantecon lecture {doc}`A First Look at the Kalman filter <kalman>`, we used
32
+
In this QuantEcon lecture {doc}`kalman`, we used
33
33
a Kalman filter to estimate locations of a rocket.
34
34
35
35
In this lecture, we'll use the Kalman filter to
@@ -38,7 +38,7 @@ human capital, neither of which the firm observes directly.
38
38
39
39
The firm learns about those things only by observing a history of the output that the worker generates for the firm, and from understanding how that output depends on the worker's human capital and how human capital evolves as a function of the worker's effort.
40
40
41
-
We'll posit a rule that expresses how the much firm pays the worker each period as a function of the firm's information each period.
41
+
We'll posit a rule that expresses how much the firm pays the worker each period as a function of the firm's information each period.
42
42
43
43
In addition to what's in Anaconda, this lecture will need the following libraries:
44
44
@@ -48,7 +48,7 @@ In addition to what's in Anaconda, this lecture will need the following librarie
48
48
!pip install quantecon
49
49
```
50
50
51
-
To conduct simulations, we bring in these imports, as in {doc}`A First Look at the Kalman filter <kalman>`.
51
+
To conduct simulations, we bring in these imports, as in {doc}`kalman`.
52
52
53
53
```{code-cell} ipython3
54
54
import matplotlib.pyplot as plt
@@ -58,22 +58,22 @@ from collections import namedtuple
* $h_t$ is the logarithm of human capital at time $t$
83
83
* $u_t$ is the logarithm of the worker's effort at accumulating human capital at $t$
84
84
* $y_t$ is the logarithm of the worker's output at time $t$
85
-
* $h_0 \sim {\mathcal N}(\hat h_0, \sigma_{h,0})$
86
-
* $u_0 \sim {\mathcal N}(\hat u_0, \sigma_{u,0})$
85
+
* $\epsilon_{t+1}$ is an IID standard normal shock to human capital
86
+
* $h_0 \sim N(\hat h_0, \sigma_{h,0})$
87
+
* $u_0 \sim N(\hat u_0, \sigma_{u,0})$
87
88
88
-
Parameters of the model are $\alpha, \beta, c, R, g, \hat h_0, \hat u_0, \sigma_h, \sigma_u$.
89
+
Parameters of the model are $\alpha, \beta, c, R, g, \hat h_0, \hat u_0, \sigma_{h,0}, \sigma_{u,0}$.
89
90
90
91
At time $0$, a firm has hired the worker.
91
92
92
93
The worker is permanently attached to the firm and so works for the same firm at all dates $t =0, 1, 2, \ldots$.
93
94
94
95
At the beginning of time $0$, the firm observes neither the worker's innate initial human capital $h_0$ nor its hard-wired permanent effort level $u_0$.
95
96
96
-
The firm believes that $u_0$ for a particular worker is drawn from a Gaussian probability distribution, and so is described by $u_0 \sim {\mathcal N}(\hat u_0, \sigma_{u,0})$.
97
+
The firm believes that $u_0$ for a particular worker is drawn from a Gaussian probability distribution, and so is described by $u_0 \sim N(\hat u_0, \sigma_{u,0})$.
97
98
98
-
The $h_t$ part of a worker's "type" moves over time, but the effort component of the worker's type is $u_t = u_0$.
99
+
The $h_t$ part of a worker's "type" moves over time, while the equation $u_{t+1} = u_t$ implies $u_t = u_0$ for all $t$.
99
100
100
-
This means that from the firm's point of view, the worker's effort is effectively an unknown fixed "parameter".
101
+
Thus, from the firm's point of view, effort is a fixed, unobserved component of the worker's type that must be inferred from output observations.
101
102
102
103
At time $t\geq 1$, for a particular worker the firm observed $y^{t-1} = [y_{t-1}, y_{t-2}, \ldots, y_0]$.
103
104
@@ -107,10 +108,10 @@ But the firm does observe the worker's output $y_t$ at time $t$ and remembers
107
108
108
109
## A firm's wage-setting policy
109
110
110
-
Based on information about the worker that the firm has at time $t \geq 1$, the firm pays the worker log wage
111
+
At time $t \geq 1$, before observing current output $y_t$, the firm sets the worker's log wage using the past output history $y^{t-1}$:
111
112
112
113
$$
113
-
w_t = g E [ h_t | y^{t-1}], \quad t \geq 1
114
+
w_t = g \mathbb{E}[h_t | y^{t-1}], \quad t \geq 1
114
115
$$
115
116
116
117
and at time $0$ pays the worker a log wage equal to the unconditional mean of $y_0$:
@@ -129,7 +130,7 @@ Write system [](worker_model) in the state-space form
For a draw of $h_0, u_0$, we plot $E y_t = G \hat x_t$ where $\hat x_t = E [x_t | y^{t-1}]$.
250
+
For a draw of $h_0, u_0$, we plot $\mathbb{E}[y_t | y^{t-1}]= G \hat x_t$ where $\hat x_t = \mathbb{E}[x_t | y^{t-1}]$.
250
251
251
-
We also plot $E [u_0 | 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$.
252
+
We also plot $\mathbb{E}[u_0 | 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$.
252
253
253
-
We can watch as the firm's inference $E [u_0 | y^{t-1}]$ of the worker's work ethic converges toward the hidden $u_0$, which is not directly observed by the firm.
254
+
We can watch as the firm's inference $\mathbb{E}[u_0 | y^{t-1}]$ of the worker's work ethic converges toward the hidden $u_0$, which is not directly observed by the firm.
Evidently, entries in the conditional covariance matrix become smaller over time.
289
290
290
-
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.
291
+
It is enlightening to portray how conditional covariance matrices $\Sigma_t$ evolve by plotting confidence ellipsoides around $\mathbb{E}[x_t |y^{t-1}]$ at various $t$'s.
0 commit comments