Fits a baseline forecasting model to observed data.

fit_baseline(x, model, temporal_info = NULL)

Arguments

x

Numeric vector of time series data

model

A model created using ConstantModel(), ARMAModel(), ETSModel(), or other model functions (see ?ConstantModel for available models)

temporal_info

Optional TemporalInfo object with start date and resolution

Value

A fitted model object that can be used for forecasting

Examples

if (FALSE) { # \dontrun{
data <- c(1.2, 2.3, 3.1, 2.8, 3.5, 4.2, 3.9)
model <- ARMAModel(p = 1, q = 1)
fitted <- fit_baseline(data, model)
} # }