prewhiten: Prewhitening

prewhitenR Documentation

Prewhitening

Description

Performs a prewhitening operation to allow one to identify the dynamic relationship betweenan input time series (x) and an output time series (y). By default both the x and the y time series are filtered with the same model to compute residuals and then the cross correlation function between those 'residuals' is plotted, to identify the lags at which y sepends on x in the dynamic regression model.

Usage

prewhiten(y.tsd, x.tsd, x.model, x.coefficients, y.model, y.coefficients)

Arguments

y.tsd

The output (y) time series.

x.tsd

The input (x) time series.

x.model

The assumed model for x.

x.coefficients

The model coefficients for x.

y.model

(optional) The assumed model for y (default is the x model).

y.coefficients

(optional) The model coefficients for y (default is the x model coefficcients).

Value

The numerical values of the cross correlation are invisibly returned.

Examples

iden(gasrx.tsd)
gasrx.ar4.out <- esti(gasrx.tsd, model=model.pdq(p=4))
prewhiten(gasry.tsd, gasrx.tsd, x.model=model.pdq(p=4),
      x.coefficients=coef(gasrx.ar4.out))


wqmeeker/RTseries documentation built on Dec. 31, 2022, 10 a.m.