svy_cohen_d_pair | R Documentation |
This function calculates a t.test() for two groups in a srvyr
survey
object. It is particularly helpful when the grouping variable has more than
two levels and you just want to compare two of them.
svy_cohen_d_pair(df, dv, iv, pair, ttest = T)
df |
A dataframe |
dv |
Character. Name of the dependent variable for the t.test (numeric) |
iv |
Character. Name of the grouping variable for the t.test (factor) |
pair |
Character vector of length 2. Levels of iv to be compared in t.test |
ttest |
Logical. Should t.test be run and displayed? Otherwise, only Cohen's d is calculated. Defaults to TRUE. |
Invisibly returns a list including the t.test() output and Cohen's d
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.