Skip to contents

If a transformed normal likelihood is passed, the respective built-in link will be returned instead of the identity link that would commonly be used with transformed normal likelihood families.

Usage

link_lookup(link, family = NULL, inv = FALSE)

Arguments

String identifier for the link function of interest.

family

If a transformed normal family is passed, returns the respective link instead of link

inv

True to return the response function instead of the link function.

Value

The respective link function.

Examples


link_lookup("log", "gaussian", FALSE)
#> function (x, base = exp(1))  .Primitive("log")

link_lookup("identiy", "logitnormal", FALSE)
#> function (x) 
#> {
#>     if (any(x < 0 | x > 1)) {
#>         stop("The logit link is only defined between 0 and 1!")
#>     }
#>     return(qlogis(x))
#> }
#> <bytecode: 0x562df7829d90>
#> <environment: namespace:bayesfam>