Point and interval forecasts (under the normality assumption or via a bootstrap) for fitted ESEMIFAR models.
# S3 method for 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,
...
)The function returns a list of class "esemifar" with elements
nonpar_model and par_model.
A list with various elements is returned.
the observed series.
the point forecasts.
the lower bounds of the forecasting intervals.
the upper bounds of the forecasting intervals.
the fitted ESEMIFAR model object.
the confidence levels for the forecasting intervals.
an object returned by either tsmoothlm or
esemifar.
a single numeric value that represents the forecasting horizon.
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.
whether to obtain the forecasting intervals under the
normality assumption ("norm") or via a bootstrap ("boot").
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").
only for method = "boot": the number of bootstrap
iterations.
only for method = "boot": the quantile type as
in the argument type of the function quantile.
only for method = "boot": whether to show a
progress bar in the console.
whether to exponentiate all results at the end.
how to extrapolate the estimated trend into the future:
linearly ("linear") or constantly ("constant").
only for method = "boot": use parallel programming
for the bootstrap via the future framework?
only for method = "boot" and future = TRUE:
how many cores to use in the parallel programming.
no purpose; for compatibility only.
Dominik Schulz (Scientific Employee) (Department of Economics,
Paderborn University),
Author
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).
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
Run the code above in your browser using DataLab