| predict.SDFMFit | R Documentation |
Predict all missing observations due to ragged edges in the data set plus horizon steps ahead.
## S3 method for class 'SDFMFit'
predict(object, horizon = 0, ...)
object |
|
horizon |
Number of forecasting steps into the future. Must be smaller
than or equal to |
... |
Additional parameters for the prediction function. |
A named list of plot objects:
Object containing the original data. The object inherits its
class from object$data: If data is provided as zoo, data will be a
zoo object. If data is provided as matrix, data will be a
(no_of_factors\timesno_of_obs) matrix.
Object containing only the predictions of all
missing observations plus the forecasts. Inherits its class from
object$data as above.
Object containing the observed data, predictions of
all missing observations plus the forecasts. Inherits its class from
object$data as above.
Domenic Franjic
data(factor_model)
no_of_vars <- dim(factor_model$data)[2]
no_of_factors <- dim(factor_model$factors)[2]
sdfm_fit <- twoStepSDFM(data = factor_model$data, delay = factor_model$delay,
selected = rep(floor(0.5 * no_of_vars), no_of_factors),
no_of_factors = no_of_factors, fcast_horizon = 5)
dfm_fit <- twoStepDenseDFM(data = factor_model$data, delay = factor_model$delay,
no_of_factors = no_of_factors, fcast_horizon = 5)
predict(sdfm_fit, horizon = 5)
predict(dfm_fit, horizon = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.