Skip to content
Prev 13510 / 20628 Next

comparing random effect variation between data sets

A couple of quick thoughts:

* as a crude test, you could get the profile confidence intervals
for the random-effect SDs in each model and compare them
* a more formal test would put both species into the same model
and allow for different variances.  This might work:

library(lme4)
library(gamm4)
alldat <- rbind(data.frame(species="X",speciesX),
                data.frame(species="Y",speciesY))

comb <- gamm4(distance ~ s(time,k=4,by=species),
                  random=~(1|CODE)+(dummy(species,"Y")|CODE))

You could test of comb against the model with just random=~(1|CODE),
or look at the confidence intervals of the second RE term.


On Thu, Jun 25, 2015 at 9:07 AM, John Morrongiello
<jrmorrongiello at gmail.com> wrote: