rls_update: Updates the model fits

View source: R/rls_update.R

rls_updateR Documentation

Updates the model fits

Description

Calculates the RLS update of the model coefficients with the provived data.

Usage

rls_update(model, datatr = NA, y = NA, runcpp = TRUE)

Arguments

model

A model object

datatr

a data.list with transformed data (from model$transform_data(D))

y

A vector of the model output for the corresponding time steps in datatr

runcpp

Optional, default = TRUE. If TRUE, a c++ implementation of the update is run, otherwise a slower R implementation is used.

Details

See vignette ??ref(recursive updating, not yet finished) on how to use the function.

Value

Returns a named list for each horizon (model$kseq) containing the variables needed for the RLS fit (for each horizon, which is saved in model$Lfits):

It will update variables in the forecast model object.

See Also

See rls_predict.

Examples


# See rls_predict examples


onlineforecast documentation built on Oct. 12, 2023, 5:15 p.m.