< Probability and statistics definitions < *Link function*

Link functions in Generalized Linear Models (GLMs) let us model curved relationships with straight lines. More specifically, it maps non-linear relationships to linear ones, which means you can fit a linear model to data. More specifically, link functions allow us to model non-linear relationships between predictors and response variables by transforming the response variable to a linear scale. It specifies the “link” between the random and the systematic components, indicating how the response variable’s expected value relates to the linear combination of explanatory variables [1].

## Link function examples

Link functions connect the probability distribution of the response variable to the linear combination of the predictors. For example, in linear regression, the link function is the identity function — mapping every element in a set to itself and directly predicting the outcome. Other examples include the log, logit, reciprocal, and probit. Which link function you use depends upon what analysis you’re performing.

Common link functions include:

Link function | Data type |
---|---|

Logit link | Binary data |

Log link | Count data |

Log log link | Data from extreme asymmetric distributions |

Identity link | Continuous data |

Complementary log-log (cloglog) link | Binary data |

Inverse complementary log-log (icloglog) link | Binary data |

Negative inverse | Non-negative and continuous |

Probit link | Binary data |

Power link | Continuous and count data |

Which link function you use depends on the distribution of the response variable and the desired relationship between the predictors and the response variable.

Distribution | Support | Link name | Link function |

Bernoulli distribution | Integers: {0, 1} | Logit | XΒ = ln(μ / 1 – μ) |

Binomial distribution | integers: {0, 1, …, N} | Logit | XΒ = ln(μ / n – μ) |

Normal Distribution | real: (-∞, ∞) | Identity | XΒ = μ |

Exponential Distribution | real: (0, ∞) | Negative inverse | XΒ = -μ^{-1} |

Gamma Distribution | real: (0, ∞) | Negative inverse | XΒ = -μ^{-1} |

Poisson Distribution | integers: 0, 1, 2, … | Log | XΒ = ln(μ) |