Learn R Programming

perARMA (version 1.4)

parmaf: PARMA coefficients estimation

Description

Procedure parmaf enables the estimation of parameters of the chosen representation of PARMA(p,q) model. For general PARMA we use non-linear optimization methods to obtain minimum of negative logarithm of likelihood function using loglikef procedure. Intitial values of parameters are computed using Yule-Walker equations.

Usage

parmaf(x, T, p, q, af, bf, ...)

Arguments

x
input time series.
T
period length of PC-T structure.
p
maximum PAR order, which is a number of columns in af.
q
maximum PMA order, which is a number of columns in bf diminished by 1.
af
$T \times p$ logical values matrix pointing to active frequency components for phi.
bf
$T \times (q+1)$ logical matrix pointing to active frequency components for theta.
...
Other arguments: a0 starting value for a, where a is Fourier representation of phi (use phi=ab2phth(a) to recover phi); if a0 is not defined Yule Walker method

Value

  • list of values:
  • ais matrix of Fourier coefficients determining phi.
  • bis matrix of Fourier corfficients determining theta.
  • negloglikminimum value of negative logarithm of likehood function.
  • aicvalvalue of AIC criterion.
  • fpevalvalue of FPE criterion.
  • bicvalvalue of BIC criterion.
  • residsseries of residuals.

Details

In order to obtain maximum likelihood estimates of model parameters a and b we use a numerical optimization method to minimalize value of y (as negative value of logarithm of loglikelihood function returned by loglikef) over parameter values. Internally, parameters a and b are converted to phi and theta as needed via function ab2phth. For the present we use optim function with defined method="BFGS" (see code for more details).

References

Box, G. E. P., Jenkins, G. M., Reinsel, G. (1994), Time Series Analysis, 3rd Ed., Prentice-Hall, Englewood Cliffs, NJ. Brockwell, P. J., Davis, R. A., (1991), Time Series: Theory and Methods, 2nd Ed., Springer: New York. Jones, R., Brelsford, W., (1967), Time series with periodic structure, Biometrika 54, 403-408. Vecchia, A., (1985), Maximum Likelihood Estimation for Periodic Autoregressive Moving Average Models, Technometrics, v. 27, pp.375-384.

See Also

loglikef, perYW, R_w_ma,

Examples

Run this code
######## simulation of periodic series
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                
                                                 
a[1,2]=-.9               
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)        
makeparma_out<-makeparma(nlen,phi0,theta0,del0)                      
y=makeparma_out$y

## Do not run 
## It could take more than one minute

############ fitting of PARMA(0,1) model
#p=0
#q=1
#af=matrix(0,T,p)
#bf=matrix(0,T,q+1)
#bf[1,1]=1
#bf[1:3,2]=1

#parmaf(y,T,p,q,af,bf)

############ fitting of PARMA(2,0) model
#p=2
#q=0
#af=matrix(0,T,p)
#bf=matrix(0,T,q+1)
#af[1:3,1]=1       
#af[1:3,2]=1
#bf[1,1]=1

#parmaf(y,T,p,q,af,bf)

############ fitting of PARMA(2,1) model
#p=2
#q=1
#af=matrix(0,T,p)
#bf=matrix(0,T,q+1)
#af[1:3,1]=1       
#af[1:3,2]=1
#bf[1,1]=1
#bf[1:3,2]=1

#parmaf(y,T,p,q,af,bf)

Run the code above in your browser using DataLab