svy_pairwise_t_test: Pairwise t.tests with effect sizes and survey weights

View source: R/stat_tests.R

svy_pairwise_t_testR Documentation

Pairwise t.tests with effect sizes and survey weights

Description

This function calculates a t.test() for any pair of levels in a srvyr survey object. It does currently not do any p-value adjustment for multiple comparisons, and print rather than returns the results.

Usage

svy_pairwise_t_test(data, dv, iv, cats, p.adjust = "holm", ...)

Arguments

data

A survey object

dv

Character. Name of the dependent variable for the t.test (numeric)

iv

Character. Name of the grouping variable for the t.test (factor)

cats

Character vector of factor levels to be included in the pairwise tests. If set to NULL, all levels are used.

p.adjust

Method to adjust p-values for multiple comparisons. One of "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr" or "none".

...

Arguments passed on to svy_cohen_d_pair

ttest

Logical. Should t.test be run? Otherwise, only Cohen's d is calculated. Defaults to TRUE.

print

Logical. Should results be printed.

Value

A tibble with t-test results and Cohen's d for each pair


LukasWallrich/timesaveR documentation built on Nov. 29, 2024, 4:47 a.m.