On pg. 125 in Agresti's Categorical Data Analysis, it's suggested by a plot of the dependent variable (a count) vs an independent variable (categorized version of continuous width variable) that the relationship between count and width is linear.

It is then said that a Poisson GLM with the identity link may be appropriate. I think you could also use a normal linear model but the idea is to use the assumption that variance increases with mean in the Poisson.

What I started to wonder is if you can look at a graph and decide that the identity link is appropriate, what would a graph that suggests the log link is appropriate look like? Is this visual approach often used, and is it used for the binomial? It would seem hard to do this with multiple independent variables, but I guess you could make a plot for each variable.

Let the link function be so that the expected value $$\mu$$ satisfies $$\mu = h(\beta_0 + \beta_1 x)$$ for some function $$h$$.

If $$h$$ is the identity so that $$h(\eta) = \eta$$, then the plot of $$\mu$$ against $$x$$ will be linear, since $$\mu=\beta_0 + \beta_1 x$$.

If $$h$$ is the exponential function so that $$h(\eta) = \exp \eta$$, then the plot of $$\mu$$ against $$x$$ will appear exponential, since $$\mu = \exp (\beta_0 + \beta_1 x)$$. The curve will grow increasingly rapidly.

This list of possible link functions and their appearances goes on and on. Unfortunately, we do not have access to $$\mu$$ to make these plots! All we have are noisy realizations via the outcome data. This is why Agresti recommends showing a smoothed plot of the outcome against $$x$$. The smoothed outcome is a nonparametric estimate of $$\mu$$ that does not rely on knowing the link function in advance.

This approach works for any distribution, including binomial. Although, I personally would not be able to distinguish between a logistic and probit curve.

This answer is for univariable models (i.e. with one explanatory variable $$x$$) only. With multivariable models, higher dimensional visualizations or slices would be useful.

• What if the response vs one predictor is linear and logarithmic vs another? Commented May 11, 2022 at 18:35
• @fmtcs if that happened, the mean $\mu$ would not be a link-linear function of the covariate vector $x$. In other words, you wouldn't have a GLM.
– Ben
Commented May 11, 2022 at 19:00
• so for a Poisson log-link GLM model y~x1+x2 to be valid, y vs x1 has to be logarithmic and y vs x2 has to be logarithmic? Commented May 11, 2022 at 19:32
• @fmtcs Apologies, my previous answer had an error. They do both need to be the same, but they must be exponential rather than logarithmic. The function $h$ we're using in this answer is the inverse of the usual link function.
– Ben
Commented May 11, 2022 at 20:12

If it were obvious that the variance did change with the mean (for example, one group has a very low mean and very low variance, but another group has a high mean and a high variance) that would suggest that the log link should be used.

It would be easy to graphically determine whether the data follow a binomial family/logit link because the response variable will be either 0 or 1 for each individual.

In practice, it is more common to visually assess the residuals of models than the response variables. By plotting the residuals of an identity-linked linear model against the predicted values, you can easily tell if the variance is changing with the mean even with many covariates or continuous covariates.

• Why does the variance growing with the mean say something about the link function rather than the conditional distribution?
– Ben
Commented May 10, 2022 at 20:45
• Variance growing with the mean does tell us about the conditional distribution. But, link functions are generally chosen to correspond to a certain conditional distribution. Commented May 10, 2022 at 20:51
• I see what you mean, but the point of this section in Agresti is to explain how to choose link functions independently of choosing conditional distributions.
– Ben
Commented May 10, 2022 at 20:55
• Ah, I should have read the relevant book section before answering. Commented May 11, 2022 at 0:54
• @clementzach What about if the response is linear but the variance increases with the mean? Then wouldn't a Poisson with identity link be the right choice? Commented May 11, 2022 at 18:36