Learn R Programming

insight (version 0.6.0)

link_function: Get link-function from model object

Description

Returns the link-function from a model object.

Usage

link_function(x, ...)

Arguments

x

A fitted model.

...

Currently not used.

Value

A function, describing the link-function from a model-object. For multivariate-response models, a list of functions is returned.

Examples

Run this code
# NOT RUN {
# example from ?stats::glm
counts <- c(18, 17, 15, 20, 10, 20, 25, 13, 12)
outcome <- gl(3, 1, 9)
treatment <- gl(3, 3)
m <- glm(counts ~ outcome + treatment, family = poisson())

link_function(m)(.3)
# same as
log(.3)
# }

Run the code above in your browser using DataLab