armaimp {TSSS} | R Documentation |
Calculate impulse, autocovariance, partial autocorrelation function and characteristic roots of scalar ARMA model for given AR and MA coefficients.
armaimp(arcoef = NULL, macoef = NULL, v, n = 1000, lag = NULL, nf = 200, plot = TRUE, ...)
arcoef |
AR coefficients. |
macoef |
MA coefficients. |
v |
innovation variance. |
n |
data length. |
lag |
maximum lag of autocovariance function. Default is 2*sqrt(n). |
nf |
number of frequencies in evaluating spectrum. |
plot |
logical. If |
... |
further arguments to be passed to |
The ARMA model is given by
y(t) - a(1)y(t-1) - … - a(p)y(t-p) = u(t) - b(1)u(t-1) - … - b(q)u(t-q),
where p is AR order, q is MA order and u(t) is a zero mean white noise.
Characteristic roots of AR / MA operator is a list with the following components:
re: real part R
im: imaginary part I
amp: sqrt(R^2+I^2)
atan: atan(I/R)
degree
An object of class "arma"
, which is a list with the following
elements:
impuls |
impulse response function. |
acov |
autocovariance function. |
parcor |
partial autocorrelation function. |
spec |
power spectrum. |
croot.ar |
characteristic roots of AR operator. See Details. |
croot.ma |
characteristic roots of MA operator. See Details. |
Kitagawa, G. (2010) Introduction to Time Series Modeling. Chapman & Hall/CRC.
# AR model : y(n) = a(1)*y(n-1) + a(2)*y(n-2) + v(n) a <- c(0.9 * sqrt(3), -0.81) armaimp(arcoef = a, v = 1.0, n = 1000, lag = 20) # MA model : y(n) = v(n) - b(1)*v(n-1) - b(2)*v(n-2) b <- c(0.9 * sqrt(2), -0.81) armaimp(macoef = b, v = 1.0, n = 1000, lag = 20) # ARMA model : y(n) = a(1)*y(n-1) + a(2)*y(n-2) # + v(n) - b(1)*v(n-1) - b(2)*v(n-2) armaimp(arcoef = a, macoef = b, v = 1.0, n = 1000, lag = 20)