12
$\begingroup$

From my results, it appears that GLM Gamma meets most assumptions, but is it a worthwhile improvement over the log-transformed LM? Most literature I've found deals with Poisson or Binomial GLMs. I found the article EVALUATION OF GENERALIZED LINEAR MODEL ASSUMPTIONS USING RANDOMIZATION very useful, but it lacks the actual plots used to make a decision. Hopefully someone with experience can point me in right direction.

I want to model the distribution of my response variable T, whose distribution is plotted below. As you can see, it is positive skewness:
Valid XHTML.

I have two categorical factors to consider: METH and CASEPART.
Note that this study is mainly exploratory, essentially serving as a pilot study before theorizing a model and performing DoE around it.

I have the following models in R, with their diagnostic plots:

LM.LOG<-lm(log10(T)~factor(METH)+factor(CASEPART),data=tdat)

Valid XHTML
Valid XHTML

GLM.GAMMA<-glm(T~factor(METH)*factor(CASEPART),data=tdat,family="Gamma"(link='log'))

Valid XHTML
Valid XHTML

GLM.GAUS<-glm(T~factor(METH)*factor(CASEPART),data=tdat,family="gaussian"(link='log'))

Valid XHTML
Valid XHTML

I also attained the following P-values via Shapiro-Wilks test on residuals:

LM.LOG: 2.347e-11  
GLM.GAMMA: 0.6288  
GLM.GAUS:  0.6288  

I calculated AIC and BIC values, but if I am correct, they don't tell me much due to different families in the GLMs/LM.

Also, I noted the extreme values, but I cannot classify them as outliers as there is no clear "special cause".

$\endgroup$
  • $\begingroup$ possible duplicate of Choosing between LM and GLM for a log-transformed response variable $\endgroup$ – Marc in the box Nov 25 '13 at 7:03
  • 1
    $\begingroup$ It's worth noting that all three models are multiplicative in the sense that an increase in a regressor is associated with a relative change in the typical response. For the two log-linear GLMs, "typical" means arithmetic mean, while for the log-transformed LM we are talking about geometric means. Thus, the way you want to interpret effects and predictions is also a driving factor for the model choice, not only having perfect residual plots (these are data driven anyway). $\endgroup$ – Michael M Nov 25 '13 at 7:28
  • $\begingroup$ @MichaelMayer - Thanks for the response, very helpful. Could you expand a little on exactly how the choice effects the interpretation? Or point me in the direction of a reference? $\endgroup$ – TLJ Nov 25 '13 at 8:03
  • $\begingroup$ @Marcinthebox- I looked through that question before posting. Doesn't exactly answer my question very concisely. $\endgroup$ – TLJ Nov 25 '13 at 8:04
17
$\begingroup$

Well, quite clearly the log-linear fit to the Gaussian is unsuitable; there's strong heteroskedasticity in the residuals. So let's take that out of consideration.

What's left is lognormal vs gamma.

Note that the histogram of $T$ is of no direct use, since the marginal distribution will be a mixture of variates (each conditioned on a different set of values for the predictors); even if one of the two models was correct, that plot may look nothing like the conditional distribution.

Either model appears just about equally suitable in this case. They both have variance proportional to the square of the mean, so the pattern of spread in residuals against fit is similar.

A low outlier will fit slightly better with a gamma than a lognormal (vice versa for a high outlier). At a given mean and variance, the lognormal is more skew and has a higher coefficient of variation.

One thing to remember is that the expectation of the lognormal is not $\exp(\mu)$; if you're interested in the mean you can't just exponentiate the log scale fit. Indeed, if you are interested in the mean, the gamma avoids a number of issues with the lognormal (e.g. once you incorporate parameter uncertainty in $\sigma^2$ in the lognormal, you have prediction based on the log-t distribution, which doesn't have a mean. Prediction intervals still work fine, but that may be a problem for predicting the mean.

See also here and here for some related discussions.

$\endgroup$
  • 1
    $\begingroup$ @Gleb_b this answer is very useful for my analysis. I have a few questions. (1)First, is this 'They both have variance proportional to the square of the mean...' based on the residual vs fitted plot? (2)And is this 'A low outlier will fit slightly better with a gamma... At a given mean and variance, ...' based on the qq plot? (3)From what I understand glm (e.g. gamma, poisson and negative binomial) does not have the assumption of normality of residuals and homogeneity of variance. If so, why would plotting residuals vs fitted and normal qq plot be relevant for diagnostics? $\endgroup$ – tatami Oct 10 '17 at 7:47
  • 2
    $\begingroup$ This is extensive enough to be a whole new question, or indeed several (most of which are already answered on our site!)- 1. part of the model. 2. No, these are general facts about the distributions. 3. Correct they're not normal, however the residuals used in the QQ plot are (internally studentized) deviance residuals which - particularly in the gamma case - will generally tend to be very close to normally distributed (I wrote an answer explaining why at some point) and should have essentially constant variance. Some deviation from normality is not unexpected but substantial deviation ...ctd $\endgroup$ – Glen_b Oct 10 '17 at 7:59
  • 2
    $\begingroup$ ctd... from normality (assuming the other plots are fine) may indicate an issue with the distributional assumption. $\endgroup$ – Glen_b Oct 10 '17 at 8:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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