Computes values of inverse of link functions for real estimates.
inverse.link(x, link)
Vector of real values computed from x=X*Beta
Matrix of design values multiplied by the vector of the beta parameter values
Type of link function (e.g., "logit")
Jeff Laake
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))
.
compute.real
,deriv_inverse.link