Displaying 2 results from an estimated 2 matches for "archeck".
Did you mean:
rcheck
2009 Mar 06
0
modifying a built in function from the stats package (fixing arima) (CONCLUSIONS)
...<- p
trarma <- .Call(R_ARIMA_transPars, par, arma, FALSE)
if (ncxreg > 0)
x <- x - xreg %*% par[narma + (1:ncxreg)]
res <- .Call(R_ARIMA_CSS, x, arma, trarma[[1]], trarma[[2]],
as.integer(ncond), FALSE)
0.5 * log(res)
}
arCheck <- function(ar) {
p <- max(which(c(1, -ar) != 0)) - 1
if (!p)
return(TRUE)
all(Mod(polyroot(c(1, -ar[1:p]))) > 1)
}
maInvert <- function(ma) {
q <- length(ma)
q0 <- max(which(c(1, ma) != 0)) - 1
if (!q0)...
2007 Apr 10
1
Testing invertibility of an AR model
I've looked around but I can't find the method in R for testing whether
the resulting estimated coefficients
of an AR model imply that the model is invertible.
To quote from eric zivot's blue book :
" the AR(p) is invertible provided the rots of the characteristic
equation
Phi(z) = 1 - phi_1*z - phi_2*z^2 = phi_3*z^3 - ..... Phi_p*z^p = 0 lie
outside
the complex circle".