[R] Equivalent of intervals() in lmer
Dieter Menne
dieter.menne at menne-biomed.de
Mon Apr 21 15:05:39 CEST 2008
Douglas Bates <bates <at> stat.wisc.edu> writes:
> If you want to examine the three means then you should fit the model as
> lmer(rcl ~ time - 1 + (1 | subj), fr)
>
True, but for the notorious "error bars" in plots that reviewers always request
the 0.35 is probable more relevant than the 1.87. Which I think is justified in
this case, but in most non-orthogonal designs with three or more factors, where
we have a mixture of between/withing subject, there is no clear solution. What
to do when required to produce "error-bars" that reasonably mirror p-values?
It's easier with British Journals in the medical field that often have
statistical professionals as reviewers, but many American Journals with their
amateur physician/statisticians (why no t-test on raw data?) drive me nuts.
Dieter
#-------------
library(lme4)
recall <- c(10, 13, 13, 6, 8, 8, 11, 14, 14, 22, 23, 25, 16, 18, 20,
15, 17, 17, 1, 1, 4, 12, 15, 17, 9, 12, 12, 8, 9, 12)
fr <- data.frame(rcl = recall, time = factor(rep(c(1, 2, 5), 10)),
subj = factor(rep(1:10, each = 3)))
fr.lmer <- lmer(rcl ~ time -1 +(1 | subj), fr)
summary(fr.lmer)
fr.lmer <- lmer(rcl ~ time +(1 | subj), fr)
summary(fr.lmer)
------------------
Fixed effects:
Estimate Std. Error t value
time1 11.000 1.879 5.853
time2 13.000 1.879 6.918
time5 14.200 1.879 7.556
Fixed effects:
Estimate Std. Error t value
(Intercept) 11.0000 1.8793 5.853
time2 2.0000 0.3507 5.703
time5 3.2000 0.3507 9.125
More information about the R-help
mailing list