grnn_forecasting {tsfgrnn}R Documentation

Time series forecasting using GRNN regression

Description

It applies GRNN regression to forecast the future values of a time series. The lags used as autoregressive variables are set with the lags parameter. If the user does not set the lags, these values are selected automatically.

Usage

grnn_forecasting(timeS, h, lags = NULL, sigma = NULL,
  msas = c("recursive", "MIMO"), scale = TRUE)

Arguments

timeS

A numeric vector or time series of class ts.

h

A positive integer. Number of periods for forecasting.

lags

An integer vector in increasing order expressing the lags used as autoregressive variables.

sigma

A positive real value. The smoothing parameter in GRNN regression. If NULL (the default) the parameter is chosen using an optimization tool.

msas

A string indicating the Multiple-Step Ahead Strategy used when more than one value is predicted. It can be "MIMO" or "recursive" (the default).

scale

A logical. If TRUE (the default), the time series is scaled to the range [0, 1].

Value

An object of class "grnnForecast". The function summary can be used to obtain or print a summary of the results. An object of class "gnnForecast" is a list containing at least the following components:

call

the matched call.

msas

the Multi-Step Ahead Strategy.

prediction

a time series with the forecast.

model

an object of class "grnnModel" with the GRNN model

Examples

pred <- grnn_forecasting(USAccDeaths, h = 12, lags = 1:12)
plot(pred)

[Package tsfgrnn version 0.1.0 Index]