map_wav_args: Map Wavelet Arguments

View source: R/map.R

map_wav_argsR Documentation

Map Wavelet Arguments

Description

Get a tibble combining all arguments to be used in wavelet-based signal estimation. This tibble is the input of the function map_wav_signal. Then, this function is a preparation for using one of the two main functions of the package: map_wav_signal.

Usage

map_wav_args(list)

Arguments

list

A named list with arguments for wavelet-based signal estimantion. Each desired parameter to be combined with others must be allocated in a vector with two exception: type and levels used in wavethresh package should entry in a list, as showed in the example bellow. Default spectifications of the the original functions (see details section on help for signal) are used for parameters note included in the list.

Value

A tibble

See Also

map_wav_signal, signal

Examples

# Some arguments used in wmtsa::wavShrink

wshr_wmtsa <- list(
wavelet = c("haar", "d4", "d6", "s8"),
n.level = 1:3,
shrink.fun = c("hard", "soft", "mid"),
thresh.fun = c("universal", "minimax", "adaptive"),
xform = c("dwt", "modwt"),
reflect = TRUE
)

map_wav_args(wshr_wmtsa)

# Some arguments used in waveslim::dwt (or modwt) and
# EbayesThresh::ebayesthresh.wavelet

ebthr_wt <- list(
wf = c("haar", "d4", "d6", "fk6", "d8", "fk8", "la8"),
n.levels = 4:6,
boundary = c("periodic", "reflection"),
wt = c("dwt", "modwt")
)

ebthr_ebwav <- list(
vscale = c("level", "independet"),
prior = c("laplace", "cauchy"),
a = seq(0.1 , 4, by = 0.4),
threshrule = c("median", "mean", "soft", "hard")
)

map_wav_args(c(ebthr_wt, ebthr_ebwav))

# Some arguments of wavethresh::wd and wavethresh::threshold. Note
# the special way of writing arguments for type and levels.

wthr_list <- list(
filter.number = 1:4,
family = c("DaubLeAsymm", "DaubExPhase"),
bc = c("periodic", "symmetric"),
#   type for wd and threshold
type = list(c("wavelet", "soft"), c("wavelet", "hard"),
            c("station", "soft"), c("station", "hard")),
# threshold list
policy = c(
  "universal",
  "sure",
  "cv",
  "BayesThresh"
),
levels = list(3:8, 4:8, 5:8),
alpha = seq(0, 2, by = 0.5),
beta = seq(0, 3, by = 0.2),
by.level = TRUE,
boundary = c(TRUE, FALSE)
)

map_wav_args(wthr_list)


nelson16silva/wavsigmap documentation built on March 7, 2023, 10:45 a.m.