xsarma {timsac} | R Documentation |
Exact Maximum Likelihood Method of Scalar ARMA Model Fitting
Description
Produce exact maximum likelihood estimates of the parameters of a scalar ARMA model.
Usage
xsarma(y, arcoefi, macoefi)
Arguments
y |
a univariate time series. |
arcoefi |
initial estimates of AR coefficients. |
macoefi |
initial estimates of MA coefficients. |
Details
The ARMA model is given by
y(t) - a(1)y(t-1) - \ldots - 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.
Value
gradi |
initial gradient. |
lkhoodi |
initial (-2)log likelihood. |
arcoef |
final estimates of AR coefficients. |
macoef |
final estimates of MA coefficients. |
grad |
final gradient. |
alph.ar |
final ALPH (AR part) at subroutine ARCHCK. |
alph.ma |
final ALPH (MA part) at subroutine ARCHCK. |
lkhood |
final (-2)log likelihood. |
wnoise.var |
white noise variance. |
References
H.Akaike (1978) Covariance matrix computation of the state variable of a stationary Gaussian process. Research Memo. No.139. The Institute of Statistical Mathematics.
H.Akaike, G.Kitagawa, E.Arahata and F.Tada (1979) Computer Science Monograph, No.11, Timsac78. The Institute of Statistical Mathematics.
Examples
# "arima.sim" is a function in "stats".
# Note that the sign of MA coefficient is opposite from that in "timsac".
arcoef <- c(1.45, -0.9)
macoef <- c(-0.5)
y <- arima.sim(list(order=c(2,0,1), ar=arcoef, ma=macoef), n = 100)
arcoefi <- c(1.5, -0.8)
macoefi <- c(0.0)
z <- xsarma(y, arcoefi, macoefi)
z$arcoef
z$macoef