predict.fnets {fnets} | R Documentation |
Forecasting by fnets
Description
Produces forecasts of the data for a given forecasting horizon by separately estimating the best linear predictors of common and idiosyncratic components
Usage
## S3 method for class 'fnets'
predict(
object,
newdata = NULL,
n.ahead = 1,
fc.restricted = TRUE,
r = c("ic", "er"),
...
)
Arguments
object |
|
newdata |
input time series matrix; by default, uses input to |
n.ahead |
forecasting horizon |
fc.restricted |
whether to forecast using a restricted or unrestricted, blockwise VAR representation of the common component |
r |
number of static factors, or a string specifying the factor number selection method when
|
... |
not used |
Value
a list containing
forecast |
forecasts for the given forecasting horizon |
common.pred |
a list containing forecasting results for the common component |
idio.pred |
a list containing forecasting results for the idiosyncratic component |
mean.x |
|
See Also
Examples
out <- fnets(data.restricted, q = 2, do.lrpc = FALSE, var.args = list(n.cores = 2))
pre.unr <- predict(out, fc.restricted = FALSE)
pre.res <- predict(out, fc.restricted = TRUE)