Displaying 1 result from an estimated 1 matches for "q0bis".
2011 Jul 20
0
The C function getQ0 returns a non-positive covariance matrix and causes errors in arima()
...irst one is to compute first the covariance
matrix of (X_{t-1},...,X_{t-p},Z_t,...,Z_{t-q}) and this is achieved
through the method of difference equations (page 93 of Brockwell and
Davis). This way was apparently suggested by a referee to Gardner et
al. paper (see page 314 of their paper).
Q0bis <- function(phi,theta){
## Computes the initial covariance matrix for the state space
representation of Gardner et al.
p <- length(phi)
q <- length(theta)
r <- max(p,q+1)
ttheta <- c(1,theta,rep(0,max(p,q+1)-q-1))
A1 <- matrix(0,r,p)
B <- (col(A1)+row(A1)...