pwgarch: Prewhitening with GARCH model

Description Usage Arguments Value Examples

Description

This is an experimental alternative prewhitening scheme for data with heavy heteroscedasticity. As a first step, an ARMA model is fitted to the each series, with the optimal order of MA and AR determined automatically. This model is then used to prewhiten the series. If there is no significant heteroscedasticity in the residuals, the series is returned. Otherwise, a new ARMA model is fitted to the series after applying power transformation. Again, if the residuals do not show significant heteroscedasticity, the series is returned. Otherwise, a ARMA(ar, ma) + GARCH(alpha, beta) model is fit to the series, where ar and ma are taken from the initial ARMA model, and alpha and beta are variied according to user input. The best model is selected according to AIC and the residuals are returned as prewhitended series.

Usage

1
pwgarch(x, alpha = 1, beta = 1:3, lm = FALSE, verbose = TRUE)

Arguments

x

a data.frame of tree-ring indices, dplR-style

alpha

alpha parameter for arma(ar, ma) + garch(alpha, beta) model, can be given as integer skalar or integer vector

beta

beta parameter for arma(ar, ma) + garch(alpha, beta) model, can be given as integer skalar or integer vector

lm

should the Lagrange-Modifier test be used to check for heteroscedasticity?

verbose

do you want to be informed what's going on?

Value

a dplR-style data.frame of prewhitened tree-ring series; in addition to a regular dplR data.frame, the return value has the attribute "treatments", which can easily be viewed using the function treatments on the object.

Examples

1
2
3
4
library(dplR)
data("cana533")
cana_detr <- detrend(cana533, method = "Spline", nyrs = 32)
cana_pwg <- pwgarch(cana_detr)

cszang/pwgarch documentation built on May 26, 2019, 6:47 p.m.