[R] GLMM random effects
Natasha
natasha.lloyd at gmail.com
Thu Aug 19 03:49:46 CEST 2010
Hello,
I have a couple questions regarding generalized linear mixed models
specifically around fitting the random effects terms correctly to account
for any pseudo-replication.
I am reading through and trying to follow examples from Zuur et al. Mixed
Effects Models and Extensions in Ecology with R, but am still at bit unsure
if I am specifying the models correctly.
Background information:
Our study design: We used mark-recapture trapping to obtain density
estimates and demography of prairie dogs. The location of our study sites
are nested, we have 6 trapping plots within 3 colonies of prairie dogs.
Within each colony 3 plots are treatment (given supplemental food) and 3 are
control sites. Therefore, in total we have 18 study plots (9 control and 9
treatment).
Our study spans over two years and within each year we trapped prairie dogs
twice (Spring 2008, Summer 2008, Spring 2009, Summer 2009) for a total of
four trapping sessions. Therefore we also have temporal repeated measures in
our sampling design. From the mark-recapture data we estimated density using
Program DENSITY for each study plot and for each session (a total of 4
density estimates for each 18 plots over time). We also did vegetation
sampling to obtain estimates of the natural food available in each plot,
which gave us total biomass and % edible vegetation as covariates.
We are using the lme4 package in program R (2.11.1) for analysis:
We fitted a GLMM with Laplace restricted maximum likelihood estimation.
Since our response variable density is a count with overdispersion we used a
corrected poisson distribution with a log link function. And in order to
account for the nested and repeated measures in our design we want to
include Plot nested in Colony as random effects. The explanatory variables
include Treatment, Session, Total biomass, and/or %Edible food for the fixed
effects. (Colony, Plot, Treatment, and Session are all factor variables).
And an example of the R code that we started with is:
PDmodel_1 <- lmer(Density~1+Treatment+Session+Biomass+(1|Colony/Plot),
family=quasipoisson, data=DensityPD)
My main question is:
Does this accurately take into account our nested and repeated measures
design? Have we accounted for any possible pseudoreplication with this type
of analysis? Do I need to also look at type AR-1 error structures (or can I
do that in a glmm?) Or is there a simpler way you might suggest? I can also
look at the change in density between time intervals instead density at time
intervals if that makes anything easier to analyze? I can also split
Session into season and year if that is helpful too.
Any help, advice or guidance would be greatly appreciated. And if you need
any more information or clarification, please ask.
Thanks so much for your time and any advice in advance,
natasha
--
View this message in context: http://r.789695.n4.nabble.com/GLMM-random-effects-tp2330558p2330558.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list