The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
The groupcompare
package performs various statistical
tests to compare two independent or paired groups. It calculates
descriptive statistics, quantile statistics, and conducts normality and
variance homogeneity tests. Based on these assumption checks, it
provides results from t-test, Wilcoxon rank sum test, permutation tests,
and bootstrap confidence intervals.
You can install the latest version of groupcompare
from
CRAN using:
install.packages("groupcompare", repos="cloud.r-project.org", dep=TRUE)
Or install the development version from GitHub using:
::install_github("zcebeci/groupcompare") remotes
Some examples:
# Load package
library(groupcompare)
# Sample dataset in long format
set.seed(123)
<- rnorm(30, mean=50, sd=2)
group1 <- rnorm(30, mean=51, sd=3)
group2 <- data.frame(value=c(group1, group2), group=rep(c("A", "B"), each=30))
df
# Plot the groups
bivarplot(df)
# Compare the groups using various descriptive statistics
<- groupcompare(df, cl=0.95, alternative="two.sided",
result q=c(0.25, 0.5, 0.75), qt=0, R=5000, out=FALSE, verbose=TRUE)
print(result)
# Compare groups using Huber means with bootstrap
<- bootstrap(df, statistic=calchubermeandif,
bshubermean alternative="two.sided", alpha=0.05, R=5000)
print(bshubermean)
<- permtest(df, statistic=calchubermeandif,
permhubermean alternative="two.sided", R=10000)
print(permhubermean$pval)
-groupcompare(): Main function to compare the descriptive statistics of two groups. - descstats(): Computes common and robust descriptive statistics. - calcquantile(): Computes quantile statistics including Harrel-Davis estimator. - bootstrap(): Calculates bootstrap confidence intervals for descriptive statistics and user-defined statistics. - permtest(): Performs permutation tests for descriptive statistics and user-defined statistics. - ghdist(): Generates synthetic data simulating G&H distributions. - bivarplot(): Generates various plots for visualizing two-variable distributions.
This package is released under the GPL (>= 2) License.
If you use groupcompare
in your research or work, please
cite it as follows:
Cebeci, Z. Ozdemir, A. F., & Yildiztepe, E. (2025). groupcompare: Comparing Two Groups with Various Descriptive Statistics (Version 1.0.0). Available from https://CRAN.R-project.org/package=groupcompare
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.