Hi there,
I was hoping I could verify I have specified a custom SSM correctly in statsmodels.
The state space representation is:
Main question: time-varying transition matrix
1. The transition matrix is time-varying; it contains 2 exogenous data series, iAT_t and AT_t . I tried to adapt the logic for a time-varying design matrix from Model 3 of https://www.statsmodels.org/stable/examples/notebooks/generated/statespace_custom_models.html , namely to specify matrices as three-dimensional with time in the third dimension, but would really appreciate anyone can verify I have specified the model correctly in statsmodels The relevant code is below (and also attached).
Other questions
It is possible that these questions will be resolved to 1, if my code is incorrect.
2. Constants in the state vector: The state space representation should make gamma and delta constants even though they are in the state vector. After fitting, when I check the state vector’s fitted or smoothed estimates using model.filtered_state or model.smoothed_state, I see that their values are not constant, although they converge to constants by the end of the data. Is this normal?
3. Convergence: to check convergence of fitting, is model.mle_retvals['converged'] the correct value? There is also model.filter_results.converged and model.smoother_results.converged which I have ignored, and they sometimes are false when the mle_retvals value is true.
Thanks!
--
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/ff9e9375-11fa-4fdd-9b01-55140491c75bn%40googlegroups.com.
Hello Chad,
Many thanks for your help. Yes the update method above was indented too far, it is not in our program. We have run both versions above and ones with time-invariant design, selection matrices. Still our smoothed-state parameters are not constant at the start (see below). Could there be any other reason for this?
Thanks!