at.wd: a trous (AT) based additive decompostion using Daubechies...

Description Usage Arguments Value References Examples

View source: R/atrous_vt.R

Description

a trous (AT) based additive decompostion using Daubechies family wavelet

Usage

1
at.wd(xx, v, nthresh, boundary, ...)

Arguments

xx

The input time series with dyadic number size.

v

The number of vanishing moments for a given wavelet (e.g., haar(v=1) and d4 (v=2)).

Value

A matrix of decomposed sub-time series.

References

Nason, G. P. (1996). Wavelet shrinkage using cross‐validation. Journal of the Royal Statistical Society: Series B (Methodological), 58(2), 463-479.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data(obs.mon)

n <- nrow(obs.mon);v=2
J <- ceiling(log(n/(2*v-1))/log(2)) #(Kaiser, 1994)

names <- colnames(obs.mon)
at.atm <- vector("list", ncol(obs.mon))
for(i in 1:ncol(obs.mon)){
  tmp <- padding(scale(obs.mon[,i],scale=F), pad="zero")
  at.atm <- at.wd(tmp, v=2, nthresh = J, boundary = "periodic")
  
  plot.ts(cbind(obs.mon[1:n,i],at.atm[1:n,1:9]), main=names[i])
  print(sum(abs(scale(obs.mon[1:n,i],scale=F)-rowSums(at.atm[1:n,]))))
  
}

zejiang-unsw/WASP_1.0.0 documentation built on May 6, 2020, 7:49 p.m.