Solved – R squared formula for Generalized Linear Models with GAMMA distribution

gamma distributiongeneralized linear modelr-squared

I am running a generalized linear model with Gamma distribution in R (glm, family=gamma) for my data (gene expression as response variable and few predictors). I want to calculate r-squared for this model.

I have been reading about it online and found there are multiple formulas for calculating $R^2$ (psuedo) for glm (in R) with Gaussian (r2 from linear model), logistic regression (1-deviance/null deviance), Poisson distribution (using pR2 in the pscl package, D-squared value from the modEvA R package). But I could not find anything specific to Gamma distributions.

Can pscl and modEVA packages be used for the Gamma distribution as well, or is there any other formula for doing the same?

Best Answer

Your question- yes they can be. Technically, you can use a normal r squared measurement as your goodness of fit measure. It might not be a very good fit measure, but you can certainly use it. Further, you have to ask yourself if your increase in precision is worth the loss of readability of your findings. For example, moving from r-squared to an adjusted r-square is likely to be a meaningful increase in precision at the sacrifice of readability. I personally like McKelvey & Zavoina and other similar approaches (e.g. xu's r squared for mixed models). That does not mean they are the best or only approaches.