tom soyer wrote:
> Hi,
>
> I am trying to find a function in R that would calculate the critical value
> of t for a given probability and df. For example, if p=5% and df=20, then
> does R have a function to calculate the t value? I tried:
>
>   
>> dt(0.05,df=20)
>>     
> [1] 0.3934718
>
> That doesn't look right to me. Could someone tell me what I was missing?
>
> Thanks,
>
>   
qt()

Notice that it gives only one tail (to the left by default), so you need
p/2 for two-sided tests.

-- 
   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