Home > freetb4matlab > tsa > acorf.m

acorf

PURPOSE ^

Calculates autocorrelations for multiple data series.

SYNOPSIS ^

function [AUTOCOV,stderr,lpq,qpval] = acorf(Z,N);

DESCRIPTION ^

  Calculates autocorrelations for multiple data series.
  Missing values in Z (NaN) are considered. 
  Also calculates Ljung-Box Q stats and p-values.

    [AutoCorr,stderr,lpq,qpval] = acorf(Z,N);
  If mean should be removed use
    [AutoCorr,stderr,lpq,qpval] = acorf(detrend(Z',0)',N);
  If trend should be removed use
    [AutoCorr,stderr,lpq,qpval] = acorf(detrend(Z')',N);

 INPUT
  Z    is data series for which autocorrelations are required
       each in a row
  N    maximum lag

 OUTPUT
  AutoCorr nr x N matrix of autocorrelations
  stderr   nr x N matrix of (approx) std errors
  lpq      nr x M matrix of Ljung-Box Q stats
  qpval    nr x N matrix of p-values on Q stats
   
 All input and output parameters are organized in rows, one row 
 corresponds to one series

 REFERENCES:
  S. Haykin 'Adaptive Filter Theory' 3ed. Prentice Hall, 1996.
  M.B. Priestley 'Spectral Analysis and Time Series' Academic Press, 1981. 
  W.S. Wei 'Time Series Analysis' Addison Wesley, 1990.
  J.S. Bendat and A.G.Persol 'Random Data: Analysis and Measurement procedures', Wiley, 1986.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003