FcGeneralizedLinearModels4TS: Forecasting with Generalized Linear Models for time series

View source: R/FcGeneralizedLinearModels4TS.R

FcGeneralizedLinearModels4TSR Documentation

Forecasting with Generalized Linear Models for time series

Description

Generalized linear models for the forecast of time series in the multivariate case

Usage

FcGeneralizedLinearModels4TS(Response, SplitAt, Predictor1, Predictor2 = NULL, 

CorrectionFactor=FALSE, PlotIt = TRUE,Time, Summary = FALSE,...)

Arguments

Response

[1:n] vector with an value of each time j in [1,n]

SplitAt

scalar 'k' with k<n, index of row where the DataFrame is divided into test and train data

Predictor1

[1:n] vector with an value of each time j in [1,n]

Predictor2

[1:n] vector with an value of each time j in [1,n]. Can also be NULL if not used

Time

Optional, [1:n] time vector in case of PlotIt=TRUE

CorrectionFactor

Scalar, if TRUE: the predicted time series will begin at the same point as the last value of the training set. All other values will be mulitplied by a factor accordingly.

PlotIt

Optional,FALSE (default), do nothing. TRUE: plots an evaluation of the forecast on the test data FALSE: Plots data model and prediction with

Summary

Output of glm is evaluated further

...

Further arguments passed to glm

Details

Assumption: Response and 'Predictors' have the same time intervals, the same starting time and the same length.

Value

list with

Forecast

[k:n], the forecast, of the time interval [k,n] which was not used in the model

TestSet

[k:n], the part of Response not used in the model

Accuracy

ME, RMSE, MAE, MPE, MAPE of training and test dataset in a matrix

Errors

Residuals: TestSet-Forecast

Model

Output of glm

Note

Wrapper for glm with some additional features

Author(s)

Michael Thrun


Mthrun/TSAT documentation built on Feb. 5, 2024, 11:15 p.m.