Skip to content

a confidence interval from an ANOVA model

2 messages · Erin Hodgess, Eik Vettorazzi

#
Dear R People:
I have a data set with trt and resp:
trt resp
A 23
A 28
A 37
A 30
B 37
B 44
B 31
B 35
C 42
C 47
C 52
C 38

And I did read.table, constructed an aov object and ran the summary on
the aov object.  I also ran the TukeyHSD function.  All is well so
far.
My question is:  is there a way to put together a confidence interval
from the aov object on a particular mean, please?  It seems like there
should be.

Thanks,
Have a great night/day,
Sincerely,
Erin
1 day later
#
Hi Erin,
how about this:

dta<-read.table(textConnection("trt resp
A 23
A 28
A 37
A 30
B 37
B 44
B 31
B 35
C 42
C 47
C 52
C 38"),header=T)

summary(ano<-aov(resp~trt,dta))
ano0<-update(ano,.~.+0)
confint(ano0)
# and the corresponding means are
coef(ano0)

# or use the effects package
library(effects)
summary(allEffects(ano))

hth.

Am 20.01.2013 03:11, schrieb Erin Hodgess: