pairwise_t_tests | R Documentation |
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.
pairwise_t_tests(
data,
outcome,
groups = NULL,
p.adjust.method = p.adjust.methods,
conf_level = 0.95,
var_equal = FALSE,
na.rm = NULL
)
data |
A dataframe containing the outcome and grouping variable |
outcome |
The outcome variable in dataframe, or a formula of the form |
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 |
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. |
na.rm |
Logical. Should missing values be removed. If NULL, they are removed with a warning. |
A tibble containing the results of the t-tests with one test per row, including a column (apa
) formatted for reporting
## Not run:
pairwise_t_tests(mtcars, wt, cyl)
pairwise_t_tests(mtcars, wt ~ cyl)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.