[R-sig-ME] interpreting random effects

Ben Bolker bbolker at gmail.com
Mon Apr 2 17:42:09 CEST 2012


Keith Larson <keith.larson at ...> writes:

> 
> I have have measured the trait frequency for a "mountain" associated
> allele across a number of sites and years. In my (glmer) model I have
> summarized the allele frequency by site and year as the dependent
> (binomial) variable and specified site and year as random effects. The
> fixed effects are latitude, longitude, altitude, and
> latitude|longitude. When I run the model and then drop and update each
> random effect separately to see if they are important to the model,
> site appears to be significant and year does not. Two questions:
> 
> 1. Can I re-summarize my dependent variable for by site rather than
> site and year?

  You certainly *can*.  What is your goal in presenting this summary?

> 2. Given that we did not sample each site the same number of times
> (years) and have different numbers of samples at each site (and year),
> should I standardize my dependent variable?

  Depending on your answer to the question above, I would guess that
the best predictor of allele frequency at a given site would be the
prediction based on the fixed effects, plus the random effect of site
(back-transformed from the scale of the linear predictor (log or logit)
to the frequency scale, of course).
Leaving year in the model, but setting its prediction to zero, should
give you a reasonable measure of "expected allele frequency at site X
in a randomly chosen year", and should handle the unequal weighting.




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