lsr (version 0.5)

posthocPairwiseT: Post-hoc pairwise t-tests for ANOVA

Description

Performs pairwise t-tests for an analysis of variance, making corrections for multiple comparisons.

Usage

posthocPairwiseT(x,...)

Arguments

x

An aov objects

...

Arguments to be passed to pairwise.t.test

Value

As per pairwise.t.test

Warning

This package is under development, and has been released only due to teaching constraints. Until this notice disappears from the help files, you should assume that everything in the package is subject to change. Backwards compatibility is NOT guaranteed. Functions may be deleted in future versions and new syntax may be inconsistent with earlier versions. For the moment at least, this package should be treated with extreme caution.

Details

The intention behind this function is to allow users to use simple tools for multiple corrections (e.g., Bonferroni, Holm) as post hoc corrections in an ANOVA context, using the fitted model object (i.e., an aov object) as the input. The reason for including this function is that Tukey / Scheffe methods for constructing simultaneous confidence intervals (as per TukeyHSD) are not often discussed in the context of an introductory class, and the more powerful tools provided by the multcomp package are not appropriate for students just beginning to learn statistics.

This function is currently just a wrapper function for pairwise.t.test, and it only works for one-way ANOVA, but this may change in future versions.

See Also

pairwise.t.test, TukeyHSD, glht (in the multcomp package)

Examples

Run this code
# NOT RUN {
# create the data set to analyse: 	
dataset <- data.frame( 
            outcome = c( 1,2,3, 2,3,4, 5,6,7 ),
            group = factor(c( "a","a","a", "b","b","b","c","c","c")) 
           )

# run the ANOVA and print out the ANOVA table:
anova1 <- aov( outcome ~ group, data = dataset )
summary(anova1)

# Currently, the following two commands are equivalent:
posthocPairwiseT( anova1 )
pairwise.t.test( dataset$outcome, dataset$group )


# }

Run the code above in your browser using DataCamp Workspace