statsmodels.tsa.statespace.kalman_filter.PredictionResults¶

class
statsmodels.tsa.statespace.kalman_filter.
PredictionResults
(results, start, end, nstatic, ndynamic, nforecast)[source]¶ Results of insample and outofsample prediction for state space models generally
Parameters:  results (FilterResults) – Output from filtering, corresponding to the prediction desired
 start (int) – Zeroindexed observation number at which to start forecasting, i.e., the first forecast will be at start.
 end (int) – Zeroindexed observation number at which to end forecasting, i.e., the last forecast will be at end.
 nstatic (int) – Number of insample static predictions (these are always the first elements of the prediction output).
 ndynamic (int) – Number of insample dynamic predictions (these always follow the static predictions directly, and are directly followed by the forecasts).
 nforecast (int) – Number of insample forecasts (these always follow the dynamic predictions directly).

npredictions
¶ Number of observations in the predicted series; this is not necessarily the same as the number of observations in the original model from which prediction was performed.
Type: int

start
¶ Zeroindexed observation number at which to start prediction, i.e., the first predict will be at start; this is relative to the original model from which prediction was performed.
Type: int

end
¶ Zeroindexed observation number at which to end prediction, i.e., the last predict will be at end; this is relative to the original model from which prediction was performed.
Type: int

endog
¶ The observation vector.
Type: array

design
¶ The design matrix, \(Z\).
Type: array

obs_intercept
¶ The intercept for the observation equation, \(d\).
Type: array

obs_cov
¶ The covariance matrix for the observation equation \(H\).
Type: array

transition
¶ The transition matrix, \(T\).
Type: array

state_intercept
¶ The intercept for the transition equation, \(c\).
Type: array

selection
¶ The selection matrix, \(R\).
Type: array

state_cov
¶ The covariance matrix for the state equation \(Q\).
Type: array

filtered_state
¶ The filtered state vector at each time period.
Type: array

filtered_state_cov
¶ The filtered state covariance matrix at each time period.
Type: array

predicted_state
¶ The predicted state vector at each time period.
Type: array

predicted_state_cov
¶ The predicted state covariance matrix at each time period.
Type: array

forecasts
¶ The onestepahead forecasts of observations at each time period.
Type: array

forecasts_error
¶ The forecast errors at each time period.
Type: array

forecasts_error_cov
¶ The forecast error covariance matrices at each time period.
Type: array
Notes
The provided ranges must be conformable, meaning that it must be that end  start == nstatic + ndynamic + nforecast.
This class is essentially a view to the FilterResults object, but returning the appropriate ranges for everything.
Methods
predict
([start, end, dynamic])Insample and outofsample prediction for state space models generally update_filter
(kalman_filter)Update the filter results update_representation
(model[, only_options])Update the results to match a given model Attributes
filter_attributes
kalman_gain
Kalman gain matrices representation_attributes
standardized_forecasts_error
Standardized forecast errors