IRIS Toolbox Reference Manual

acf

Autocovariance and autocorrelation functions for model variables

Syntax

[C,R,List] = acf(M,...)

Input arguments

Output arguments

Options

Description

C and R are both N-by-N-by-(P+1)-by-NAlt matrices, where N is the number of measurement and transition variables (including auxiliary lags and leads in the state space vector), P is the order up to which the ACF is computed (controlled by the option 'order='), and NAlt is the number of alternative parameterisations in the input model object, M.

If 'contributions=' true, the size of the two matrices is N-by-N-by-(P+1)-by-E-by-NAlt, where E is the number of all shocks (measurement and transition combined) in the model.

ACF with linear filters

You can use the option 'filter=' to get the ACF for variables as though they were filtered through a linear filter. You can specify the filter in both the time domain (such as first-difference filter, or Hodrick-Prescott) and the frequncy domain (such as a band of certain frequncies or periodicities). The filter is a text string in which you can use the following references:

Example

A first-difference filter (i.e. computes the ACF for the first differences of the respective variables):

[C,R] = acf(m,'filter=','1-L')

Example

The cyclical component of the Hodrick-Prescott filter with the smoothing parameter, $lambda$, 1,600. The formula for the filter follows from the classical Wiener-Kolmogorov signal extraction theory,

$$w(L) = \frac{\lambda}{\lambda + \frac{1}{ | (1-L)(1-L) | ^2}}$$

[C,R] = acf(m,'filter','1600/(1600 + 1/abs((1-L)^2)^2)')

Example

A band-pass filter with user-specified lower and upper bands. The band-pass filters can be defined either in frequencies or periodicities; the latter is usually more convenient. The following is a filter which retains periodicities between 4 and 40 periods (this would be between 1 and 10 years in a quarterly model),

[C,R] = acf(m,'filter','per >= 4 & per <= 40')