1% Generated by roxygen2: do not edit by hand
2% Please edit documentation in R/etsforecast.R
3\name{forecast.ets}
4\alias{forecast.ets}
5\title{Forecasting using ETS models}
6\usage{
7\method{forecast}{ets}(
8  object,
9  h = ifelse(object$m > 1, 2 * object$m, 10),
10  level = c(80, 95),
11  fan = FALSE,
12  simulate = FALSE,
13  bootstrap = FALSE,
14  npaths = 5000,
15  PI = TRUE,
16  lambda = object$lambda,
17  biasadj = NULL,
18  ...
19)
20}
21\arguments{
22\item{object}{An object of class "\code{ets}". Usually the result of a call
23to \code{\link{ets}}.}
24
25\item{h}{Number of periods for forecasting}
26
27\item{level}{Confidence level for prediction intervals.}
28
29\item{fan}{If TRUE, level is set to seq(51,99,by=3). This is suitable for
30fan plots.}
31
32\item{simulate}{If TRUE, prediction intervals are produced by simulation rather
33than using analytic formulae. Errors are assumed to be normally distributed.}
34
35\item{bootstrap}{If TRUE, then prediction intervals are produced by simulation using
36resampled errors (rather than normally distributed errors).}
37
38\item{npaths}{Number of sample paths used in computing simulated prediction
39intervals.}
40
41\item{PI}{If TRUE, prediction intervals are produced, otherwise only point
42forecasts are calculated. If \code{PI} is FALSE, then \code{level},
43\code{fan}, \code{simulate}, \code{bootstrap} and \code{npaths} are all
44ignored.}
45
46\item{lambda}{Box-Cox transformation parameter. If \code{lambda="auto"},
47then a transformation is automatically selected using \code{BoxCox.lambda}.
48The transformation is ignored if NULL. Otherwise,
49data transformed before model is estimated.}
50
51\item{biasadj}{Use adjusted back-transformed mean for Box-Cox
52transformations. If transformed data is used to produce forecasts and fitted values,
53a regular back transformation will result in median forecasts. If biasadj is TRUE,
54an adjustment will be made to produce mean forecasts and fitted values.}
55
56\item{...}{Other arguments.}
57}
58\value{
59An object of class "\code{forecast}".
60
61The function \code{summary} is used to obtain and print a summary of the
62results, while the function \code{plot} produces a plot of the forecasts and
63prediction intervals.
64
65The generic accessor functions \code{fitted.values} and \code{residuals}
66extract useful features of the value returned by \code{forecast.ets}.
67
68An object of class \code{"forecast"} is a list containing at least the
69following elements: \item{model}{A list containing information about the
70fitted model} \item{method}{The name of the forecasting method as a
71character string} \item{mean}{Point forecasts as a time series}
72\item{lower}{Lower limits for prediction intervals} \item{upper}{Upper
73limits for prediction intervals} \item{level}{The confidence values
74associated with the prediction intervals} \item{x}{The original time series
75(either \code{object} itself or the time series used to create the model
76stored as \code{object}).} \item{residuals}{Residuals from the fitted model.
77For models with additive errors, the residuals are x - fitted values. For
78models with multiplicative errors, the residuals are equal to x /(fitted
79values) - 1.} \item{fitted}{Fitted values (one-step forecasts)}
80}
81\description{
82Returns forecasts and other information for univariate ETS models.
83}
84\examples{
85fit <- ets(USAccDeaths)
86plot(forecast(fit,h=48))
87
88}
89\seealso{
90\code{\link{ets}}, \code{\link{ses}}, \code{\link{holt}},
91\code{\link{hw}}.
92}
93\author{
94Rob J Hyndman
95}
96\keyword{ts}
97