I'm using a GAM model for continuous dependent and two independent variables recorded at reasonably regular intervals from multiple subjects. The dependent variable
Y is strictly >0 and positively skewed.
M1 = bam(log(Y)~s(A)+s(B)+s(id, bs='re')) M2 = bam(Y~s(A)+s(B)+s(id, bs='re'), link=Gamma(type='log'))
First question is whether it is preferable to use the log transform of the dependent variable (
M1) with a gaussian-identity link function in the gam, or use the untransformed data and employ a Gamma-log link function (
M2). My reading suggests that while transforming the variable is the traditional method the latter approach of using a generalised link function is these days generally viewed as 'better', and gives more accurate estimates of predicted mean, SD etc. Though the explained deviance is little different between the models (both ~58%), AIC is far lower when using the log-transformed dependent variable (M1:~2000 vs M2:16000). For completeness I did try a gaussian-log link function but it did not fit well.
Second question: there is autocorrelation in the dependent variable so the next model includes an AR(1) rho=0.5 term.
M3 = bam(log(Y)~s(A)+s(B)+s(id, bs='re'), AR.start=ind, rho=0.55)
For a start, the AR function does not work with non-gaussian link function which raises the question of whether it is valid to use an autocorrelation model with log-transformed variables? The AIC from the log-transformed-AR(1) model is -9000. Is this reliable? Again, deviance explained is little different.
The fitted smooth terms are qualitatively similar for the non-autocorrelation models (M1 and M2) so practically it doesn't make much difference to my conclusions. However, the smooths are significantly different for the AR model (M3).
What would be the advice on choosing amongst the models?