Skip to content

Commit

Permalink
pseudo_log added #847
Browse files Browse the repository at this point in the history
  • Loading branch information
mtennekes committed Mar 19, 2024
1 parent f26fdc7 commit 83e405f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions R/misc_trans_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ trans_log1p = list(
domain = c(0, Inf)
)

pseudo_log_sigma = 1
pseudo_log_base = exp(1)

trans_pseudo_log = list(
fun = function(x) asinh(x/(2 * pseudo_log_sigma))/log(pseudo_log_base),
rev = function(x) 2 * pseudo_log_sigma * sinh(x * log(pseudo_log_base)),
#d_transform = function(x) 1/(sqrt(4 + x^2/pseudo_log_sigma^2) * pseudo_log_sigma * log(pseudo_log_base))
#d_inverse = function(x) 2 * pseudo_log_sigma * cosh(x * log(pseudo_log_base)) * log(pseudo_log_base))
domain = c(-Inf, Inf)
)

trans_identity = list(
fun = function(x) x,
rev = function(x) x,
Expand Down

0 comments on commit 83e405f

Please sign in to comment.