Learn R Programming

dse (version 2003.6-1)

acfM: Calculate Auto-Covariance

Description

Calculate a matrix with partitions [M0|...|Mi|...|Ml] giving the auto-covariance.

Usage

acfM(obj, ...)
    ## S3 method for class 'TSdata':
acfM(obj, lag=round(6*log(periods(obj))), 
        type ="covariance", sub.mean=TRUE, ...)
    ## S3 method for class 'TSmodel':
acfM(obj, lag=NULL, type ="covariance", Psi=NULL, ...)
    ## S3 method for class 'TSestModel':
acfM(obj, ...)

Arguments

obj
An object of class TSdata or TSmodel.
lag
Number of lags for which to calculate the autocorrelations.
type
With the defaults the blocks are auto-covariances. If type == 'correlation' the result is scaled to give autocorrelations.
sub.mean
Only valid if object is of class TSdata. If FALSE then means are not subtracted.
Psi
A matrix of innovation covariance. Only valid if object is of class TSmodel.
...
arguments passed to other methods.

Value

  • A matrix with partitions [M0|...|Mi|...|Ml] giving the covariance or correlation, including the that between the output and input series (as in the first block row of a Hankel matrix).

Examples

Run this code
if(is.R()) data("eg1.DSE.data.diff", package="dse1")
    z <- acfM(eg1.DSE.data.diff)
    model <- TSmodel(toSS(estVARXls(eg1.DSE.data.diff)))
    #  z <- acfM(model) not working

Run the code above in your browser using DataLab