Description Usage Arguments Value Examples
Tests if the mean difference between two groups of a quantitative variable is statiscally significant. In order to do so, it first tests if in both groups the quantitative variable is normally distributed, if this is the case then a independent sample t test takes place (in this case it is also computed the Levene test for equal variance between groups). If the hypothesis of normallity is rejected (p.value <= 1-confi) for at least one of the groups, then the wilcox rank sum test takes place. NOTE: both tests (t test and wilcox rank sum test) have as null hypothesis that the quantitative groups' mean do not differ between groups.
Tests if the mean difference between two groups of a quantitative variable is statiscally significant. In order to do so, it first tests if in both groups the quantitative variable is normally distributed, if this is the case then a independent sample t test takes place (in this case it is also computed the Levene test for equal variance between groups). If the hypothesis of normallity is rejected (p.value <= 1-confi) for at least one of the groups, then the wilcox rank sum test takes place. NOTE: both tests (t test and wilcox rank sum test) have as null hypothesis that the quantitative groups' mean do not differ between groups.
1 2 3 | test_equality_between_groups(df, categorical, quantitative, confi = 0.95)
test_equality_between_groups(df, categorical, quantitative, confi = 0.95)
|
df |
A data frame. |
categorical |
The quoted name of the column which contains the group variable. |
quantitative |
The quoted name of the column which contains the quantitative variable to be compared between groups. |
confi |
Confidence level. |
df |
A data frame. |
categorical |
The quoted name of the column which contains the group variable. |
quantitative |
The quoted name of the column which contains the quantitative variable to be compared between groups. |
confi |
Confidence level. |
If both groups have the quantitative variable normally distributed it is returned a list with the normality, Levene and t test1s results. Otherwise, it is returned the normality and Wilcox test's results.
If both groups have the quantitative variable normally distributed it is returned a list with the normality, Levene and t test1s results. Otherwise, it is returned the normality and Wilcox test's results.
1 2 3 | test_equality_between_groups(df=data, categorical="blood_type", quantitative="pressure",confi=0.99)
test_equality_between_groups(df=data, categorical="blood_type", quantitative="pressure",confi=0.99)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.