get_trun | R Documentation |
h
for h
that is truncated (bounded but not naturally bounded).The truncation point for h
for h
that is truncated (bounded but not naturally bounded).
get_trun(mode, param1, param2)
mode |
A string, the class of the |
param1 |
A number, the first parameter to the |
param2 |
A number, the second parameter (may be optional depending on |
Returns the truncation point (the point x0
such that h
becomes constant and hp
becomes 0 for x >= x0
) for some selected modes.
param1 <- 1.3; param2 <- 2.3
for (mode in c("mcp", "scad", "min_asinh", "min_cosh", "min_exp", "min_log_pow",
"min_pow", "min_sinh", "min_softplus", "truncated_tan")) {
# Valgrind complains about "truncated_sin" for unknown reason; omitted
print(mode)
trun <- get_trun(mode, param1, param2)
x <- trun + -3:3 / 1e5
hx_hpx <- get_h_hp(mode, param1, param2)(x)
print(round(x, 6))
print(paste("hx:", paste(hx_hpx$hx, collapse=" ")))
print(paste("hpx:", paste(hx_hpx$hpx, collapse=" ")))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.