wavBootstrap {wmtsa} | R Documentation |
Given a set of indices which represent the whitest transform available in a DWPT, this function randomizes the coefficients in each of the crystals comprising the transform (via random selection with replacement) followed by an inverse transform. The z is a bootstrapped version of the original time series.
wavBootstrap(x, white.indices=wavDWPTWhitest(x), n.realization=1, wavelet="s8", n.level=NULL)
x |
a vector containing a uniformly-sampled real-valued time series or an
object of class wavTransform as output by the wavDWPT function. |
n.level |
the number of decomposition levels. This argument is used only if
x is a time series. Default: floor(logb(length(x), base=2)) - 2 . |
n.realization |
the number of realizations to generate. Default: 1 . |
wavelet |
a character string denoting the filter type.
See wavDaubechies for details. This argument is used only if
x is a time series. Default: "s8" . |
white.indices |
a list containing the level and osc vectors denoting
the level and oscillation index, respectively, of the whitest transform. Default: wavDWPTWhitest(x) . |
a list of numeric vectors containing the bootstrapped series. If n.realization=1
,
the the output is a numeric vector (not packed into a list
).
D. B. Percival, S. Sardy and A. C. Davison, Wavestrapping Time Series: Adaptive Wavelet-Based Bootstrapping, in W. J. Fitzgerald, R. L. Smith, A. T. Walden and P. C. Young (Eds.), Nonlinear and Nonstationary Signal Processing, Cambridge, England: Cambridge University Press, 2001.
## wavestrap the sunspots series x <- as.numeric(sunspots) z <- wavBootstrap(x, n.realization=1) stackPlot(x=seq(along=sunspots), y=data.frame(x, z, abs(z)), ylab=list(text=c("sunspots","wavestrap","|wavestrap|"))) title("Wavelet-based bootstrapping of sunspots series", cex=0.7)