inverse.link: Inverse link functions (internal use)

View source: R/inverse.link.R

inverse.linkR Documentation

Inverse link functions (internal use)

Description

Computes values of inverse of link functions for real estimates.

Usage

inverse.link(x, link)

Arguments

x

Matrix of design values multiplied by the vector of the beta parameter values

link

Type of link function (e.g., "logit")

Details

The inverse of the link function is the real parameter value. They are simple functions of X*Beta where X is the design matrix values and Beta is the vector of link function parameters. The body of the function is as follows:

switch(link, logit=exp(x)/(1+exp(x)), log=exp(x),
loglog=exp(-exp(-x)), cloglog=1-exp(-exp(x)), identity=x,
mlogit=exp(x)/(1+sum(exp(x))) ) 

The link="mlogit" only works if the set of real parameters are limited to those within the set of parameters with that specific link. For example, in POPAN, the pent parameters are of type "mlogit" so the probabilities sum to 1. However, if there are several groups then each group will have a different set of pent parameters which are identified by a different grouping of the "mlogit" parameters (i.e., "mlogit(1)" for group 1, "mlogit(2)" for group 2 etc). Thus, in computing real parameter values (see compute.real) which may have varying links, those with "mlogit" are not used with this function using link="mlogit". Instead, the link is temporarily altered to be of type "log" (i.e., inverse=exp(x)) and then summed over sets with a common value for "mlogit(j)" to construct the inverse for "mlogit" as exp(x)/(1+sum(exp(x)).

Value

Vector of real values computed from x=X*Beta

Author(s)

Jeff Laake

See Also

compute.real,deriv_inverse.link


RMark documentation built on Aug. 14, 2022, 1:05 a.m.

Related to inverse.link in RMark...