I would use lme, which can certainly handle this and give you estimates of
the variance components (not the MSE). There are similar examples in
J. C. Pinheiro and D. M. Bates (2000), "Mixed-Effects Models in S and
S-PLUS", Springer, ISBN 0-387-98957-0
explained using lme.
On Thu, 28 Aug 2003 Graham.Higgerson@csiro.au wrote:
> I have an experiment where cross-sections of cotton fibres are measured for
> several parameters. There are a variable number of cross-sections per slide
> and a number of slides per sample. Since the number of cross-sections per
> slide varies greatly the design is unbalanced. The slides are treated as
> random effects. For subsequent measurements we want to be able to establish
> the most efficient way to obtain an estimate of the mean with a particular
> variance. That is, we want to establish the number of cross-sections per
> slide and the number of slides necessary to get a particular sample
> variance. My standard stats tell me that s(sup2)(suby)=s(sup2)(sub1)/n1 +
> s(sup2)(sub2)/(n1*n2) but I am not sure how to get the between and within
> estimates of variance. Varcomp will provide values if I set is.random=TRUE
> for the data frame but these results, apart from occasionally being
> negative, do not seem to agree with the MSE values generated by ssType3 for
> the between component. S+ v6.0 release 2 does not seem to be able to handle
> unbalanced designs with random effects - or so it says. Can S+ help me or am
> I in way too deep?
--
Brian D. Ripley, ripley@stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
|