armaimp {timsac} | R Documentation |
Caluculate impulse, autocovariance, partial autocorrelation function and characteristic roots of scalar ARMA model for given AR and MA coefficients.
armaimp( arcoef, macoef, v, n=1000, lag=NULL, nf=200, plot=TRUE )
arcoef |
AR coefficients. |
macoef |
MA coefficients. |
v |
innivation 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 TRUE (default) impulse response function, autocovariance, power spectrum and characteristic roos are plotted. |
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.
impuls |
impulse response function. |
acov |
autocovariance function. |
parcor |
partial autocorrelation function. |
spec |
power spectrum. |
croot.ar |
characteristic roots of AR operator. Chracteristic root is a list with components named real(real part R), image(imaginary part I), amp(=sqrt(R**2+I**2)), atan(=ARCTAN(I/R)) and degree. |
croot.ma |
characteristic roots of MA operator. |
G.Kitagawa (1993) Time series analysis programing (in Japanese). The Iwanami Computer Science Senes.
# ARMA model : y(n) = 0.9sqrt(3)y(n-1) - 0.81y(n-2) + v(n) -0.9sqrt(2)v(n-1) + 0.81v(n-2) a <- c(0.9*sqrt(3), -0.81) b <- c(0.9*sqrt(2), -0.81) z <- armaimp( arcoef=a, macoef=b, v=1.0, n=1000, lag=20 ) z$croot.ar z$croot.ma # AR model : y(n) = 0.9sqrt(3)y(n-1) - 0.81y(n-2) + v(n) z <- armaimp( arcoef=a, v=1.0, n=1000, lag=20 ) z$croot.ar # MA model : y(n) = v(n) -0.9sqrt(2)v(n-1) + 0.81v(n-2) z <- armaimp( macoef=b, v=1.0, n=1000, lag=20 ) z$croot.ma