2
$\begingroup$

I have a GLM model with a Gaussian distribution and a log link and I would like to assess the goodness of fit. I tried to take the regular $R^2$ but that was not possible with my model. I then resorted to the McFadden pseudo $R^2$, which is actually meant for logistic regressions. I would like to know if the McFadden pseudo $R^2$ is usable in my GLM as well? Or if not what would a goodness of fit measure be for GLM models with Gaussian distribution and a log link?

$\endgroup$
3
  • 3
    $\begingroup$ Could you explain why you could not compute an $R^2$? It's certainly possible and might even make some sense. Beware, though, that $R^2$ is often a poor or meaningless measure of goodness of fit, unless you are certain the form of your model is the absolutely correct one. $\endgroup$
    – whuber
    Jun 5, 2019 at 15:45
  • $\begingroup$ $R^2$ in the sense of the squared correlation between observed and predicted values is certainly computable: nothing makes it "not possible". As always it needs to be viewed circumspectly. The material in stats.stackexchange.com/questions/68066/… is more pertinent than the thread title implies. $\endgroup$
    – Nick Cox
    Jun 5, 2019 at 16:01
  • $\begingroup$ Another related post (my answer) that segues into Dave's take on McFadden R^2 stats.stackexchange.com/questions/444819/… $\endgroup$
    – AdamO
    Apr 6, 2023 at 18:27

1 Answer 1

2
$\begingroup$

The McFadden pseudo $R^2$ takes the stance that the extension of the usual $R^2$ to logistic regression should be $1-\left(\dfrac{L_1}{L_0}\right)$, where $L_1$ is the log-likelihood of your model and $L_0$ is the log-likelihood of an intercept-only model that predicts the mean every time (see, for instance, UCLA on this). If you apply this idea to a Gaussian likelihood instead of binomial, you wind up with the following.

$$ 1-\left(\dfrac{ \overset{N}{\underset{i=1}{\sum}}\left( y_i-\hat y_i \right)^2 }{ \overset{N}{\underset{i=1}{\sum}}\left( y_i-\bar y \right)^2 }\right) $$

The numerator is the log-likelihood of your model, and the denominator is the log-likelihood of an intercept-only model that always predicts the mean $\bar y$.

The above expression winds up being equal to $\text{corr}(y, \hat y)$ in the OLS linear regression case. Further, the expression above represents a comparison of the likelihood (or mean squared error) of your model relative to that of a baseline model, and if you cannot beat the baseline model on a metric of interest, that suggests trouble. Predicting $\bar y$ every time makes sense as a baseline model because, for a model that is supposed to predict conditional means, what better naïve prediction of the conditional mean than the overall mean?

There are issues with summarizing model performance with just one value, as is suggested in the comments, and Cross Validated has an answer showing why $R^2$ can be high despite a clearly incorrect model. However, $ 1-\left(\dfrac{ \overset{N}{\underset{i=1}{\sum}}\left( y_i-\hat y_i \right)^2 }{ \overset{N}{\underset{i=1}{\sum}}\left( y_i-\bar y \right)^2 }\right) $ is a totally reasonable statistic to calculate, and you can do it for your model.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.