[R] Confidence interval

detlef.steuer@unibw-hamburg.de detlef.steuer at unibw-hamburg.de
Wed Nov 22 22:53:32 CET 2000


Good evening!

On 22-Nov-00 gbrajovic at entelchile.net wrote:
> 
> I have this question I hope you can answer. First, lets see this simple
> example, using the Student's t-test:
> 
> 
>> test<-t.test(miTest.data, mu=0.5, conf.level=0.90 )
>> test
> 
>          One Sample t-test 
> 
> data:  miTest.data 
> t = 0.5222, df = 9, p-value = 0.6141 
> alternative hypothesis: true mean is not equal to 5 
> 90 percent confidence interval:
>  3.744928 7.255072 
> sample estimates:
> mean of x 
>       5.5 
> 
> The question is: what kind of expression should I use to get the confidence
> interval? That is, what expression should <exp> be, so
> 
>> confInterval <- <exp>
>> cinfInterval
> [1] 3.744928 7.255072

Try

confInterval <- t.test(miTest.data, mu=0.5, conf.level=0.90)$conf.int[1:2]

Details are found in help(t.test)

Happy R´ing!
Detlef

----
Detlef Steuer ** Universität der Bw ** 22043 Hamburg
steuer at unibw-hamburg.de

Th. Adorno: "Die Neigung zum Okkultismus ist ein Symptom der Rückbildung des
Bewusstseins."


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list