This is wrapper to the pairwise.t.test function. The p-value adjustment is "bonferroni" by default. Other possible values are "holm", "hochberg", "hommel", "BH", "BY", "fdr", "none". See stats::p.adjust().

pairwise_t_test(formula, data, p_adj = "bonferroni")

Arguments

formula

A two sided formula with one variable on either side, e.g. y ~ x, where the left hand side, dependent, variable is a numeric variable in data and the right hand side, independent, variable is a categorical or factor variable in data.

data

A data frame that contains the dependent and independent variables.

p_adj

The p-value adjustment method (see Description).

Value

An object of class pairwise.htest as returned by stats::pairwise.t.test().

Examples

data_df <- dplyr::mutate(vizverb, IV = interaction(task, response))
pairwise_t_test(time ~ IV, data = data_df)
#> 
#> 	Pairwise comparisons using t tests with pooled SD 
#> 
#> data:  y and x 
#> 
#>               verbal.verbal visual.verbal verbal.visual
#> visual.verbal 0.0790        -             -            
#> verbal.visual 1.0000        0.0166        -            
#> visual.visual 0.0044        2.9e-07       0.0241       
#> 
#> P value adjustment method: bonferroni