NNS.ARMA | R Documentation |
Autoregressive model incorporating nonlinear regressions of component series.
NNS.ARMA(
variable,
h = 1,
training.set = NULL,
seasonal.factor = TRUE,
weights = NULL,
best.periods = 1,
modulo = NULL,
mod.only = TRUE,
negative.values = FALSE,
method = "nonlin",
dynamic = FALSE,
shrink = FALSE,
plot = TRUE,
seasonal.plot = TRUE,
pred.int = NULL
)
variable |
a numeric vector. |
h |
integer; 1 (default) Number of periods to forecast. |
training.set |
numeric;
|
seasonal.factor |
logical or integer(s); |
weights |
numeric or |
best.periods |
integer; [2] (default) used in conjunction with |
modulo |
integer(s); NULL (default) Used to find the nearest multiple(s) in the reported seasonal period. |
mod.only |
logical; |
negative.values |
logical; |
method |
options: ("lin", "nonlin", "both", "means"); |
dynamic |
logical; |
shrink |
logical; |
plot |
logical; |
seasonal.plot |
logical; |
pred.int |
numeric [0, 1]; |
Returns a vector of forecasts of length (h)
if no pred.int
specified. Else, returns a data.table
with the forecasts as well as lower and upper prediction intervals per forecast point.
For monthly data series, increased accuracy may be realized from forcing seasonal factors to multiples of 12. For example, if the best periods reported are: {37, 47, 71, 73} use
(seasonal.factor = c(36, 48, 72))
.
(seasonal.factor = FALSE)
can be a very computationally expensive exercise due to the number of seasonal periods detected.
Fred Viole, OVVO Financial Systems
Viole, F. and Nawrocki, D. (2013) "Nonlinear Nonparametric Statistics: Using Partial Moments" (ISBN: 1490523995)
Viole, F. (2019) "Forecasting Using NNS" \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2139/ssrn.3382300")}
## Nonlinear NNS.ARMA using AirPassengers monthly data and 12 period lag
## Not run:
NNS.ARMA(AirPassengers, h = 45, training.set = 100, seasonal.factor = 12, method = "nonlin")
## Linear NNS.ARMA using AirPassengers monthly data and 12, 24, and 36 period lags
NNS.ARMA(AirPassengers, h = 45, training.set = 120, seasonal.factor = c(12, 24, 36), method = "lin")
## Nonlinear NNS.ARMA using AirPassengers monthly data and 2 best periods lag
NNS.ARMA(AirPassengers, h = 45, training.set = 120, seasonal.factor = FALSE, best.periods = 2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.