Skip to contents

Mirrors the seven Numerics link functions and the five RMC.BestFit-specific ones (the BestFit factory's own YeoJohnson case routes to the Numerics class – see best_fit_link_function_factory.hpp – so there is one "YeoJohnson", not two). Six of the twelve take construction parameters, passed through ... by name. type is matched case-insensitively (as trend() already does) and normalized to its canonical spelling before being sent to the C++ layer.

Usage

link_function(type, ..., inner = NULL)

Arguments

type

one of link_names(), matched case-insensitively.

...

named construction parameters for the parameterized links: lambda for "YeoJohnson"; gamma0, scale, epsilon, delta for "ASinH"; a for "SES"; sigma0, a, lambda for "LogSES"; sigma0, log_scale, epsilon, delta for "LogASinH"; mu0, scale for "Centered". R spells the Yeo-Johnson/LogSES exponent lambda; Python spells it lambda_, because lambda is a reserved word there (see corehydropy.toolbox.Link).

inner

a corehydro_link wrapped by "Centered", ignored for every other type.

Value

a corehydro_link spec list.

Examples

l <- link_function("Log")
link(l, c(1, 10, 100))
#> [1] 0.000000 2.302585 4.605170
link_inverse(l, c(0, 1, 2))
#> [1] 1.000000 2.718282 7.389056