get_safe_log_h_hp: Asymptotic log of 'h' and 'hp' functions for large 'x' for...

Description Usage Arguments Value Examples

View source: R/genscore.R

Description

Asymptotic log of h and hp functions for large x for modes with an unbounded h.

Usage

1

Arguments

mode

A string, the class of the h function. Must be one of "asinh", "cosh", "exp", "identity", "log_pow", "pow", "sinh", "softplus", and "tanh".

para

A number, the first parameter to the h function.

Value

A list of two vectorized functions, logh and loghp.

Examples

1
2
3
4
5
6
7
8
para <- 2.3
x <- seq(from=0.1, to=150, by=0.1)
for (mode in c("asinh", "cosh", "exp", "identity", "log_pow", "pow", "sinh", "softplus", "tanh")) {
  print(mode)
  hx_hpx <- get_h_hp(mode, para)(x)
  print(c(max(abs(get_safe_log_h_hp(mode, para)$logh(x) - log(hx_hpx$hx))), 
          max(abs(get_safe_log_h_hp(mode, para)$loghp(x) - log(hx_hpx$hpx)))))
}

genscore documentation built on April 28, 2020, 1:06 a.m.