apply_selected_model: Select a model to forecast a time series object.

Description Usage Arguments Value Examples

Description

Apply a chosen forecast model to a time series object. Basically a wrapper for many functions from the forecast package. Please run available_models() to see the list of available modes to use as the model.name argument of this function.

Usage

1
apply_selected_model(x, model_name, horizon)

Arguments

x

A ts object.

model_name

A string indicating the name of the forecast model.

horizon

the forecast horizon length

Value

A forecast object

Examples

1
2
3
4
## Not run: 
apply_selected_model(AirPassengers, "auto.arima", 6)

## End(Not run)

mafs documentation built on May 2, 2019, 12:40 p.m.