[R] how to find critical values of t in R
Peter Dalgaard
P.Dalgaard at biostat.ku.dk
Fri Nov 30 19:51:27 CET 2007
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
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list