Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A way to retrieve statespace DynamicFactor(MQ) Factor Predictions #9197

Open
NMRobert opened this issue Apr 5, 2024 · 0 comments
Open

A way to retrieve statespace DynamicFactor(MQ) Factor Predictions #9197

NMRobert opened this issue Apr 5, 2024 · 0 comments

Comments

@NMRobert
Copy link

NMRobert commented Apr 5, 2024

When I estimate statsmodels.tsa.statespace.dynamic_factor_mq models and forecast out-of-sample, it would be very useful to be able to retrieve the forecasts for the factors as well as the observation variables. I've attempted to get at the underlying internal data by doing something like this:

fitted_model = dfm.fit(...)
res = fitted_model.get_forecast()
res.prediction_results.predicted_state

but the shape of the predicted_state numpy matrix doesn't quite make sense to me: I was expecting it to have dimension (n_obs x num_factors), but it seems to have dimension (n_obs x (n_end+n_factors*2)). Is there a way to accomplish this? Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant