Zembower, Kevin wrote:
> I'm trying to replicate some of the examples from my textbook in R (my
> text uses Minitab). In this problem, I'm trying to construct a 95%
> confidence interval for these distance measurements [1]:
>
>   
>> # Case Study 7.4.1, p. 483
>> x <- scan()
>>     
> 1:  62 52 68 23 34 45 27 42 83 56 40
> 12: 
> Read 11 items
>   
>> alpha<-.95
>> mean(x) + qt(c((1-alpha)/2, 1-((1-alpha)/2)), df=length(x)-1) * sd(x)
>>     
> / sqrt(length(x))
> [1] 36.21420 60.51307
>   
>
> Are confidence intervals with the t distribution constructed using this
> type of equation, or am I overlooking a more concise, 'canned' approach
> that's already been programmed? Any suggestions on simplifying this?
>
> Thanks for all your advice and help.
>   
You mean like t.test(x)?

-- 
   O__  ---- Peter Dalgaard             Ă˜ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - ([EMAIL PROTECTED])                  FAX: (+45) 35327907

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to