paircompTwoWay: Pairwise Comparisons for Two Way Layout

View source: R/paircompTwoWay.R

paircompTwoWayR Documentation

Pairwise Comparisons for Two Way Layout

Description

paircompTwoWay is a generic function for pairwise comparisons by adjusting p-values.

Usage

## S3 method for class 'twt'
paircompTwoWay(x, adjust.method = c("bonferroni", "holm", "hochberg", "hommel", "BH", 
  "BY", "fdr", "none"), verbose = TRUE, ...)

Arguments

x

a twt object.

adjust.method

Method for adjusting p values (see p.adjust). Default is set to "bonferroni".

verbose

a logical for printing output to R console.

...

Additional arguments affecting multiple comparisons of groups in two-way independent designs.

Details

The paircompTwoWay function makes pairwise comparisons depending on significance of interaction term. It calculates p-values with corresponding same test if the interaction term is not statistically significant. Otherwise, it calculates p-values with st.test after two-way ANOVA, wt.test after two-way ANOVA under heteroscedasticity and mw.test after other tests. Then, it adjusts p-values with p.adjust.

Value

Returns a data.frame of output.

Author(s)

Muhammed Ali Yilmaz, Osman Dag

Examples


library(twowaytests)
data(alveolar)

out <- aovTwoWay(cell ~ ovalbumin*treatment, data = alveolar)
paircompTwoWay(out)

out <- aovTwoWay(cell ~ treatment*ovalbumin, data = alveolar)
paircompTwoWay(out)

out <- aovTwoWay(cell ~ ovalbumin*treatment, data = alveolar, alpha = 0.10)
paircompTwoWay(out)

out <- aovTwoWay(cell ~ treatment*ovalbumin, data = alveolar, alpha = 0.10)
paircompTwoWay(out)
paircompTwoWay(out, adjust.method = "hochberg")


twowaytests documentation built on March 31, 2023, 9:26 p.m.