linkfcn: Calculate the link function for exponential families

Description Usage Arguments Details Value References Examples

Description

Link function for the exponential family.

Usage

1
2
3
linkfcn(mu, linkp, family = "gaussian")

linkinv(z, linkp, family = "gaussian")

Arguments

mu

Numeric. The mean of the response variable.

linkp

The link function parameter. A scalar.

family

The distribution of the response variable from .geoBayes_models. Either an integer or the family name.

z

Numeric. The linear predictor.

Details

linkfcn maps the mean of the response variable mu to the linear predictor z. linkinv is its inverse.

For the Gaussian family, if the link parameter is positive, then the extended link is used, defined by

z = (sign(mu)*abs(mu)^nu - 1)/nu

In the other case, the usual Box-Cox link is used.

For the Poisson and gamma families, if the link parameter is positive, then the link is defined by

z = sign(w)*expm1(nu*w)/nu

where w = log(mu). In the other case, the usual Box-Cox link is used.

For the GEV binomial family, the link function is defined by

mu = 1 - exp[-max(0, 1 + nu z)^(1/nu)]

for any real nu. At nu = 0 it reduces to the complementary log-log link.

The Wallace binomial family is a fast approximation to the robit family. It is defined as

mu = Phi(sign(z) c(nu) sqrt{nu log(1 + z^2/nu)})

where c(nu) = (8*nu+1)/(8*nu+3)

Value

A numeric array of the same dimension as the function's first argument.

References

Evangelou, E., & Roy, V. (2019). Estimation and prediction for spatial generalized linear mixed models with parametric links via reparameterized importance sampling. Spatial Statistics, 29, 289-315.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
mu <- seq(0.1, 0.9, 0.1)
linkfcn(mu, 7, "binomial")       # robit(7) link function
linkfcn(mu, , "binomial.logit")  # logit link function

mu <- seq(-3, 3, 1)
linkfcn(mu, 0.5, "gaussian")     # sqrt transformation
linkinv(linkfcn(mu, 0.5, "gaussian"), 0.5, "gaussian")
curve(linkfcn(x, 0.5, "gaussian"), -3, 3)

## End(Not run)

geoBayes documentation built on May 2, 2019, 3:14 a.m.