catindri
catindri

Reputation: 384

R Bonferroni correction on tsum.test

Hye,

I have a table with summary data of nb. individus, mean and sd. I cannot work with rawdata because of numerous NA (I cannot replace with 0), and I cannot conduct pairwise comparison nor Anova. So I choose t.test with tsum.test from BSDA package.

data
nbind  mean  sd
59     4.46   1.81
14     5.19    1.56
tsum.test(data[1,2],data[1,3], data[1,1],data[2,2],data[2,3], data[2,1])

this gives a result such as

    Welch Modified Two-Sample t-Test
data:  Summarized x and y
t = -1.5088, df = 22.126, p-value = 0.1455
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -1.7154745  0.2702718
sample estimates:
mean of x mean of y 
 4.467875  5.190476 

My problem is :"how can I apply a Bonferonni adjustement with this tsum.test?" How to modify the p value? a sort of equivalent of p.adjust.method

I tried, but this does not work (I put n=2 for 2 comparisons, but I get 12 comparison in my real dataset)

tsum.test(data[1,2],data[1,3], data[1,1],data[2,2],data[2,3], data[2,1],conf.level=(p.adjust(0.95,method="bonferroni", n=2)))

Thanks to all

Upvotes: 1

Views: 627

Answers (0)

Related Questions