m-clark / book-of-models

Spells for everyday living. (also a book coming out in 2024)
https://m-clark.github.io/book-of-models/
Other
39 stars 8 forks source link

GLM chap suggestions #59

Open m-clark opened 2 months ago

m-clark commented 2 months ago

Summary of thoughts from a twitter thread

  1. Can it be made clearer that GLMs model the conditional distribution of Y given X (as opposed to the marginal distribution of Y)?
  2. The distinction in 1. can be emphasized by explaining that notation like Y ~ N(mu, sigma) really refers to Y|X ~ N(mu, sigma) but that the conditioning on X is omitted for notational convenience.
  3. I also think it would be clearer to define models in this order:

Y|X ~ N(mu, sigma)

followed by

mu = beta0 + beta1*X

since that emphasizes that we pick a distribution first (indexed by X) and then model specific aspects of that distribution (e.g., mean).

  1. Worth stating upfront that GLM models can be more challenging to interpret because their results can be reported on multiple scales. For example, binary/binomial logistic regression models have 3 such scales: log odds, odds and probability. The user has to pick the scale(s) most appropriate for their target audience. The scale choice has important implications (e.g., variables that do not interact on the log odds scale can interact on the probability scale).

  2. Not sure I agree that “Interpreting log odds is a fool’s errand”. If the slope of X is positive/negative, we can infer that the probability that Y = 1 given X increases/decreases at a nonlinear rate with X, all else equal. That’s still valuable information, albeit indirect. At their heart, GLMs are allowing us to model non-linearity indirectly rather than directly as we do in LMs.
    Thus, we can still infer nonlinearity indirectly from linearity.

  3. It would be helpful to the reader to connect the following:

log odds of 0 with the probability of 0.5;

log odds > 0 with probability > 0.5;

log odds < 0 with probability < 0.5.

This can help build more intuition for the log odds beast.

  1. Something else that would help is to express any of the 3 scales for a binary/binomial logistic regression model as a function of each other.

This would enable the reader to move with ease from one scale to another.

  1. The language used to present results seems to be “causal” (e.g., the feature “influences” the odds). Should the reader be cautioned that non-causal modelling and causal modelling warrant different types of language?

  2. To me, the section on Objective Function and Model Fitting does not seem to add anything of value in terms of building more intuition.

  3. Should there be an attempt to distinguish between binary and binomial logistic regression? At the very least, binomial logistic regression deserves a side note or a comment.

  4. Poisson regression is “easier” to introduce as a particular instance of GLM because it only has two scales: 1. log mean response and 2. mean response.
    Perhaps start with Poisson regression (two scales) and then move to binary logistic regression (three scales).

  5. Why not go a bit deeper with GLM models and explore ways to “describe” nonlinearity of relationships using the concept of “marginal effects”?

  6. Something on model diagnostics would be useful to include, since diagnostics for GLMs are trickier than diagnostics for LMs.

m-clark commented 2 months ago

A couple quick thoughts:

Will keep this open until the chapter has been sufficiently updated.