statsmodels.tsa.statespace.kalman_smoother.SmootherResults smoothed_state definition

56 views
Skip to first unread message

Josh Spear

unread,
Sep 29, 2020, 7:45:48 AM9/29/20
to pystatsmodels
Hi,

I understand the Kalman Smoother implements the algorithm from Durbin and Koopman 2012. Please can I confirm whether the output of the  smoothed_state is the Expected value of the state (alpha) given the observations (y)  or whether it is the smoothed realisations of the state?

Many thanks, 

Josh 

Chad Fulton

unread,
Sep 29, 2020, 9:31:52 AM9/29/20
to Statsmodels Mailing List
Hi Josh,

Yes, `smoothed_state` it is the expected value of the state vector conditional on the entire dataset. It's what Durbin and Koopman denote by \hat \alpha.

Samples from the joint distribution of the state vector conditional on the entire dataset can be drawn by creating a simulation smoother object, running the `simulate` method, and then accessing the `simulated_state` attribute.

Best,
Chad

--
You received this message because you are subscribed to the Google Groups "pystatsmodels" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pystatsmodel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pystatsmodels/31ecb951-0ad4-4f07-99e8-b1f92f8211cbn%40googlegroups.com.

Josh Spear

unread,
Sep 29, 2020, 9:35:03 AM9/29/20
to pystatsmodels
Hi Chad, 

Ah perfect thank you. Just to confirm, so the simulated_state attribute from the simulate method will be equivalent to \tilda \alpha in D&K 2012?

Thanks again for your help.

Josh

Chad Fulton

unread,
Sep 29, 2020, 10:25:50 AM9/29/20
to Statsmodels Mailing List
Hi Josh,

Yes, that is correct, `simulated_state` is \tilde \alpha.

In case it's useful, an example notebook that uses simulation smoothing can be found at https://www.statsmodels.org/devel/examples/notebooks/generated/statespace_tvpvar_mcmc_cfa.html

Best,
Chad

Josh Spear

unread,
Sep 29, 2020, 12:46:41 PM9/29/20
to pystatsmodels
Thank you Chad!
Reply all
Reply to author
Forward
0 new messages