How to compare the fit of two Generalized Linear Models? If I have two OLS models with the same number of parameters, all of them zero p-value, then next thing I look at is which one has the largest $R^2$.
But in the case of GLM, how do I decide which of two models is best? (Again, assuming that both have the same number of parameters, all with zero p-value)
 A: You can use the generalized $\mathbf{R^{2}}$, proposed by Maddala for binomial models, and extended by Magee, and independently developed by Cox & Snell, but refined by Nagelkerke:
$$R^{2}_{\text{CS}} = 1 - \left(\frac{L\left(0\right)}{L(\hat{\theta})}\right)^{\frac{2}{n}}$$
where $L(0)$ is the likelihood of the null model (i.e. $\text{link}(y) = \beta_{0}$), and $L(\hat{\theta})$ is the model fitted on your predictors.
Nagelkerke says of the $R_{\text{CS}}^{2}$ "It is easily found that this definition of $R^{2}$ has the following properties.


*

*It is consistent with classical $R^{2}$, that is the general definition applied to e.g. linear regression yields the classical $R^{2}$.

*It is consistent with maximum likelihood as an estimation method, i.e. the maximum likelihood estimates of the model parameters maximize $R^{2}$.

*It is asymptotically independent of the sample size $n$.

*It has an interpretation as the proportion of explained 'variation', or rather, $1-R^{2}$: has the interpretation of the proportion of unexplained 'variation'. [More nuanced things in the article]

*It is dimensionless, i.e. it does not depend on the units used.

*Replacing the factor $2/n$… by $k/n$ yields a generalization of the proportion of the $k$th central moment explained by the model.

*Let $y$ have a probability density $P(y|\beta)$, then using Taylor expansion, it can be shown that to a first order approximation, $R^{2}$ is the square of the Pearson correlation between $x$ and the efficient score of the model $p(.)$, that is the derivative with respect to $\beta$ of $\log\left(p(y|\beta x +\alpha ) \right)$ at $\beta = 0$."
However, Nagelkerke observed that the Cox-Snell formulation gives a maximum $R^{2}<1$, and proposed the form:
$$\overline{R}^{2}=\frac{R^{2}_{\text{CS}}}{1-L(0)^{\frac{2}{n}}}$$
which is 0 when $L(\hat{\theta})=L(0)$, and is 1 when the model perfectly fits the data.
References
Cox, D. R.; Snell, E. J. (1989). The Analysis of Binary Data (2nd ed.). Chapman and Hall.
Maddala, G. S. (1983), Limited-Dependent and Qualitative Variables in
Econometrics, Cambridge,U.K: Cambridge University Press.
Magee, L. (1990). $R^{2}$ measures based on Wald and likelihood ratio joint significance tests. The American Statistician, 44(3):250–253.
Nagelkerke, N. J. D. (1991). A note on a general definition of the coefficient of determination. Biometrika, 78(3):691–692.
