[R-sig-ME] lme: predictions variance collapses when one more level is added
Ben Bolker
bbolker at gmail.com
Sat Oct 26 00:48:23 CEST 2013
Dieter Menne <dieter.menne at ...> writes:
>
> I have a simple mixed-model, with predictive factor treat (levels M1,M2,M3,
> M4), continuous par, and a grouping variable subj from a cross-over
> experiment.
>
> Everything works as expected when I only use M1, M2, M3; see subset.lme
> below. The residuals are well distributed;
> resid(.,type="p")~fitted(.)|treat
>
> When I add level M4 (all.lme below), the variance of the
> predictions shrinks
> to almost zero. I know that level M4 adds heteroscedasticity, so I tried
> with varPower(); this corrects for the residual, but the fitted() appear
> nonsensical.
Sorry for snipping context here (I'm posting via gmane, which doesn't
like that). If I use weights=varIdent(form=~1|treat)) rather than
weights=varPower() (i.e. residual variance varies by treatment group,
rather than as a power function of the estimated mean), I get what
seem (at least at a quick glance) to be reasonable results.
More information about the R-sig-mixed-models
mailing list