[R] calculating p-values from t-values for a Bonferroni adjustment
NativeBuff2003
NativeBuff2003 at yahoo.com
Tue Jul 28 04:41:30 CEST 2009
>
Ben Bolker wrote:
>
>
>
> NativeBuff2003 wrote:
>>
>> I am performing a sequential bonferroni adjustment on the results of an
>> ANCOVA but the equation I have for calculating p-values from the t-values
>> is not working. I can't seem to find it anywhere else. This is the code
>> I have now: 2*(1-pt(t,df)) where t=t-value and df=degrees of freedom from
>> the ANCOVA. Is there an error in the code? maybe another way to find the
>> p-values? Help!
>>
>
> Please tell us what "not working" means and give a reproducible (?)
> example, etc., as discussed
> in the posting guide. Perhaps you have redefined the pt() function by
> accident?
>
> Works fine for me, e.g.
>
>> 2*(1-pt(2,10))
> [1] 0.07338803
>
> 2*pt(abs(x),df,lower.tail=FALSE) would be slightly more general/accurate.
>
> Ben Bolker
>
>
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
-Emily
--
View this message in context: http://www.nabble.com/calculating-p-values-from-t-values-for-a-Bonferroni-adjustment-tp24689680p24691614.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list