[Experimental]

The time series forecasting pipeline depends on time series models fit with the model function. This function provides a wrapper that allows the user to pass in a list of function definitions and return a list of model outputs (mable objects) corresponding to each fit. The function also allows the user to pass in a vector of multiple outcome variable names (i.e. "ideaths" and "icases").

NOTE: The functionality in ts_fit() is experimental. Users may find more flexibility using the model function to fit models to be used downstream in ts_forecast().

ts_fit(.data, outcomes, .fun, single = TRUE)

Arguments

.data

Data to use for modeling

outcomes

Character vector specifying names of the column to use as the outcome

.fun

List of modeling functions to use

single

Boolean indicating whether or not a "shortcut" should be used to return a single tibble; only works if there is one outcome ("outcomes") and one model function (".fun"); default is TRUE

Value

A single mable (model table) if (single = TRUE) or a named list of mables (if single = FALSE). For more details on data structure see mable.