grnn_forecasting {tsfgrnn} | R Documentation |
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.
grnn_forecasting(timeS, h, lags = NULL, sigma = NULL, msas = c("recursive", "MIMO"), scale = TRUE)
timeS |
A numeric vector or time series of class |
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 |
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:
|
the matched call. |
|
the Multi-Step Ahead Strategy. |
|
a time series with the forecast. |
|
an object of class |
pred <- grnn_forecasting(USAccDeaths, h = 12, lags = 1:12) plot(pred)