rls_update {onlineforecast} | R 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 |
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
[Package onlineforecast version 1.0.2 Index]