pairwise_t_tests: Pairwise t-tests() returned in tidy dataframe

pairwise_t_testsR Documentation

Pairwise t-tests() returned in tidy dataframe

Description

This runs pairwise independent-samples t-tests (assuming unequal variance by default, but can be changed) and returns the results and effect sizes in a tidy dataframe. Beware: It will automatically omit missing values.

Usage

pairwise_t_tests(
  df,
  outcome,
  groups,
  p.adjust.method = p.adjust.methods,
  conf_level = 0.95,
  var_equal = FALSE
)

Arguments

df

A dataframe containing the outcome and grouping variable

outcome

The outcome variable in dataframe

groups

The grouping variable (each distinct value will be treated as a level)

p.adjust.method

The method to adjust p-values for multiple comparison (see p.adjust)

conf_level

confidence level of the interval.

var_equal

a logical variable indicating whether to treat the two variances as being equal. If TRUE then the pooled variance is used to estimate the variance otherwise the Welch (or Satterthwaite) approximation to the degrees of freedom is used.

Value

A tibble containing the results of the t-tests with one test per row, including a column ('apa') formatted for reporting

Examples

## Not run: 
pairwise_t_tests(mtcars, wt, cyl)

## End(Not run)

LukasWallrich/rNuggets documentation built on Aug. 26, 2022, 11:03 a.m.