t_test {tidycomm} | R Documentation |
Compute t-tests
Description
Computes t-tests for one group variable and specified test variables. If no variables are specified, all numeric (integer or double) variables are used. A Levene's test will automatically determine whether the pooled variance is used to estimate the variance. Otherwise the Welch (or Satterthwaite) approximation to the degrees of freedom is used.
Usage
t_test(
data,
group_var,
...,
var.equal = TRUE,
paired = FALSE,
pooled_sd = TRUE,
levels = NULL,
case_var = NULL,
mu = NULL
)
Arguments
data |
|
group_var |
group variable (column name) to specify where to split two samples (two-sample t-test) or which variable to compare a one-sample t-test on |
... |
test variables (column names). Leave empty to compute t-tests for all numeric variables in data. Also leave empty for one-sample t-tests. |
var.equal |
this parameter is deprecated (previously: a logical variable indicating whether to treat the two
variances as being equal. If |
paired |
a logical indicating whether you want a paired t-test. Defaults
to |
pooled_sd |
a logical indicating whether to use the pooled standard
deviation in the calculation of Cohen's d. Defaults to |
levels |
optional: a vector of length two specifying the two levels of the group variable. |
case_var |
optional: case-identifying variable (column name). If you
set |
mu |
optional: a number indicating the true value of the mean in the
general population ( |
Value
a tdcmm model
Examples
WoJ %>% t_test(temp_contract, autonomy_selection, autonomy_emphasis)
WoJ %>% t_test(temp_contract)
WoJ %>% t_test(employment, autonomy_selection, autonomy_emphasis,
levels = c("Full-time", "Freelancer"))
WoJ %>% t_test(autonomy_selection, mu = 3.62)