# inverse.link: Inverse link functions (internal use) In marked: Mark-Recapture Analysis for Survival and Abundance Estimation

## Description

Computes values of inverse of link functions for real estimates.

## Usage

 `1` ```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:

 ```1 2 3``` ```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

`compute_real`,`deriv_inverse.link`