What Is a Link Function and How Does It Work?

A link function is a mathematical transformation that connects the outcome you’re trying to predict to the linear equation in a statistical model. It’s the core idea behind generalized linear models (GLMs), a framework introduced by Nelder and Wedderburn in 1972 that extended ordinary regression to handle outcomes like counts, probabilities, and other non-normal data. Without a link function, you’d be stuck trying to fit a straight line to data that doesn’t behave in a straight-line way.

The Problem Link Functions Solve

In ordinary linear regression, the equation is simple: your predicted outcome equals an intercept plus some slope times your predictor variable. That works fine when your outcome can take any value on a continuous scale, like height or temperature. But many real-world outcomes don’t work that way. A probability can only fall between 0 and 1. A count of events (like hospital visits or website clicks) can never be negative. If you try to model these with a plain linear equation, you’ll eventually predict impossible values, like a probability of 1.3 or a count of negative five.

A link function solves this by transforming the predicted mean of your outcome so it maps onto the full range of the linear equation, which runs from negative infinity to positive infinity. The formal notation looks like this: g(μ) = α + βX, where g is the link function, μ is the mean of your outcome, and the right side is the familiar linear equation. The link function sits on the left side, reshaping the outcome’s scale so the linear math on the right side makes sense.

How the Transformation Works

Think of the link function as a two-way bridge between two scales. One scale is the “data scale,” where your outcome lives in its natural units (probabilities between 0 and 1, counts that are zero or positive). The other is the “linear scale,” where the regression equation operates without constraints.

The link function g(μ) moves you from the data scale to the linear scale. The inverse link function does the reverse: it takes the output of the linear equation and converts it back into a meaningful predicted value on the data scale. When you fit a logistic regression and want to get a predicted probability, you’re using the inverse link function to translate the model’s raw output back into something interpretable.

A valid link function must be monotonic (consistently increasing or consistently decreasing, never switching direction) and smooth enough to be differentiable. These properties guarantee that the transformation is reversible, so you can always move between the two scales without ambiguity.

The Four Most Common Link Functions

Each link function is suited to a different type of outcome data. Here are the ones you’ll encounter most often:

  • Identity link: g(μ) = μ. No transformation at all. The predicted mean equals the linear equation directly. This is what ordinary linear regression uses for continuous outcomes that follow a normal distribution.
  • Log link: g(μ) = log(μ). Takes the natural logarithm of the mean. Used in Poisson regression for count data, because exponentiating the linear equation always produces a positive number, which is exactly what counts require.
  • Logit link: g(μ) = log(μ / (1 − μ)). Transforms a probability into the log-odds. This is the backbone of logistic regression. It maps probabilities (bounded between 0 and 1) onto the entire real number line.
  • Probit link: g(μ) = Φ⁻¹(μ), where Φ⁻¹ is the inverse of the standard normal cumulative distribution function. Like the logit, it’s used for binary outcomes, but it assumes the underlying process follows a normal distribution. It produces very similar results to the logit in most cases, with slightly thinner tails.

Other link functions exist for more specialized situations. The square root link is occasionally used for count data. The complementary log-log (cloglog) link handles binary outcomes where the probability curve is asymmetric, meaning the probability rises slowly on one end and sharply on the other. The cauchit link accommodates heavy-tailed distributions where extreme values are more common.

Canonical Links

Each probability distribution in the GLM framework has a “canonical” link function, a natural pairing that gives the model certain desirable mathematical properties, particularly cleaner estimation and simpler sufficient statistics. The standard pairings are:

  • Normal distribution: identity link (μ)
  • Poisson distribution: log link (log μ)
  • Binomial distribution: logit link (log(μ / (1 − μ)))
  • Gamma distribution: reciprocal link (1/μ)

You’re not required to use the canonical link. A Poisson model can use a square root link instead of a log link if that better fits your data. But the canonical link is the default starting point, and it’s what most software packages will assume unless you specify otherwise.

How Link Functions Change Coefficient Interpretation

The choice of link function fundamentally changes what the model’s coefficients mean. This is one of the most practical things to understand about link functions, because it determines how you communicate your results.

With an identity link, coefficients are additive. A coefficient of 3 means that a one-unit increase in your predictor adds 3 units to the predicted outcome. Straightforward.

With a log link, coefficients become multiplicative. A coefficient of 0.5 means that a one-unit increase in the predictor multiplies the predicted outcome by e^0.5 (about 1.65), so a 65% increase. This is why Poisson regression results are often reported as rate ratios.

With a logit link, coefficients are on the log-odds scale. A coefficient of 1.2 means a one-unit increase in the predictor increases the log-odds of the outcome by 1.2. To get an odds ratio, you exponentiate: e^1.2 = 3.32, meaning the odds roughly triple. The relationship to actual probability isn’t constant, though. The same odds ratio translates to a bigger probability change near 50% than near 0% or 100%.

With a probit link, coefficients represent changes in the z-score of the standard normal distribution. They’re harder to interpret intuitively, which is one reason the logit link is more popular in most applied fields despite the two giving nearly identical predictions.

Choosing the Right Link Function

Start with the canonical link for your outcome type. If you have binary data, try the logit. If you have counts, try the log. Most of the time, the canonical link works well and keeps interpretation simple.

When you have reason to believe the canonical link doesn’t fit, comparing models with different link functions is straightforward. The Akaike information criterion (AIC) and Bayesian information criterion (BIC) both measure model fit while penalizing complexity, letting you pick the link function that best matches your data’s actual behavior. Lower values indicate better fit.

Getting the link function wrong isn’t just an abstract concern. Research on meta-analyses of proportions has shown that misspecifying the link function can introduce bias into your estimates, and that using robust standard errors may not fully correct the problem. If your results change noticeably when you swap link functions, that’s a signal to investigate which one fits best rather than just defaulting to the most common choice.

Domain constraints also matter. If your outcome must be positive, you need a link function whose inverse always produces positive values (the log link does this). If your outcome is a probability, you need the inverse to stay between 0 and 1 (the logit, probit, and cloglog links all do this). Matching the link function to the natural boundaries of your data prevents the model from generating impossible predictions.