The generalized linear model (GLM) is a flexible generalization of ordinary least squares regression. OLS restricts the regression coefficients to have a constant effect on the dependent variable. GLM allows for the this effect to vary along the range of the explanatory variables.

The basic structure of GLM estimator is as follows:

- g(Y) =
**Xβ**+ ε - E(Y) = μ = g
^{-1}(**Xβ**)

To estimate the model, one needs three components:

**Random component**, specifying the conditional distribution of the

response variable, given the explanatory variables. Typically, this distribution is from the exponential family.- A
**linear predictor**which is a linear function of the regressors: η = β_{0}+ β_{1}X_{1}+…+ β_{k}X_{k}=**Xβ** **A link function**which transforms the expectation of the response to the linear predictor. In other words, the link function describes the relationship between the linear predictor and the mean of the distribution function. The link function must be invertible.

The table below lists commonly used link functions and their inverse: (source)

Link |
η_{i}=g(μ_{i}) |
μ_{i}=g^{-1}(η_{i}) |

Identity | μ_{i} |
η_{i} |

Log | ln(μ_{i}) |
exp(η_{i}) |

Inverse | μ_{i}^{-1} |
η_{i}^{-1} |

Inverse-Square | μ_{i}^{-2} |
η_{i}^{-0.5} |

Square Root | μ_{i}^{0.5} |
η_{i}^{2} |

Logit | ln[μ_{i}/(1- μ_{i})] |
exp(η_{i})/[1+ exp(η_{i})] |

Probit | Φ^{-1}(μ_{i}) |
Φ(η_{i}) |

Log-log | -ln[-ln(μ_{i})] |
exp[-exp(-η_{i})] |

To estimate the coefficients for a GLM model, most researchers use a maximum likelihood method although Bayesian approaches can also be used. In Stata, the *glm* command estimates the coefficients from a generalized linear model. In SAS the procedure GENMOD can be used.

[...] The authors estimate the first equation with a logit specification and the second equation with a GLB model with a Poisson distribution and a log link (for more information on GLM models, see this post). [...]