Skip to contents

Use with caution as this is still being tested. This function generates confidence intervals for the mean differences between groups.

Usage

resample_differences(data, alpha = 0.05, M = 1000)

Arguments

data

Data.frame with the first column the values and the second column the group names

alpha

Significance for confidence intervals, defaults to 0.05

M

Numeric. Number of resample iterations.

Value

Table with the mean differences, confidence intervals and other information

Examples

data <- data.frame(
  "value" = c(rnorm(14, sd = 2), rnorm(6), rnorm(20, mean = 2)),
  "group" = c(rep("A", 14), rep("B", 6), rep("C", 20))
)
# Be sure to increase M for real use cases
resample_differences(data, M = 50)
#>           diff        upr         lwr        se
#> B-A -0.7145971 -1.3899898 -0.03732177 0.3526131
#> C-A  1.2083732  0.1119246  2.09515617 0.3582459
#> C-B  1.9229703  1.6574336  2.29759333 0.1853490