Skip to contents

Applies the mean function (inverse link function).

Usage

mean_function(eta, family)

Arguments

eta

numeric vector

family

character "gaussian" or "binomial"

Value

Returns a numeric vector of the transformed values.

Examples

family <- "binomial"
eta <- seq(from=-3,to=3,length.out=100)
mu <- mean_function(eta=eta,family=family)
graphics::plot(x=eta,y=mu,type="l",main=family)
graphics::abline(v=0,lty=2)
h <- ifelse(family=="binomial",0.5,0)
graphics::abline(h=h,lty=2)