tadaatoolbox (version 0.17.0)

tadaa_pairwise_t: Extended Pairwise t-Tests

Description

This is an extension of stats::pairwise.t.test that's meant to deal with interactions our of the box, while also performing pairwise tests for the primary terms. The output of the function is modeled after stats::TukeyHSD, unfortunately without confidence intervals or test statistic though.

Usage

tadaa_pairwise_t(
  data,
  response,
  group1,
  group2 = NULL,
  p.adjust = "bonf",
  paired = FALSE,
  pool.sd = !paired,
  alternative = "two.sided",
  print = "df"
)

Arguments

data

A data.frame containing the variables.

response

The response variable, i.e. the dependent numeric vector.

group1

The grouping variables, typically a factor.

group2

(Optional) second grouping variable.

p.adjust

The p-adjustment method, see stats::p.adjust.methods, passed to stats::pairwise.t.test. Additionally, sidak is supported as a method, which is not the case with stats::p.adjust, as is sidakSD for the Sidak step-down procedure.

paired

Defaults to FALSE, also passed to stats::pairwise.t.test.

pool.sd

Defaults to the inverse of paired, passed to stats::pairwise.t.test.

alternative

Defaults to two.sided, also passed to stats::pairwise.t.test.

print

Print method, defaults to df for data.frame output, otherwise passed to pixiedust::sprinkle_print_method.

Value

A data.frame with columns term, comparison and adj.p.value.

References

https://stats.stackexchange.com/questions/20825/sidak-or-bonferroni

https://rdrr.io/rforge/mutoss/man/SidakSD.html

See Also

tadaa_pairwise_tukey()

Other Tadaa-functions: tadaa_aov(), tadaa_chisq(), tadaa_kruskal(), tadaa_levene(), tadaa_nom(), tadaa_one_sample(), tadaa_ord(), tadaa_pairwise_tukey(), tadaa_t.test(), tadaa_wilcoxon()

Examples

Run this code
# NOT RUN {
tadaa_pairwise_t(ngo, deutsch, jahrgang, geschl, p.adjust = "none", print = "console")
tadaa_pairwise_t(ngo, deutsch, jahrgang, geschl, p.adjust = "bonf", print = "console")
tadaa_pairwise_t(ngo, deutsch, jahrgang, geschl, p.adjust = "sidak", print = "console")
# }

Run the code above in your browser using DataLab