# How to calculate 95% confidence interval for the differences of means in R? [closed]

Here I described my general situation. How to calculate 95%CI between means in R?

• You may want to reiterate the details of your design on this question. Is your design repeated measures or between subjects? Are you going to assume normally distributed errors? Commented Sep 26, 2011 at 0:40
• @Jeromy Anglim: thanks for your questions :)! Here I was answered that my design is one way RM ANOVA. And it is within-subject as far as I understand... And I want to calculate 95%CI instead of post hoc tests...
– abc
Commented Sep 26, 2011 at 3:11
• ...as here @John advised me to "report the standard confidence intervals of the effects in question". Jeromy, I have a counter-question: the term within (and/or between)-subject design is more general than, for instance, ANOVA or RM ANOVA and so on, isn't it?
– abc
Commented Sep 26, 2011 at 3:11
• I guess I'm trying to set the question title and the text of this question to stand alone for future readers. Thus, I think the title of this question and the content should make it clear what kind of confidence interval you are interested in. The two most common confidence interval scenarios for comparing means are probably those for repeated measures t-test and independent groups t-test, hence my question. Commented Sep 26, 2011 at 3:31
• @Jeromy: please suspend the question. I have to think about the modification...
– abc
Commented Sep 26, 2011 at 4:05

t1 <- t.test( A, B, paired = TRUE )
t1$estimate # the effect in question t1$conf.int # the confidence interval of the effect