[R] [spam] t.test confidence interval

Adrian Dusa dusa.adrian at gmail.com
Fri Apr 15 19:18:57 CEST 2005


On 15 Apr 2005 13:53:32 +0200, Peter Dalgaard <p.dalgaard at biostat.ku.dk> wrote:
> Adrian Dusa <dusa.adrian at gmail.com> writes:
> 
> > Hi,
> >
> > I'm using R for some undergraduate lectures, reaching the t tests.
> > No matter what conf.level one specifies in the syntax, the output always shows
> > the 95 percent confidence interval.
> 
> That's just not true in my version of R.

You're right of course. I just typed "cl" instead of "conf" or
"conf.level" and it took the predefined 0.95. Sorry to bothering you.
 
> >  t.test(extra ~ group, data = sleep, conf=.8)
> 
>         Welch Two Sample t-test
> 
> data:  extra by group
> t = -1.8608, df = 17.776, p-value = 0.0794
> alternative hypothesis: true difference in means is not equal to 0
> 80 percent confidence interval:
>  -2.7101645 -0.4498355
> sample estimates:
> mean in group 1 mean in group 2
>            0.75            2.33
> 
> > Is it possible to alter the function somehow, to report the CL percent
> > confidence interval?
> 
> --
>    O__  ---- Peter Dalgaard             Blegdamsvej 3
>   c/ /'_ --- Dept. of Biostatistics     2200 Cph. N
>  (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
> ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
>




More information about the R-help mailing list