forecast.smooth: Forecasting time series using smooth functions

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/methods.R

Description

This function is created in order for the package to be compatible with Rob Hyndman's "forecast" package

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## S3 method for class 'adam'
forecast(object, h = 10, newdata = NULL,
  occurrence = NULL, interval = c("none", "prediction", "confidence",
  "simulated", "approximate", "semiparametric", "nonparametric"),
  level = 0.95, side = c("both", "upper", "lower"), cumulative = FALSE,
  nsim = 10000, ...)

## S3 method for class 'smooth'
forecast(object, h = 10, interval = c("parametric",
  "semiparametric", "nonparametric", "none"), level = 0.95,
  side = c("both", "upper", "lower"), ...)

## S3 method for class 'oes'
forecast(object, h = 10, interval = c("parametric",
  "semiparametric", "nonparametric", "none"), level = 0.95,
  side = c("both", "upper", "lower"), ...)

## S3 method for class 'msdecompose'
forecast(object, h = 10, interval = c("parametric",
  "semiparametric", "nonparametric", "none"), level = 0.95, model = NULL,
  ...)

Arguments

object

Time series model for which forecasts are required.

h

Forecast horizon.

newdata

The new data needed in order to produce forecasts.

occurrence

The vector containing the future occurrence variable (values in [0,1]), if it is known.

interval

Type of interval to construct. See es for details.

level

Confidence level. Defines width of prediction interval.

side

Defines, whether to provide "both" sides of prediction interval or only "upper", or "lower".

cumulative

If TRUE, then the cumulative forecast and prediction interval are produced instead of the normal ones. This is useful for inventory control systems.

nsim

Number of iterations to do in case of interval="simulated".

...

Other arguments accepted by either es, ces, gum or ssarima.

model

The type of ETS model to fit on the decomposed trend. Only applicable to "msdecompose" class. This is then returned in parameter "esmodel". If NULL, then it will be selected automatically based on the type of the used decomposition (either among pure additive or among pure additive ETS models).

Details

This is not a compulsory function. You can simply use es, ces, gum or ssarima without forecast.smooth. But if you are really used to forecast function, then go ahead!

Value

Returns object of class "smooth.forecast", which contains:

Author(s)

Ivan Svetunkov, ivan@svetunkov.ru

References

Hyndman, R.J., Koehler, A.B., Ord, J.K., and Snyder, R.D. (2008) Forecasting with exponential smoothing: the state space approach, Springer-Verlag.

See Also

forecast

Examples

1
2
3
4
5
ourModel <- ces(rnorm(100,0,1),h=10)

forecast(ourModel,h=10)
forecast(ourModel,h=10,interval=TRUE)
plot(forecast(ourModel,h=10,interval=TRUE))

config-i1/smooth documentation built on June 16, 2021, 2:13 p.m.