lme: predictions variance collapses when one more level is added
There is another way of looking at this. The data comprise a sample of size 17 from a multivariate (normal) distribution. The sample mean vector (4x1) and covariance matrix (4x4) can be calculated, and hypothesis tests about the population mean vector constructed (e.g. see text by Mardia, Kent and Bibby, or similar). I'm not sure whether this easily fits into the mixed model framework. Especially lme(r), which insist on having a single residual term added to everything.
On 25 Oct 2013, at 23:48, Ben Bolker <bbolker at gmail.com> wrote:
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.
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.