R/ebayesthresh.wavelet.R

ebayesthresh.wavelet <-
  function (xtr, vscale = "independent", smooth.levels = Inf,
            prior = "laplace", a = 0.5, bayesfac = FALSE,
            threshrule = "median") {
    xcl <- class(xtr)
	if (class(xcl) == "dwt " && length(xcl) > 1) {
            xtr <- ebayesthresh.wavelet.splus(xtr, vscale, smooth.levels,
                                              prior, a, bayesfac, threshrule)
            return(xtr)
        }
	if (xcl == "wd") {
            xtr <- ebayesthresh.wavelet.wd(xtr, vscale, smooth.levels, prior,
                                           a, bayesfac, threshrule)
            return(xtr)
        }
        if (xcl == "dwt" || xcl=="modwt") {
            xtr <- ebayesthresh.wavelet.dwt(xtr, vscale, smooth.levels,
                                            prior, a, bayesfac, threshrule)
            return(xtr)
        }
    stop("Unknown wavelet transform type; no smoothing performed")
    return(xtr)
}

Try the EbayesThresh package in your browser

Any scripts or data that you put into this service are public.

EbayesThresh documentation built on May 2, 2019, 8:36 a.m.