arimax {TSA} | R Documentation |
Fitting an ARIMA model with Exogeneous Variables
Description
This function builds on and
extends the capability of the arima function in R stats by allowing the
incorporation of transfer functions, 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. See the help page of arima in stats for details on arguments
x
to kappa
.
Usage
arimax(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)
Arguments
x |
time series response |
order |
regular ARIMA order |
seasonal |
seasonal ARIMA order |
xreg |
a dataframe containing covariates |
include.mean |
if true, an intercept term is incorporated in the model; applicable only to stationary model. |
transform.pars |
if true, the AR parameters are transformed to ensure stationarity |
fixed |
a vector indicating which coefficients are fixed or free |
init |
initial values |
method |
estimation method |
n.cond |
number of initial values to be conditioned on a conditional analysis |
optim.control |
control parameters for the optimization procedure |
kappa |
prior variance; used in dealing with initial values |
io |
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. |
xtransf |
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
|
transfer |
a list consisting of the ARMA orders for each transfer (distributed lag) covariate. |
Value
An Arimax object containing the model fit.
Author(s)
Original author of the arima function in R stats: Brian Ripley. The arimax function is based on the stats:::arima function, with modifications by Kung-Sik Chan.
See Also
Examples
data(airmiles)
plot(log(airmiles),ylab='Log(airmiles)',xlab='Year', main='')
acf(diff(diff(window(log(airmiles),end=c(2001,8)),12)),lag.max=48,main='')
air.m1=arimax(log(airmiles),order=c(0,1,1),seasonal=list(order=c(0,1,1),
period=12),xtransf=data.frame(I911=1*(seq(airmiles)==69),
I911=1*(seq(airmiles)==69)),
transfer=list(c(0,0),c(1,0)),xreg=data.frame(Dec96=1*(seq(airmiles)==12),
Jan97=1*(seq(airmiles)==13),Dec02=1*(seq(airmiles)==84)),method='ML')