hanaml.DWT is an R wrapper for PAL discrete wavelet transform.

hanaml.DWT(
  data = NULL,
  key = NULL,
  endog = NULL,
  filter = NULL,
  n.levels = NULL,
  boundary = NULL,
  compression = NULL,
  method = NULL,
  threshold = NULL,
  level.thresholds = NULL
)

Arguments

data

DataFrame
DataFrame containing the time-series data to apply discrete wavelet transform.

key

character
Name of the time-stamp column in data.

endog

character, optional
The endogenous variable, i.e. time series.
Defaults to the first non-ID column.

filter

character
Specifies the wavelet filter used for discrete wavelet transform.
Valid options include:

  • Daubechies family: "db1" ~ "db20".

  • Biorthognal family: "bior1.1", "bior1.3", "bior1.5", "bior2.2", "bior2.4", "bior2.6", "bior2.8", "bior3.1", "bior3.3", "bior3.5", "bior3.7", "bior3.9", "bior4.4", "bior5.5", "bior6.8".

  • Reverse Biorthogal family: "rbio1.1", "rbio1.3", "rbio1.5", "rbio2.2", "rbio2.4", "rbio2.6", "rbio2.8", "rbio3.1", "rbio3.3", "rbio3.5", "rbio3.7", "rbio3.9", "rbio4.4", "rbio5.5", "rbio6.8"

  • Coifman family: "coif1" ~ "coif5".

  • Symmetric family: "sym2" ~ "sym20".

n.levels

numeric/integer, optional
Specifies the decompose level for discrete wavelet transform.
Defaults to 1.

boundary

character, optional
Specifies the padding method for boundary values. Valid options include:

  • "zero": Zero padding

  • "symmetric": Symmetric padding

  • "periodic": Periodic padding

  • "reflect": Reflect padding

  • "smooth": Smooth padding

  • "constant": Constant padding

Defaults to "zero".

compression

character, optional
Specifies whether or not to discard zero values in wavelet coefficients.
Defaults to FALSE.

method

character, optional
Specifies the thresholding method applied to wavelet coefficients.

  • "no": No thresholding

  • "soft": Soft-thresholding

  • "hard": Hard-thresholding

Defaults to "no".

threshold

numeric, optional
Specifies the threshold value for soft/hard-thresholding.
Valid only when method is "soft" or "hard".
Defaults to 1e-9.

level.thresholds

list of vectors, optional
Specifies level specific thresholding values in a list, with each element being a numeric vector of length 2: first number being level, second number being threshold value.
For example: list(c(1, 1e-3), c(2, 1e-4)) means using threshold le-3 for level 1 wavelet coefficients and using threshold 1e-4 for level 2 wavelet coefficients.
If both threshold and level.thresholds are specified, level.thresholds takes precedence.

Value

Returns a "DWT" object with the following attributes:

  • coeff: DataFrame
    Wavelet coefficients of the time-series data up to the specified decomposition level using the specified wavelet filter.

Details

Applying discrete wavelet transform to 1D time-series, using different wavelet filters, up to different decomposition levels and on various boundary extension modes.