R_w_ma {perARMA}R Documentation

Covariance matrix for PARMA model (conditional)

Description

Procedure R_w_ma computes the covariance matrix of the moving average part of a PARMA sequence. This is used in maximum likelihood estimation in conjunction with the Ansley transformation method of computing the likelihood of the sample conditioned on the firt m = max(p; q) samples being ignored (or set to null); see Ansley or Brockwell and Davis for background on the procedure. The method avoids the cumbersome calculation of full covariance matrix.

Usage

R_w_ma(theta, nstart, nlen)

Arguments

theta

matrix of size T \times (q+1) contains vectorial parameters [\theta_0,\theta_1,...,\theta_q], where \theta(0,t)=\sigma(t)=del(t), thus theta = [del,theta_1,...,theta_q].

nstart

starting time, for conditional likelihood in PARMA set to p+1.

nlen

size of the covariance matrix.

Details

Procedure R_w_ma implements calculation of covariance matrix of size nlen-p from the parameters theta and phi of PARMA sequence. The result is returned as two vectors, first containing non-zero elements of covariance matrix and the second containing indexes of this parameters. Using these vectors covariance matrix can be easily reconstructed.

Value

procedure returns covariance matrix in sparse format as following:

R

vector of non-zero elements of covariance matrix.

rindex

vector of indexes of non-zero elements.

Author(s)

Harry Hurd

References

Ansley, (1979), An algorithm for the exact likelihood of a mixed autregressive moving average process, Biometrika, v.66, pp.59-65.

Brockwell, P. J., Davis, R. A. (1991), Time Series: Theory and Methods, 2nd Ed., Springer: New York.

See Also

loglikec, loglikef

Examples

T=12
nlen=480
p=2
 a=matrix(0,T,p)
q=1
 b=matrix(0,T,q)
a[1,1]=.8                  
a[2,1]=.3                 
                          
phia<-ab2phth(a) 
phi0=phia$phi          
phi0=as.matrix(phi0)        
      
b[1,1]=-.7	          
b[2,1]=-.6                  
thetab<-ab2phth(b)         
theta0=thetab$phi  
theta0=as.matrix(theta0) 
del0=matrix(1,T,1)    


R_w_ma(cbind(del0,theta0),p+1,T)    


[Package perARMA version 1.7 Index]