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

fnets object

newdata

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

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 fc.restricted = TRUE; possible values are:

"ic"

information criteria of Alessi, Barigozzi & Capasso (2010)

"er"

eigenvalue ratio of Ahn & Horenstein (2013)

...

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

mean.x argument from object

See Also

fnets

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)

[Package fnets version 0.1.6 Index]