powered by
Produces forecasts of the data for a given forecasting horizon by separately estimating the best linear predictors of common and idiosyncratic components
# S3 method for fnets predict( object, newdata = NULL, n.ahead = 1, fc.restricted = TRUE, r = c("ic", "er"), ... )
a list containing
forecasts for the given forecasting horizon
a list containing forecasting results for the common component
a list containing forecasting results for the idiosyncratic component
mean.x argument from object
mean.x
object
fnets object
fnets
input time series matrix; by default, uses input to object. Valid only for the case where newdata is modelled as a VAR process without any factors
newdata
forecasting horizon
whether to forecast using a restricted or unrestricted, blockwise VAR representation of the common component
number of static factors, or a string specifying the factor number selection method when fc.restricted = TRUE; possible values are:
fc.restricted = TRUE
"ic"
information criteria of Alessi, Barigozzi & Capasso (2010)
"er"
eigenvalue ratio of Ahn & Horenstein (2013)
not used
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)
Run the code above in your browser using DataLab