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 = "ROLLING",
msas = c("recursive", "MIMO"),
transform = c("additive", "multiplicative", "none")
)
Arguments
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. If NULL (the default) the lags are selected in a
fast, heuristic way. It is also possible to use the values |
sigma |
A positive real value or a character value. The smoothing parameter in GRNN regression. Two character values are possible, "ROLLING" (the default) and "FIXED", in which case the parameter is chosen using an optimization tool with rolling origin evaluation or fixed origin evaluation. |
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). |
transform |
A character value indicating whether the training samples
are transformed. If the time series has a trend it is recommended. By
default is |
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 |
References
F. Martinez et al. (2022). "Strategies for time series forecasting with generalized regression neural networks", Neurocomputing, 491, pp. 509–521.
Examples
pred <- grnn_forecasting(USAccDeaths, h = 12, lags = 1:12)
plot(pred)