Can I still run a gamma GLM in R if my data does not pass the equal variance assumption through the Levene Test? Is there a nonparametric test I should run instead or can I just run the gamma GLM?
1 Answer
Gamma glm's do not have an assumption of constant variance. Generalized linear models have a specific variance function, depending on the family. What you need to look for is if the residual variance conforms to your models variance function. Details for gamma glm's here. So the Levene test for constant variance is irrelevant!
Some relevant posts with details:
What are the assumptions of a Gamma GLM or GLMM for hypothesis testing?
Help understanding parameterization of gamma distribution in R's glm()
Testing the variance part of a Generalized Linear Model out of sample?
For an informal check on the variance function, you can plot the absolute residuals against the predicted value