Description Usage Arguments Details Value Examples
View source: R/desCompareIndTwoGroups.R
gives a easy-to-read result of two independent group description and comparison analysis.
1 | desCompareIndTwoGroups(data, columns, group, ci = FALSE, n = 1000)
|
data |
a data.frame or tibble |
columns |
dependent variables needed to be test, could be either string or column index |
group |
the grouping variable, could be either string or column index |
ci |
a logical. Determine whether the ci of effect size should be calculated. Default is False |
n |
The number of replications to use for bootstrap to Calculate ci of effect size, default is 1000 (larger number will be very time-consuming). |
The comparison is based on the normality and variance quality. If the data don't meet normality, Mann-Whitney test will be conducted. Otherwise the student t-test would be conducted.
a data frame that contains description and comparison results.
y:
The dependent variable
group:
The name of group
n:
The number of sample in group used in the test
mean:
mean of tested dependent variable
sd:
standard deviation of tested dependent variable
median:
median of tested dependent variable
groupx_q1:
first quantile of tested dependent variable
groupx_q3:
third quantile of tested dependent variable
mad:
median absolute deviation (see ?MAD)
effect.size:
if method is t-test, calculate cohen's d effect size.If the t-test did not make a homogeneity of variance assumption, (the Welch test), the variance term will mirror the Welch test, otherwise a pooled estimate is used. Interpretation: 0.2 (small effect), 0.5 (moderate effect) and 0.8 (large effect). If method is Mann-Whitney,Wilcoxon effect size (r) will be calculated. Interpretation: 0.10 - < 0.3 (small effect), 0.30 - < 0.5 (moderate effect) and >= 0.5 (large effect).
effect.conf.low,effect.conf.high:
lower and upper bound of the effect size confidence interval.
1 2 | data("mtcars")
desCompareIndTwoGroups(data = mtcars, columns = -8, group = 8)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.