[R-sig-ME] help in GlmmPQL

Ben Bolker bbolker at gmail.com
Thu Sep 26 20:30:22 CEST 2013


xavier chevillot <chevillot.xavier at ...> writes:

> 
> Hello,
> My name is Xavier ,
> I have a problem with Glmm and I would like you to help me.
 
> My main objective is to explain the inter-annual abundance [in]
> variation of fish species with the environmental variables (as
> temperature, salinity, flow) and biological variables (abundance of
> different species of zooplankton) in the global warming contexte. I
> have 4 species of fish who are sampling each month at the same
> place,from 25 years. It is the same for the other variables.
 
> I use this type of models
 
> Mod1<-glmmPQL ( fish_1_abundance~ Temp+Salinity+Flow+zoo1+zoo2+zoo3,
    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.
 
> I have some questions?
> 
> The first is, is that this model answers exactly to my question?

   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?


> I want to know if the random effect 'years' take in count the
> fact that there are good abundance years and not good?

 yes, in principle
 
> Is it possible to add in this model a correlation term like 
> correlation=corARMA(p=1,q=2,form=~1|years)

  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 ...)
 
> How is it possible to take in count the seasonality of each variable?

  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 ...
 
> Is it better to extract the tendency of explicative’s variables
  before introduce in the model.

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



More information about the R-sig-mixed-models mailing list