Learn R Programming

mafs (version 0.0.3)

apply_all_models: Fit several forecast models

Description

Create a list of all possible forecast models for the inputed time series object.

Usage

apply_all_models(x, horizon, dont_apply = "", verbose = FALSE)

Arguments

x

A ts object.

horizon

The forecast horizon length

dont_apply

Character vector. Choose one or more models that will not be used on select_forecast().

verbose

logical. Set TRUE if you want mafs to tell you what models are running.

Value

A list of forecast objects from apply_selected_model()

Details

This functions loops the output from available_models(), uses it as the model.name argument for apply_selected_model() and return a list of length 19 in which each element is a forecast model. Depending on some of the characteristics of the time series object used as the input for this function, the model might not be created. For example, if you try to fit a neural network model to a short time series, it will return an error and fail to create the fit. In order to overcome this issue, if the model returns an error, it will return a NA as the list element instead.

Examples

Run this code
# NOT RUN {
apply_all_models(austres, 6)
# }

Run the code above in your browser using DataLab