predict.foreccomb_res: Prediction function for Forecast Combinations

View source: R/predict.foreccomb_res.R

predict.foreccomb_resR Documentation

Prediction function for Forecast Combinations

Description

prediction method for class ‘foreccomb_res’. Uses the previously created forecast combination result to predict the combination for a newly provided prediction dataset.

Usage

## S3 method for class 'foreccomb_res'
predict(object, newpreds, newobs = NULL, simplify = TRUE, byrow = FALSE, ...)

Arguments

object

An object of class 'foreccomb'. Contains training set (actual values + matrix of model forecasts) and optionally a test set.

newpreds

A matrix or multivariate time series; contains individual model forecasts if a test set is used (optional). Does not require specification of newobs – in the case in which a forecaster only wants to train the forecast combination method with a training set and apply it to future individual model forecasts, only newpreds is required, not newobs.

newobs

A vector or univariate time series; contains ‘actual values’ if a test set is used (optional).

simplify

logical. The default (TRUE) returns the predictions separately. If set to (FALSE) the predictions are incorporated into the foreccomb_res object, that is, the object is equal to the one that would have been obtained, if the new prediction set would have been provided when the forecast combination method was trained originally.

byrow

logical. The default (FALSE) assumes that each column of the forecast matrices (prediction_matrix and – if specified – newpreds) contains forecasts from one forecast model; if each row of the matrices contains forecasts from one forecast model, set to TRUE.

...

potential further arguments (require by generic)

Author(s)

Adapted from Christoph E. Weiss and Gernot R. Roetzer (ForecastComb)

See Also

foreccomb,


Techtonique/ahead documentation built on Nov. 24, 2024, 10:33 a.m.