Skip to content
Prev 8329 / 20628 Next

multiple variance structure in lmer giving zero variances

Sara Krause <skkrause at ...> writes:
(I can understand your desperation, but please don't cross-post ...
I almost answered this on r-help with a suggestion that you try
on r-sig-mixed instead.)
[snipped from below]:
In general, categorical predictors should not appear in both
the fixed and random parts of the model -- that constitutes overfitting.

Depending on the structure of your data you should also strongly
consider including interactions between treatment and your random
factors (see Schielzeth, Holger, and Wolfgang
Forstmeier. 2009. ?Conclusions Beyond Support: Overconfident Estimates
in Mixed Models.? Behavioral Ecology 20 (2):416?420.
doi:10.1093/beheco/arn145.
http://www.ncbi.nlm.nih.gov/pubmed/19461866.).  However, you can only
include treatment interactions that make sense. It sounds like each
individual is allocated to a single treatment, so (guessing that your
statistician means that you want the *interactions* of ID with state
and season) I think you should probably use

y~trt*season*state*site+(state|ID)+(0+season|ID)

which includes a random effect of state, a state:ID interaction
(variation of the state effect among individuals), and a season:ID
interaction (variation of seasonal effect among individuals).

  Why are you moving to lmer? is it so that you can handle the
separate effects of state:ID and season:ID ?
I'm mostly going to postpone comment on your second question until
your first question is sorted out, although I would also encourage you
to see if your heteroscedasticity problem might be handled by transformation --
most typically, if treatment increases both the mean and variance a lot,
then log transforming the data might take care of the problem with less
hassle ...
Your basic problem here is that it doesn't make sense to test the interaction
of treatment with ID (as you have effectively done here), because each
individual is only in one treatment category ...