[R] calculating p-values from t-values for a Bonferroni adjustment

Dieter Menne dieter.menne at menne-biomed.de
Tue Jul 28 08:50:43 CEST 2009




NativeBuff2003 wrote:
> 
> 
> Sorry I'm new to the list and not great with R. My advisor performed
> several for me but I am getting a different output when I try to reproduce
> it.
> 
>> 2*(1-pt(-3.59,598))
> 0.000358 <-his answer
> [1] 1.999642 <-my answer
> 
> I was working with a different data set in the following but the answer
> doesn't fit.
>> 2*(1-pt(-5.542,389))
> [1] 2 <- my answer
> 
> 

I assume that "his answer" was generated not by the same code, but from what
(s)he looked up in the table. Note that your result = 2-her result, and
compare the output from the code below.

Dieter

2*(pt(abs(-3.59),598,lower.tail=TRUE))
2*(pt(-3.59,598,lower.tail=TRUE))
2*(pt(abs(-3.59),598,lower.tail=FALSE))
2*(pt(-3.59,598,lower.tail=FALSE))


-- 
View this message in context: http://www.nabble.com/calculating-p-values-from-t-values-for-a-Bonferroni-adjustment-tp24689680p24693461.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list