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=" ")))
}
Run the code above in your browser using DataLab