Course contentsShow
← Data Science
Lesson 678 of 2,14518. Generalized Linear ModelsFree lesson

Choosing the Right Link Function

Apply criteria for selecting appropriate link functions based on response distribution and interpretability.

Choosing the Right Link Function

You'll learn: how to select the most appropriate link function by considering your response variable's distribution and the interpretability of results.

When building a Generalized Linear Model (GLM), choosing the right link function is like picking the right lens for a camera—it determines how clearly you can see and explain the relationship between predictors and your outcome.

Two Key Criteria

1. Match the Response Distribution

Your link function should respect the natural range and behavior of your outcome variable:

  • Binary outcomes (0/1): Use logit or probit links. Both keep predicted probabilities between 0 and 1. The logit is more common because odds ratios are intuitive.
  • Count data (0, 1, 2, ...): Use the log link. This ensures predictions stay positive and handles the multiplicative nature of counts.
  • Continuous positive values (prices, durations): The log link works well here too.
  • Continuous unbounded data: The identity link (standard linear regression) is appropriate.

Each distribution in the exponential family has a canonical link that has nice mathematical properties—but you're not forced to use it.

2. Prioritize Interpretability

The link function affects how you interpret coefficients:

  • Logit: Coefficients represent log-odds changes; exponentiated coefficients give odds ratios (very interpretable).
  • Log: Coefficients represent proportional changes; a one-unit increase in X multiplies Y by exp(β).
  • Identity: Coefficients are direct additive effects (simplest interpretation).

Choose a link that stakeholders can understand and that answers your research question naturally.

Practical Decision Flow

  1. Identify your response distribution
  2. Start with the canonical link for that distribution
  3. Check if interpretation makes sense for your audience
  4. If needed, try a non-canonical alternative and compare model fit

Key Takeaway: Select your link function by matching your response variable's distribution first, then verify that coefficients will be interpretable for your specific problem and audience.