12.12 Generalized Linear Models

We can also use stan_glm() to fit models with Binomial, Gamma, inverse Normal, and other data structures. All of these options belong to a larger class of generalized linear models (GLMs).

g((E(Y|...))=β0+β1X1+β2X2++βpXp

where the appropriate link function g depends on the data structure.