Fit a time series model using ets and make forecasts. The frequency of the data is set a priori, as opposed to estimating the parameter from the data.

ets_one_step uses ets to fit an exponential-smoothing time series model and make a single one-step forecast.

ets_ts(timeseries, num_ahead = 5, level = 95, frequency = 1)

ets_one_step(timeseries, level = 95)

Arguments

timeseries

the time series to forecast

num_ahead

the number of points at the end of the time series to forecast

level

Confidence level for prediction intervals.

frequency

the number of observations per unit of time.

Value

a data.frame of the mean forecasts, the observed values, and the lower and upper CI levels (if an error occurs, then just NA values)