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
{{ message }}
Repository navigation
Commit 7c6396a
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: lectures/kalman.md
+21-3Lines changed: 21 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,12 @@ It is aimed at readers who either
46
46
* have heard of the Kalman filter but don't know how it works, or
47
47
* know the Kalman filter equations, but don't know where they come from
48
48
49
+
Subsequent lectures use the same recursive logic in more applied and more econometric settings.
50
+
51
+
See {doc}`kalman_2` for an economic application in which a firm infers a worker's hidden human capital and effort.
52
+
53
+
See {doc}`kalman_filter_var` for a derivation of the innovations representation and its connection to vector autoregressions.
54
+
49
55
For additional (more advanced) reading on the Kalman filter, see
50
56
51
57
* {cite}`Ljungqvist2012`, section 2.7
@@ -258,7 +264,9 @@ and
258
264
```
259
265
260
266
```{note}
261
-
A proof can be found in {cite}`Bishop2006`. To get from his expressions to the ones used above, you will also need to apply the [Woodbury matrix identity](https://en.wikipedia.org/wiki/Woodbury_matrix_identity).
267
+
A proof can be found in {cite}`Bishop2006`.
268
+
269
+
To get from his expressions to the ones used above, you will also need to apply the [Woodbury matrix identity](https://en.wikipedia.org/wiki/Woodbury_matrix_identity).
262
270
```
263
271
264
272
Here $\Sigma G^\top (G \Sigma G^\top + R)^{-1}$ is the matrix of population
@@ -457,7 +465,9 @@ Repeating {eq}`kl_mlom0`, the dynamics for $\mu_t$ and $\Sigma_t$ are as follows
457
465
These are the standard dynamic equations for the Kalman filter (see, for example, {cite}`Ljungqvist2012`, page 58).
458
466
459
467
```{note}
460
-
Here $\mu_t$ is the filter's prediction of the hidden state $X_t$. In much of the Kalman filter literature it is written $\hat x_t$, emphasizing that it is an estimate of $X_t$.
468
+
Here $\mu_t$ is the filter's prediction of the hidden state $X_t$.
469
+
470
+
In much of the Kalman filter literature it is written $\hat x_t$, emphasizing that it is an estimate of $X_t$.
461
471
```
462
472
463
473
(kalman_convergence)=
@@ -501,7 +511,9 @@ Equation {eq}`kalman_dare` is known as a [discrete-time algebraic Riccati equati
501
511
502
512
Conditions under which a fixed point exists and the sequence $\{\Sigma_t\}$ converges to it are discussed in {cite}`AHMS1996` and {cite}`AndersonMoore2005`, chapter 4.
503
513
504
-
A sufficient (but not necessary) condition is that all the eigenvalues $\lambda_i$ of $A$ satisfy $|\lambda_i| < 1$ (cf. e.g., {cite}`AndersonMoore2005`, p. 77).
514
+
A sufficient (but not necessary) condition is that all the eigenvalues $\lambda_i$ of $A$ satisfy $|\lambda_i| < 1$.
515
+
516
+
See, for example, {cite}`AndersonMoore2005`, p. 77.
505
517
506
518
(This strong condition assures that the unconditional distribution of $X_t$ converges as $t \to \infty$.)
507
519
@@ -583,6 +595,8 @@ Your figure should -- modulo randomness -- look something like this
583
595
:class: dropdown
584
596
```
585
597
598
+
Here is one solution:
599
+
586
600
```{code-cell} ipython3
587
601
# Parameters
588
602
θ = 10 # Constant value of state X_t
@@ -643,6 +657,8 @@ Plot $z_t$ against $t$, setting $\epsilon = 0.1$ and $T = 600$.
643
657
:class: dropdown
644
658
```
645
659
660
+
Here is one solution:
661
+
646
662
```{code-cell} ipython3
647
663
ϵ = 0.1
648
664
θ = 10 # Constant value of state X_t
@@ -743,6 +759,8 @@ Finally, set the realized initial state to $x_0 = (0, 0)$.
Copy file name to clipboardExpand all lines: lectures/kalman_2.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,10 +36,14 @@ In this lecture, we'll use the Kalman filter to
36
36
infer a worker's human capital and the effort that the worker devotes to accumulating
37
37
human capital, neither of which the firm observes directly.
38
38
39
+
This lecture is an application of the filtering and forecasting recursion introduced in {doc}`kalman`.
40
+
39
41
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
42
41
43
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
44
45
+
The lecture {doc}`kalman_filter_var` uses the same recursion to construct innovations, likelihoods, and vector autoregressions.
46
+
43
47
In addition to what's in Anaconda, this lecture will need the following libraries:
0 commit comments