Ttestrategrouppadjustmethodbonferroni coefficients

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ne 2 at an overall α level error rate. 60 70 – For this correction, we can multiply each regular pairwise t-test p-value by the number of tests to get the adjusted p-value. C F P – Then, compare each adjusted p-value to α. 21 22 In R, we can use the ‘pairwise.t.test’ function to do all pairwise comparisons. Looking back at the individual t-tests comparing F and P to the baseline group C: > summary(lm.out) ## R Documentation: ‘pairwise.t.test’ ## Calculate pairwise comparisons between group levels ## with corrections for multiple testing > pairwise.t.test(rate,group,p.adjust.method="bonferroni") Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 82.524 2.378 34.709 <2e-16 *** groupF 8.801 3.362 2.617 0.0123 * groupP -9.041 3.362 -2.689 0.0102 * Pairwise comparisons using t tests with pooled SD data: We see that the adjusted p-values (below) are just 3 times the individual test-wise p-values above. rate and group C F F 0.037 P 0.031 1.2e-05 > pairwise.t.test(rate,group,p.adjust.method="bonferroni") P value adjustment method: bonferroni All three p-values are compared against α =0.05, and in this case, ALL groups are significantly different from each other. Pairwise comparisons using t tests with pooled SD data: rate and group C F F 0.037 P 0.031 1.2e-05 The probability that we have falsely rejected H0 for 1 or more of these 3 tests is ≤ 0.05. Plus, we get the comparison of Friends vs. Pet in the all-pairwise-comparisons statement. 23 24 You can change which group level is the baseline if this is useful to you. There are also other multiple comparison adjustments available in pairwise.t.test(). Here’s the original, in alphabetical order: > pairwise.t.test(rate,group,p.adjust.method="bonferroni") > contrasts(group) FP C00 F10 P01 Other options: > levels(group) [1] "C" "F" "P" Here’s commands to switch Pet to the baseline: ## Reassign baseline as the third level: > contrasts(group)=contr.treatment(levels(group),base=3) > contrasts(group) CF C10 F01 P00 25 holm hochberg hommel bonferroni BH BY fdr none 26...
View Full Document

This note was uploaded on 06/12/2013 for the course MATHEMATIC MAT7870 taught by Professor Sun during the Winter '13 term at Wayne State University.

Ask a homework question - tutors are online