- y
a numeric vector or univariate time series of class ts
- p
Embedding dimension for non-seasonal time series. Number of
non-seasonal lags used as inputs. For non-seasonal time series, the default
is the optimal number of lags (according to the AIC) for a linear AR(p)
model. For seasonal time series, the same method is used but applied to
seasonally adjusted data (from an stl decomposition).
- P
Number of seasonal lags used as inputs.
- FUN
Function used for model fitting. Must accept argument x and y
for the predictors and response, respectively (formula object not
currently supported).
- predict.FUN
Prediction function used to apply FUN to new data.
Must accept an object of class FUN as its first argument, and a
data frame or matrix of new data for its second argument. Additionally,
it should return fitted values when new data is omitted.
- xreg
Optionally, a numerical vector or matrix of external regressors,
which must have the same number of rows as y. It should not be a data frame.
- lambda
Box-Cox transformation parameter. If lambda = "auto",
then a transformation is automatically selected using BoxCox.lambda.
The transformation is ignored if NULL. Otherwise,
data transformed before model is estimated.
- model
Output from a previous call to nnetar. If model is
passed, this same model is fitted to y without re-estimating any
parameters.
- subset
Optional vector specifying a subset of observations to be used
in the fit. Can be an integer index vector or a logical vector the same
length as y. All observations are used by default.
- scale.inputs
If TRUE, inputs are scaled by subtracting the column
means and dividing by their respective standard deviations. If lambda
is not NULL, scaling is applied after Box-Cox transformation.
- x
Deprecated. Included for backwards compatibility.
- ...
Other arguments passed to FUN for modelAR.