prewhiten | R Documentation |
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.
prewhiten(y.tsd, x.tsd, x.model, x.coefficients, y.model, y.coefficients)
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). |
The numerical values of the cross correlation are invisibly returned.
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.