This function is identical to the arimax function which builds on and extends the capability of the arima function in R stats by allowing the incorporation of transfer functions, and innovative and additive outliers. For backward compatitibility, the function is also named arima. Note in the computation of AIC, the number of parameters excludes the noise variance. This function is heavily based on the arima function of the stats core of R.
arima(x, order = c(0, 0, 0), seasonal = list(order = c(0, 0, 0), period = NA),
xreg = NULL, include.mean = TRUE, transform.pars = TRUE, fixed = NULL,
init = NULL, method = c("CSS-ML", "ML", "CSS"), n.cond, optim.control = list(),
kappa = 1e+06, io = NULL, xtransf, transfer = NULL)
time series response
regular ARIMA order
seasonal ARIMA order
a dataframe containing covariates
if true, an intercept term is incorporated in the model; applicable only to stationary models.
if true, the AR parameters are transformed to ensure stationarity
a vector indicating which coefficients are fixed or free
initial values
estimation method
number of initial values to be conditioned on in a conditional analysis
control parameters for the optimization procedure
prior variance; used in dealing with initial values
All of the above parameters have the same usage as those in the arima function. Please check the help manual of the arima function. Below are new options.
a list of time points at which the model may have an innovative outlier. The time point of the outlier can be given either as absolute time point or as c(a,b), i.e. at the b-th 'month' of the a-th 'year' where each year has frequency(x) months, assuming x is a time series.
xtranf is a matrix with each column containing a covariate that affects the time series response in terms of an ARMA filter of order (p,q), i.e. if Z is one such covariate, its effect on the time series is \((theta_0+theta_1B+...+theta_{q-1}B^{q-1})/(1-phi_1 B -...-phi_p B^p) Z_t\) In particular, if \(p=0\) and \(q=1\), this specifies a simple regression relationship, which should be included in xreg and not here. Note that the filter starts with zero initial values. Hence, it is pertinent to mean-delete each distributed-lag covariate, and this is not done automatically.
a list consisting of the ARMA orders for each transfer (distributed lag) covariate.
An Arimax object contining the model fit.
# NOT RUN {
data(hare)
arima(sqrt(hare),order=c(3,0,0))
# }
Run the code above in your browser using DataLab