search for: q0ter

Displaying 1 result from an estimated 1 matches for "q0ter".

Did you mean: after
2011 Jul 20
0
The C function getQ0 returns a non-positive covariance matrix and causes errors in arima()
...ix(0, p, q+1) F <- col(SXZ)-row(SXZ) E <- F>=1 SXZ[E] <- rXZ[F[E]] S <- rbind(cbind(SX,SXZ),cbind(t(SXZ),diag(q+1))) } Q0 <- A%*%S%*%t(A) } The second way is to resolve brutally the equation of Gardner et al. in the form (12), page 314 of their paper. Q0ter <- function(phi,theta){ p <- length(phi) q <- length(theta) r <- max(p,q+1) T <- matrix(0,r,r) if (p) T[1:p,1] <- phi if (r) T[1:(r-1),2:r] <- diag(r-1) V <- matrix(0,r,r) ttheta <- c(1,theta) V[1:(q+1),1:(q+1)] <- ttheta%x%t(ttheta) V &lt...