armachar {TSSS} | R Documentation |
Calculate Characteristics of Scalar ARMA Model
Description
Calculate impulse response function, autocovariance function, autocorrelation function and characteristic roots of given scalar ARMA model.
Usage
armachar(arcoef = NULL, macoef = NULL, v, lag = 50, nf = 200, plot = TRUE, ...)
Arguments
arcoef |
AR coefficients. |
macoef |
MA coefficients. |
v |
innovation variance. |
lag |
maximum lag of autocovariance function. |
nf |
number of frequencies in evaluating spectrum. |
plot |
logical. If |
... |
graphical arguments passed to the |
Details
The ARMA model is given by
y_t - a_1y_{t-1} - \dots - a_py_{t-p} = u_t - b_1u_{t-1} - \dots - b_qu_{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:
\arctan(I/R)
degree
Value
An object of class "arma"
which has a plot
method. This is a
list with components:
impuls |
impulse response function. |
acov |
autocovariance function. |
parcor |
PARCOR. |
spec |
power spectrum. |
croot.ar |
characteristic roots of AR operator. See Details. |
croot.ma |
characteristic roots of MA operator. See Details. |
References
Kitagawa, G. (2020) Introduction to Time Series Modeling with Applications in R. Chapman & Hall/CRC.
Examples
# AR model : y(n) = a(1)*y(n-1) + a(2)*y(n-2) + v(n)
a <- c(0.9 * sqrt(3), -0.81)
armachar(arcoef = a, v = 1.0, 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)
armachar(macoef = b, v = 1.0, 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)
armachar(arcoef = a, macoef = b, v = 1.0, lag = 20)