Forecast the Simultaneous Equations Model (SEM)
forecast.Rd
This function produces forecasts for the SEM.
Arguments
- estimates
A
koma_estimate
object (estimate
) containing the estimates for the simultaneous equations model, as well as a list of time series and akoma_seq
object (system_of_equations
) that were used in the estimation.- dates
Key-value list for date ranges in various model operations.
- ...
Additional parameters.
- restrictions
List of model constraints. Default is empty.
- point_forecast
A list that contains the following elements:
active
: Determines the type of forecast generated. If TRUE, a point forecast is created. If FALSE, a density forecast is returned. Default is TRUE.central_tendency
: A character string indicating which central tendency measure ("mean" or "median") to use for summary statistics. Default is "mean".
Value
An object of class koma_forecast
.
An object of class koma_forecast
is a list containing the following
elements:
- mean
Mean point forecasts as a list of time series of class
koma_ts
.- median
Median point forecasts as a list of time series of class
koma_ts
.- quantiles
A list of quantiles, where each element is named according to the quantile (e.g., "5", "50", "95"), and contains the forecasts for that quantile. This element is NULL if
quantiles = FALSE
.- ts_data
Time-series data set used in forecasting.
- y_matrix
The Y matrix constructed from the balanced data up to the current quarter, used for forecasting.
- x_matrix
The X matrix used for forecasting.
Details
The forecast
function for SEM uses the estimates from the koma_estimate
object to produce point forecasts or quantile forecasts based on the
point_forecast
parameter. If point_forecast$active
is TRUE
, only point
forecasts are generated. If FALSE
, quantile forecasts are generated and
included in the quantiles
list.
Use the summary
function to print a summary of the forecast
results.
The plot
function can be used to visualize the forecasts and
prediction intervals.
Parallel
This function provides the option for parallel computing through
the future::plan()
function.
For a detailed example on executing estimate
in parallel, see the vignette:
vignette("parallel")
.
For more details, see the future package documentation.
See also
For a comprehensive example of using
forecast
, seevignette("koma")
.Related functions within the package that may be of interest:
estimate
.