link.btsr {BTSR}R Documentation

Create a Link for BTSR models

Description

Given the name of a link, this function returns a link function, an inverse link function, the derivative d\eta / d\mu and the derivative d\mu / d\eta.

Usage

link.btsr(link)

Arguments

link

character; one of "linear", "logit", "log", "loglog", "cloglog". See ‘Details’.

Details

The available links are:

linear: f(x) = ax, for a real. The parameter is set using the argument ctt.ll, when invoking the functions created by link.btsr

logit: f(x) = log(x/(1-x))

log: f(x) = log(x)

loglog: f(x) = log(-log(x))

cloglog: f(x) = log(-log(1-x))

Value

An object of class "link-btsr", a list with components

linkfun

Link function function(mu)

linkinv

Inverse link function function(eta)

linkdif

Derivative function(mu) d\eta / d\mu

mu.eta

Derivative function(eta) d\mu / d\eta

name

a name to be used for the link

Examples

mylink <- BTSR::link.btsr("linear")
y = 0.8
a = 3.4
gy = a*y

mylink$linkfun(mu = y, ctt.ll = a); gy
mylink$linkinv(eta = gy, ctt.ll = a); y
mylink$diflink(mu = y, ctt.ll = a); a
mylink$mu.eta(eta = gy, ctt.ll = a); 1/a



[Package BTSR version 0.1.5 Index]