predict.esemifar {esemifar}R Documentation

ESEMIFAR Prediction Method

Description

Point and interval forecasts (under the normality assumption or via a bootstrap) for fitted ESEMIFAR models.

Usage

## S3 method for class 'esemifar'
predict(
  object,
  n.ahead = 5,
  alpha = c(0.95, 0.99),
  method = c("norm", "boot"),
  bootMethod = c("simple", "advanced"),
  npaths = 5000,
  quant.type = 8,
  boot_progress = TRUE,
  expo = FALSE,
  trend_extrap = c("linear", "constant"),
  future = TRUE,
  num_cores = future::availableCores() - 1,
  ...
)

Arguments

object

an object returned by either tsmoothlm or esemifar.

n.ahead

a single numeric value that represents the forecasting horizon.

alpha

a numeric vector with confidence levels for the forecasting intervals; the default c(0.95, 0.99) represents 95-percent and 99-percent forecasting interval bounds that will be computed.

method

whether to obtain the forecasting intervals under the normality assumption ("norm") or via a bootstrap ("boot").

bootMethod

only for method = "boot": whether to simulate future paths only ("simple") or whether to re-estimate the FARIMA model for the re-sampled series and to then obtain simulated predictive roots ("advanced").

npaths

only for method = "boot": the number of bootstrap iterations.

quant.type

only for method = "boot": the quantile type as in the argument type of the function quantile.

boot_progress

only for method = "boot": whether to show a progress bar in the console.

expo

whether to exponentiate all results at the end.

trend_extrap

how to extrapolate the estimated trend into the future: linearly ("linear") or constantly ("constant").

future

only for method = "boot": use parallel programming for the bootstrap via the future framework?

num_cores

only for method = "boot" and future = TRUE: how many cores to use in the parallel programming.

...

no purpose; for compatibility only.

Details

Produce point and interval forecasts based on ESEMIFAR models. Throughout, the infinite-order AR-representation of the parametric FARIMA part is considered to produce point forecasts and future paths of the series. The trend is usually extrapolated linearly (or constantly as an alternative).

Value

The function returns a list of class "esemifar" with elements nonpar_model and par_model.

A list with various elements is returned.

obs

the observed series.

mean

the point forecasts.

lower

the lower bounds of the forecasting intervals.

upper

the upper bounds of the forecasting intervals.

model

the fitted ESEMIFAR model object.

level

the confidence levels for the forecasting intervals.

Author(s)

Examples

lgdp <- log(esemifar::gdpG7$gdp)
est <- tsmoothlm(lgdp, pmax = 1, qmax = 1)
# Under normality
fc <- predict(est, n.ahead = 10, method = "norm", expo = TRUE)
fc$mean
fc$lower
fc$upper


[Package esemifar version 2.0.1 Index]