Open paroussisc opened 5 years ago
I implemented the KF recursion and got the same results as in Section 2.2.2 (commit 8c0e82614e7241bf787c1f425bebc844ae6b3129) using the river Nile data:
It would be good to note a few things at this stage:
a_t
is the state meanP_t
is the state variance and only depends on the observation variance and state variance, which are hyperparameters (it does not depend on the observation values themselves, just on whether the observations appear - for this linear Gaussian model)F_t
is the variance of the residuals v_t
K_t
is the Kalman gain and specifies how much to move the new state in the direction of the observed residual v_t
and also how much to increase/decrease the state variance by. It is the state variance divided by the residual's variance. In this example, F_t
and P_t
converge to fix values, meaning that this model has a steady state:
In practice this means that we can stop computing F_t
and K_t
which speeds up computation. This will be investigated for this example later on.
This issue is for tracking progress/thoughts/ideas while coding up the local level model from Chapter 2. The idea is to develop understanding and intuition that will help with studying the generalised KF in Chapter 4.