armachar | R Documentation |
Calculate impulse response function, autocovariance function, autocorrelation function and characteristic roots of given scalar ARMA model.
armachar(arcoef = NULL, macoef = NULL, v, lag = 50, nf = 200, plot = TRUE, ...)
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 |
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
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. |
Kitagawa, G. (2020) Introduction to Time Series Modeling with Applications in R. 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)
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.