Learn R Programming

mafs (version 0.0.3)

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

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

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

Run this code
# NOT RUN {
apply_selected_model(AirPassengers, "auto.arima", 6)
# }

Run the code above in your browser using DataLab