arma  R Documentation 
Fit an ARMA model to a univariate time series by conditional least
squares. For exact maximum likelihood estimation see
arima0
.
arma(x, order = c(1, 1), lag = NULL, coef = NULL,
include.intercept = TRUE, series = NULL, qr.tol = 1e07, ...)
x 
a numeric vector or time series. 
order 
a two dimensional integer vector giving the orders of the
model to fit. 
lag 
a list with components 
coef 
If given this numeric vector is used as the initial estimate of the ARMA coefficients. The preliminary estimator suggested in Hannan and Rissanen (1982) is used for the default initialization. 
include.intercept 
Should the model contain an intercept? 
series 
name for the series. Defaults to

qr.tol 
the 
... 
additional arguments for 
The following parametrization is used for the ARMA(p,q) model:
y[t] = a[0] + a[1]y[t1] + \dots + a[p]y[tp] + b[1]e[t1] +
\dots + b[q]e[tq] + e[t],
where a[0]
is set to zero if no intercept is included. By using
the argument lag
, it is possible to fit a parsimonious submodel
by setting arbitrary a[i]
and b[i]
to zero.
arma
uses optim
to minimize the conditional
sumofsquared errors. The gradient is computed, if it is needed, by
a finitedifference approximation. Default initialization is done by
fitting a pure highorder AR model (see ar.ols
).
The estimated residuals are then used for computing a least squares
estimator of the full ARMA model. See Hannan and Rissanen (1982) for
details.
A list of class "arma"
with the following elements:
lag 
the lag specification of the fitted model. 
coef 
estimated ARMA coefficients for the fitted model. 
css 
the conditional sumofsquared errors. 
n.used 
the number of observations of 
residuals 
the series of residuals. 
fitted.values 
the fitted series. 
series 
the name of the series 
frequency 
the frequency of the series 
call 
the call of the 
vcov 
estimate of the asymptotictheory covariance matrix for the coefficient estimates. 
convergence 
The 
include.intercept 
Does the model contain an intercept? 
A. Trapletti
E. J. Hannan and J. Rissanen (1982): Recursive Estimation of Mixed AutoregressiveMoving Average Order. Biometrika 69, 81–94.
summary.arma
for summarizing ARMA model fits;
armamethods
for further methods;
arima0
, ar
.
data(tcm)
r < diff(tcm10y)
summary(r.arma < arma(r, order = c(1, 0)))
summary(r.arma < arma(r, order = c(2, 0)))
summary(r.arma < arma(r, order = c(0, 1)))
summary(r.arma < arma(r, order = c(0, 2)))
summary(r.arma < arma(r, order = c(1, 1)))
plot(r.arma)
data(nino)
s < nino3.4
summary(s.arma < arma(s, order=c(20,0)))
summary(s.arma
< arma(s, lag=list(ar=c(1,3,7,10,12,13,16,17,19),ma=NULL)))
acf(residuals(s.arma), na.action=na.remove)
pacf(residuals(s.arma), na.action=na.remove)
summary(s.arma
< arma(s, lag=list(ar=c(1,3,7,10,12,13,16,17,19),ma=12)))
summary(s.arma
< arma(s, lag=list(ar=c(1,3,7,10,12,13,16,17),ma=12)))
plot(s.arma)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.