Skip to content
Prev 10789 / 20628 Next

help in GlmmPQL

xavier chevillot <chevillot.xavier at ...> writes:
random= 1|years, family=Gamma(link="log"),data=marin0,maxit=10000)

First thought: do you really need a Gamma distribution with a log link?
Especially if you're going to use a log link anyway, treating the
data as log-Normal (i.e. log-transforming the data and then using
a linear mixed model rather than a generalized linear m. m.) is
often easier.
Hard to say, but it seems reasonable.  You probably want
to account for seasonal variation somehow.  Is fish_1_abundance
the abundance of species 1? You might want to fit a model with
all species together, and interactions between species and the
variables (i.e. Species*(var1+var2+var3+...), so you can test
if the responses are different across species.

Is there one sample per species per month, i.e. the total data set is 
4*12*25 observations?
yes, in principle
Yes, but (1) it would be much easier to interpret the meaning
of the resulting model if you used lme() rather than glmmPQL
(i.e. analyze data on the log scale as suggested above) and
(2) you probably want to account for seasonality (as suggested
above, and as I see your next question is ...)
You don't really need to account for the seasonality of the
predictor variables.  You can add either a fixed or a random
effect of month (although for the latter you probably need lme4::lmer,
which will make the correlation modeling harder), or you can
add sin(2*pi*season_prop) and cos(2*pi*season_prop) predictors,
where season_prop ranges from 0 to 1, or you can use a periodic
spline from the splines() package ...
before introduce in the model.

 I think you mean "remove the trend", and no, not necessarily.