Description Usage Arguments Value References Examples
a trous (AT) based additive decompostion using Daubechies family wavelet
1 |
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)). |
A matrix of decomposed sub-time series.
Nason, G. P. (1996). Wavelet shrinkage using crossâvalidation. Journal of the Royal Statistical Society: Series B (Methodological), 58(2), 463-479.
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,]))))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.