diff --git a/R/003_pvalues_and_permutation_test_tools.R b/R/003_pvalues_and_permutation_test_tools.R
index 33e2282..fabb43c 100644
--- a/R/003_pvalues_and_permutation_test_tools.R
+++ b/R/003_pvalues_and_permutation_test_tools.R
@@ -92,6 +92,7 @@ PermutationTest <- function(control,
return(perm_results)
}
+
#' Generates statistical test results for possible hypothesis testings.
#'
#' This function returns a list that include statistical test results:
@@ -239,6 +240,7 @@ pvals_statistics <- function(control,
return(pvals_stats)
}
+
#' Generates collated permutaion test results and statistical test results.
#'
#' This function returns a tibble (list) that includes statistical test results:
@@ -266,7 +268,6 @@ Pvalues_statistics <- function(dabest_object,
effect_size_type) {
permtest_pvals <- tibble::tibble()
- # check if effect size function is supplied
if (is.null(ef_size_fn)) {
stop("No effect size calculation methods are supplied.")
}
@@ -303,10 +304,8 @@ Pvalues_statistics <- function(dabest_object,
tests <- group[2:group_length]
for (test_group in tests) {
- test_group <- test_group
test_tibble <- raw_data %>%
dplyr::filter(!!enquo_x == !!test_group)
-
test_measurement <- test_tibble[[quoname_y]]
xlabels <- paste(test_group, group[1], sep = "\nminus\n")
@@ -326,6 +325,19 @@ Pvalues_statistics <- function(dabest_object,
)
# calculate p values
+ # If minimeta is TRUE, perform minimeta permutation test
+ if (isTRUE(minimeta)) {
+ permutations <- PermutationTest_result$permutations
+ permutations_var <- PermutationTest_result$permutations_var
+ permutations_weighted_delta <- calculate_minimeta(permutations, permutations_var)
+
+ threshold <- abs(es)
+ pvalue_minimeta <- calculate_minimeta_pvalue(permutations_weighted_delta, threshold, perm_count)
+
+ PermutationTest_result$pvalue <- pvalue_minimeta
+ PermutationTest_result$weighted_delta <- permutations_weighted_delta
+ }
+
pvals_and_stats <- pvals_statistics(ctrl_measurement,
test_measurement,
is_paired = is_paired,
@@ -360,7 +372,6 @@ Pvalues_statistics <- function(dabest_object,
test_tibble <- raw_data %>%
dplyr::filter(!!enquo_x == !!test_group)
test_measurement <- test_tibble[[quoname_y]]
-
xlabels <- paste(test_group, control_group, sep = "\nminus\n")
control_test_measurement <- list(
@@ -390,7 +401,20 @@ Pvalues_statistics <- function(dabest_object,
random_seed = 12345,
ef_size_fn = ef_size_fn
)
- # calculate p values
+
+ # If minimeta is TRUE, perform minimeta permutation test
+ if (isTRUE(minimeta)) {
+ permutations <- PermutationTest_result$permutations
+ permutations_var <- PermutationTest_result$permutations_var
+ permutations_weighted_delta <- calculate_minimeta(permutations, permutations_var)
+
+ threshold <- abs(es)
+ pvalue_minimeta <- calculate_minimeta_pvalue(permutations_weighted_delta, threshold, perm_count)
+
+ PermutationTest_result$pvalue <- pvalue_minimeta
+ PermutationTest_result$weighted_delta <- permutations_weighted_delta
+ }
+
pvals_and_stats <- pvals_statistics(ctrl_measurement,
test_measurement,
is_paired = is_paired,
@@ -398,7 +422,6 @@ Pvalues_statistics <- function(dabest_object,
effect_size = effect_size_type
)
-
pval_row <- list(
control_group = control_group,
test_group = test_group,
@@ -416,3 +439,53 @@ Pvalues_statistics <- function(dabest_object,
return(list(permtest_pvals = permtest_pvals))
}
+
+#' Calculate Weighted Delta for Mini-Meta Analysis
+#'
+#' This function calculates the weighted delta across multiple groups for a mini-meta analysis.
+#' The weights are determined by the inverse of the variance of the permutations for each group.
+#' The function returns the weighted average delta for each permutation.
+#'
+#' @param permutations A matrix where each row represents a group, and each column represents a permutation.
+#' @param permutations_var A matrix of the same dimensions as `permutations`, containing the variances of each group for each permutation.
+#'
+#' @return A numeric vector representing the weighted delta for each permutation.
+#' @noRd
+calculate_minimeta <- function(permutations, permutations_var) {
+ #check if the permutations and permutations_var are of the same length
+ if (length(permutations) != length(permutations_var)) {
+ stop("The permutations and permutations_var are not of the same length.")
+ }
+
+ if (length(permutations) == 0) {
+ stop("The permutations and permutations_var are empty.")
+ }
+ all_num <- numeric(length(permutations))
+ all_denom <- numeric(length(permutations))
+
+ # Loop through each permutation
+ weight <- 1/permutations_var
+ all_num <- weight * permutations
+ all_denom <- sum(weight)
+ # Calculate the weighted delta
+ output <- all_num / all_denom
+ return(output)
+}
+
+
+#' Calculate P-value for Weighted Delta in Mini-Meta Analysis
+#'
+#' This function calculates the p-value for the weighted delta in a mini-meta analysis.
+#' The p-value is computed based on the number of weighted deltas that exceed a given threshold.
+#'
+#' @param permutations_weighted_delta A numeric vector of weighted deltas for each permutation.
+#' @param threshold A numeric value representing the threshold for significance.
+#' @param permutation_count An integer representing the total number of permutations performed.
+#'
+#' @return A numeric value representing the p-value.
+#' @noRd
+calculate_minimeta_pvalue <- function(permutations_weighted_delta, threshold, permutation_count) {
+ count <- sum(abs(permutations_weighted_delta) > threshold)
+ pvalue <- count / permutation_count
+ return(pvalue)
+}
diff --git a/R/005_printing.R b/R/005_printing.R
index f635188..5fd6cf9 100644
--- a/R/005_printing.R
+++ b/R/005_printing.R
@@ -95,8 +95,7 @@ print_each_comparism_effectsize <- function(dabest_object, effectsize) {
bca_low <- round(dabest_object$boot_result$bca_ci_low, 3)
bca_high <- round(dabest_object$boot_result$bca_ci_high, 3)
ci <- dabest_object$boot_result$ci
- pvalue <- dabest_object$permtest_pvals$pval_for_tests
-
+ pvalue <- dabest_object$permtest_pvals$pval_permtest
if (is.null(paired)) {
rm_status <- ""
} else if (paired == "sequential") {
@@ -147,7 +146,7 @@ print_each_comparism_effectsize <- function(dabest_object, effectsize) {
current_bca_low <- bca_low[i]
current_bca_high <- bca_high[i]
current_ci <- ci[i]
- current_pval <- pvalue[i]
+ current_pval <- as.numeric(pvalue[i])
cat(stringr::str_interp("The ${paired_status} ${es} between ${current_group} and ${previous_group} is ${current_difference} [${current_ci}%CI ${current_bca_low}, ${current_bca_high}].\n"))
cat(stringr::str_interp("The p-value of the two-sided permutation t-test is ${sprintf(current_pval, fmt = '%#.4f')}, calculated for legacy purposes only."))
diff --git a/R/999_plot_palettes.R b/R/999_plot_palettes.R
index 5d17c4a..d335d56 100644
--- a/R/999_plot_palettes.R
+++ b/R/999_plot_palettes.R
@@ -20,7 +20,7 @@ apply_palette <- function(ggplot_object, palette_name) {
"ucscgb" =
ggplot_object + ggsci::scale_color_ucscgb() + ggsci::scale_fill_ucscgb(),
"d3" =
- ggplot_object + ggsci::scale_color_d3() + ggsci::scale_fill_d3(),
+ ggplot_object + ggsci::scale_color_d3(palette = "category20") + ggsci::scale_fill_d3(palette = "category20"),
"locuszoom" =
ggplot_object + ggsci::scale_color_locuszoom() + ggsci::scale_fill_locuszoom(),
"igv" =
diff --git a/_pkgdown.yml b/_pkgdown.yml
index 5f2e7ed..b0e78a3 100644
--- a/_pkgdown.yml
+++ b/_pkgdown.yml
@@ -53,7 +53,7 @@ authors:
Kah Seng Lian:
href: https://github.com/sunroofgod
Zhuoyu Wang:
- href: ~
+ href: https://github.com/Lucas1213WZY
Jun Yang Liao:
href: https://github.com/junyangliao
ACCLAB:
diff --git a/tests/testthat/_snaps/001_plotter/deltadelta-mean-diff.svg b/tests/testthat/_snaps/001_plotter/deltadelta-mean-diff.svg
index 7ed51d6..d772cdb 100644
--- a/tests/testthat/_snaps/001_plotter/deltadelta-mean-diff.svg
+++ b/tests/testthat/_snaps/001_plotter/deltadelta-mean-diff.svg
@@ -34,152 +34,152 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-2
-3
-4
-5
-
-
-
-
-W Placebo
-N = 10
-M Placebo
-N = 10
-W Drug
-N = 10
-M Drug
-N = 10
-value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2
+3
+4
+5
+
+
+
+
+W Placebo
+N = 10
+M Placebo
+N = 10
+W Drug
+N = 10
+M Drug
+N = 10
+value
-
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
--2
--1
-0
-1
-
-
-
-
-
-
-
-
-
--2
--1
-0
-1
-M Placebo
-minus
-W Placebo
-M Drug
-minus
-W Drug
-delta-delta
-Mean difference
-delta-delta
+
+-2
+-1
+0
+1
+
+
+
+
+
+
+
+
+
+-2
+-1
+0
+1
+M Placebo
+minus
+W Placebo
+M Drug
+minus
+W Drug
+delta-delta
+Mean difference
+delta-delta
@@ -189,10 +189,12 @@
-
-
-
-M
-W
+
+
+
+
+
+M
+W
diff --git a/tests/testthat/_snaps/001_plotter/minimeta-mean-diff.svg b/tests/testthat/_snaps/001_plotter/minimeta-mean-diff.svg
index 4e916f2..17cbc01 100644
--- a/tests/testthat/_snaps/001_plotter/minimeta-mean-diff.svg
+++ b/tests/testthat/_snaps/001_plotter/minimeta-mean-diff.svg
@@ -28,241 +28,241 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-2
-3
-4
-5
-
-
-
-
-Control 1
-N = 20
-Test 1
-N = 20
-Control 2
-N = 20
-Test 2
-N = 20
-Control 3
-N = 20
-Test 3
-N = 20
-value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2
+3
+4
+5
+
+
+
+
+Control 1
+N = 20
+Test 1
+N = 20
+Control 2
+N = 20
+Test 2
+N = 20
+Control 3
+N = 20
+Test 3
+N = 20
+value
-
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
--2
--1
-0
-1
-
-
-
-
-Test 1
-minus
-Control 1
-Test 2
-minus
-Control 2
-Test 3
-minus
-Control 3
-Weighted
-Delta
-Mean difference
+
+-2
+-1
+0
+1
+
+
+
+
+Test 1
+minus
+Control 1
+Test 2
+minus
+Control 2
+Test 3
+minus
+Control 3
+Weighted
+Delta
+Mean difference
diff --git a/tests/testthat/_snaps/001_plotter/multigroup-baseline-colour-mean-diff.svg b/tests/testthat/_snaps/001_plotter/multigroup-baseline-colour-mean-diff.svg
index a9a534e..60770a4 100644
--- a/tests/testthat/_snaps/001_plotter/multigroup-baseline-colour-mean-diff.svg
+++ b/tests/testthat/_snaps/001_plotter/multigroup-baseline-colour-mean-diff.svg
@@ -37,74 +37,74 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-2
-3
-4
-5
-
-
-
-
-Control 1
-N = 20
-Test 1
-N = 20
-Control 2
-N = 20
-Test 2
-N = 20
-Test 3
-N = 20
-value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2
+3
+4
+5
+
+
+
+
+Control 1
+N = 20
+Test 1
+N = 20
+Control 2
+N = 20
+Test 2
+N = 20
+Test 3
+N = 20
+value
@@ -112,60 +112,60 @@
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
--2
--1
-0
-1
-
-
-
-
-Test 1
-minus
-Control 1
-Test 2
-minus
-Control 2
-Test 3
-minus
-Control 2
-Paired
-mean difference
+
+-2
+-1
+0
+1
+
+
+
+
+Test 1
+minus
+Control 1
+Test 2
+minus
+Control 2
+Test 3
+minus
+Control 2
+Paired
+mean difference
@@ -175,12 +175,14 @@
-
-
-
-
-
-Female
-Male
+
+
+
+
+
+
+
+Female
+Male
diff --git a/tests/testthat/_snaps/001_plotter/multigroup-baseline-mean-diff.svg b/tests/testthat/_snaps/001_plotter/multigroup-baseline-mean-diff.svg
index f54057e..06f44ea 100644
--- a/tests/testthat/_snaps/001_plotter/multigroup-baseline-mean-diff.svg
+++ b/tests/testthat/_snaps/001_plotter/multigroup-baseline-mean-diff.svg
@@ -28,74 +28,74 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-2
-3
-4
-5
-
-
-
-
-Control 1
-N = 20
-Test 1
-N = 20
-Control 2
-N = 20
-Test 2
-N = 20
-Test 3
-N = 20
-value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2
+3
+4
+5
+
+
+
+
+Control 1
+N = 20
+Test 1
+N = 20
+Control 2
+N = 20
+Test 2
+N = 20
+Test 3
+N = 20
+value
@@ -103,59 +103,59 @@
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
--2
--1
-0
-1
-
-
-
-
-Test 1
-minus
-Control 1
-Test 2
-minus
-Control 2
-Test 3
-minus
-Control 2
-Paired
-mean difference
+
+-2
+-1
+0
+1
+
+
+
+
+Test 1
+minus
+Control 1
+Test 2
+minus
+Control 2
+Test 3
+minus
+Control 2
+Paired
+mean difference
diff --git a/tests/testthat/_snaps/001_plotter/multigroup-sequential-mean-diff.svg b/tests/testthat/_snaps/001_plotter/multigroup-sequential-mean-diff.svg
index 8cc9f90..24078cb 100644
--- a/tests/testthat/_snaps/001_plotter/multigroup-sequential-mean-diff.svg
+++ b/tests/testthat/_snaps/001_plotter/multigroup-sequential-mean-diff.svg
@@ -28,74 +28,74 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-2
-3
-4
-5
-
-
-
-
-Control 1
-N = 20
-Test 1
-N = 20
-Control 2
-N = 20
-Test 2
-N = 20
-Test 3
-N = 20
-value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2
+3
+4
+5
+
+
+
+
+Control 1
+N = 20
+Test 1
+N = 20
+Control 2
+N = 20
+Test 2
+N = 20
+Test 3
+N = 20
+value
@@ -103,59 +103,59 @@
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
--2
--1
-0
-1
-
-
-
-
-Test 1
-minus
-Control 1
-Test 2
-minus
-Control 2
-Test 3
-minus
-Test 2
-Paired
-mean difference
+
+-2
+-1
+0
+1
+
+
+
+
+Test 1
+minus
+Control 1
+Test 2
+minus
+Control 2
+Test 3
+minus
+Test 2
+Paired
+mean difference
diff --git a/tests/testthat/_snaps/001_plotter/multigroup-unpaired-mean-diff-colour.svg b/tests/testthat/_snaps/001_plotter/multigroup-unpaired-mean-diff-colour.svg
index ab315b9..56e57b8 100644
--- a/tests/testthat/_snaps/001_plotter/multigroup-unpaired-mean-diff-colour.svg
+++ b/tests/testthat/_snaps/001_plotter/multigroup-unpaired-mean-diff-colour.svg
@@ -37,204 +37,204 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-2
-3
-4
-5
-
-
-
-
-Control 1
-N = 20
-Test 1
-N = 20
-Control 2
-N = 20
-Test 2
-N = 20
-Test 3
-N = 20
-value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2
+3
+4
+5
+
+
+
+
+Control 1
+N = 20
+Test 1
+N = 20
+Control 2
+N = 20
+Test 2
+N = 20
+Test 3
+N = 20
+value
-
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
--2
--1
-0
-1
-
-
-
-
-Test 1
-minus
-Control 1
-Test 2
-minus
-Control 2
-Test 3
-minus
-Control 2
-Mean difference
+
+-2
+-1
+0
+1
+
+
+
+
+Test 1
+minus
+Control 1
+Test 2
+minus
+Control 2
+Test 3
+minus
+Control 2
+Mean difference
@@ -244,10 +244,12 @@
-
-
-
-Female
-Male
+
+
+
+
+
+Female
+Male
diff --git a/tests/testthat/_snaps/001_plotter/multigroup-unpaired-mean-diff.svg b/tests/testthat/_snaps/001_plotter/multigroup-unpaired-mean-diff.svg
index 0cefd5e..561ac65 100644
--- a/tests/testthat/_snaps/001_plotter/multigroup-unpaired-mean-diff.svg
+++ b/tests/testthat/_snaps/001_plotter/multigroup-unpaired-mean-diff.svg
@@ -28,203 +28,203 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-2
-3
-4
-5
-
-
-
-
-Control 1
-N = 20
-Test 1
-N = 20
-Control 2
-N = 20
-Test 2
-N = 20
-Test 3
-N = 20
-value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2
+3
+4
+5
+
+
+
+
+Control 1
+N = 20
+Test 1
+N = 20
+Control 2
+N = 20
+Test 2
+N = 20
+Test 3
+N = 20
+value
-
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
--2
--1
-0
-1
-
-
-
-
-Test 1
-minus
-Control 1
-Test 2
-minus
-Control 2
-Test 3
-minus
-Control 2
-Mean difference
+
+-2
+-1
+0
+1
+
+
+
+
+Test 1
+minus
+Control 1
+Test 2
+minus
+Control 2
+Test 3
+minus
+Control 2
+Mean difference
diff --git a/tests/testthat/_snaps/001_plotter/proportion-baseline-flow-false-mean-diff.svg b/tests/testthat/_snaps/001_plotter/proportion-baseline-flow-false-mean-diff.svg
index 2c68bff..ad07ce3 100644
--- a/tests/testthat/_snaps/001_plotter/proportion-baseline-flow-false-mean-diff.svg
+++ b/tests/testthat/_snaps/001_plotter/proportion-baseline-flow-false-mean-diff.svg
@@ -21,96 +21,96 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-Control 1
-v.s.
- Test 1
-N= 40
-Test 1
-v.s.
- Test 2
-N= 40
-Test 2
-v.s.
- Test 3
-N= 40
-Control 2
-v.s.
- Test 4
-N= 40
-proportion of success
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0.00
+0.25
+0.50
+0.75
+1.00
+
+
+
+
+
+Control 1
+v.s.
+ Test 1
+N= 40
+Test 1
+v.s.
+ Test 2
+N= 40
+Test 2
+v.s.
+ Test 3
+N= 40
+Control 2
+v.s.
+ Test 4
+N= 40
+proportion of success
@@ -118,62 +118,62 @@
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
--0.25
-0.00
-0.25
-0.50
-0.75
-
-
-
-
-
-Test 1
-minus
-Control 1
-Test 2
-minus
-Control 1
-Test 3
-minus
-Control 1
-Test 4
-minus
-Control 2
-Paired
-mean difference
+
+-0.25
+0.00
+0.25
+0.50
+0.75
+
+
+
+
+
+Test 1
+minus
+Control 1
+Test 2
+minus
+Control 1
+Test 3
+minus
+Control 1
+Test 4
+minus
+Control 2
+Paired
+mean difference
diff --git a/tests/testthat/_snaps/001_plotter/proportion-baseline-mean-diff.svg b/tests/testthat/_snaps/001_plotter/proportion-baseline-mean-diff.svg
index e6cee39..a9f6dd5 100644
--- a/tests/testthat/_snaps/001_plotter/proportion-baseline-mean-diff.svg
+++ b/tests/testthat/_snaps/001_plotter/proportion-baseline-mean-diff.svg
@@ -21,86 +21,86 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-Control 1
-N = 40
-Test 1
-N = 40
-Test 2
-N = 40
-Test 3
-N = 40
-Control 2
-N = 40
-Test 4
-N = 40
-proportion of success
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0.00
+0.25
+0.50
+0.75
+1.00
+
+
+
+
+
+Control 1
+N = 40
+Test 1
+N = 40
+Test 2
+N = 40
+Test 3
+N = 40
+Control 2
+N = 40
+Test 4
+N = 40
+proportion of success
@@ -108,68 +108,68 @@
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
--0.25
-0.00
-0.25
-0.50
-0.75
-
-
-
-
-
-Test 1
-minus
-Control 1
-Test 2
-minus
-Control 1
-Test 3
-minus
-Control 1
-Test 4
-minus
-Control 2
-Paired
-mean difference
+
+-0.25
+0.00
+0.25
+0.50
+0.75
+
+
+
+
+
+Test 1
+minus
+Control 1
+Test 2
+minus
+Control 1
+Test 3
+minus
+Control 1
+Test 4
+minus
+Control 2
+Paired
+mean difference
diff --git a/tests/testthat/_snaps/001_plotter/proportion-paired-mean-diff-float-false.svg b/tests/testthat/_snaps/001_plotter/proportion-paired-mean-diff-float-false.svg
index 400e3c9..a63ee43 100644
--- a/tests/testthat/_snaps/001_plotter/proportion-paired-mean-diff-float-false.svg
+++ b/tests/testthat/_snaps/001_plotter/proportion-paired-mean-diff-float-false.svg
@@ -21,45 +21,45 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-Control 1
-N = 40
-Test 1
-N = 40
-proportion of success
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0.00
+0.25
+0.50
+0.75
+1.00
+
+
+
+
+
+Control 1
+N = 40
+Test 1
+N = 40
+proportion of success
@@ -72,36 +72,36 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-0.0
-0.2
-0.4
-0.6
-
-
-
-
-Test 1
-minus
-Control 1
-Paired
-mean difference
+
+0.0
+0.2
+0.4
+0.6
+
+
+
+
+Test 1
+minus
+Control 1
+Paired
+mean difference
diff --git a/tests/testthat/_snaps/001_plotter/proportion-paired-mean-diff-float-true.svg b/tests/testthat/_snaps/001_plotter/proportion-paired-mean-diff-float-true.svg
index 82cf533..3522a10 100644
--- a/tests/testthat/_snaps/001_plotter/proportion-paired-mean-diff-float-true.svg
+++ b/tests/testthat/_snaps/001_plotter/proportion-paired-mean-diff-float-true.svg
@@ -21,43 +21,43 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-Control 1
-N = 40
-Test 1
-N = 40
-proportion of success
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0.00
+0.25
+0.50
+0.75
+1.00
+
+
+
+
+
+Control 1
+N = 40
+Test 1
+N = 40
+proportion of success
@@ -70,39 +70,39 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
--0.2
-0.0
-0.2
-0.4
-0.6
-0.8
-Test 1
-minus
-Control 1
-Paired
-mean difference
+
+
+
+
+
+
+
+-0.2
+0.0
+0.2
+0.4
+0.6
+0.8
+Test 1
+minus
+Control 1
+Paired
+mean difference
diff --git a/tests/testthat/_snaps/001_plotter/proportion-sequential-mean-diff.svg b/tests/testthat/_snaps/001_plotter/proportion-sequential-mean-diff.svg
index 0afd7af..220958a 100644
--- a/tests/testthat/_snaps/001_plotter/proportion-sequential-mean-diff.svg
+++ b/tests/testthat/_snaps/001_plotter/proportion-sequential-mean-diff.svg
@@ -28,79 +28,79 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-Control 1
-N = 40
-Test 1
-N = 40
-Test 2
-N = 40
-Test 3
-N = 40
-Control 2
-N = 40
-Test 4
-N = 40
-proportion of success
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0.00
+0.25
+0.50
+0.75
+1.00
+
+
+
+
+
+Control 1
+N = 40
+Test 1
+N = 40
+Test 2
+N = 40
+Test 3
+N = 40
+Control 2
+N = 40
+Test 4
+N = 40
+proportion of success
@@ -108,64 +108,64 @@
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
--0.4
-0.0
-0.4
-
-
-
-Test 1
-minus
-Control 1
-Test 2
-minus
-Test 1
-Test 3
-minus
-Test 2
-Test 4
-minus
-Control 2
-Paired
-mean difference
+
+-0.4
+0.0
+0.4
+
+
+
+Test 1
+minus
+Control 1
+Test 2
+minus
+Test 1
+Test 3
+minus
+Test 2
+Test 4
+minus
+Control 2
+Paired
+mean difference
diff --git a/tests/testthat/_snaps/001_plotter/proportion-unpaired-mean-diff-float-false.svg b/tests/testthat/_snaps/001_plotter/proportion-unpaired-mean-diff-float-false.svg
index 789ac62..45a1abf 100644
--- a/tests/testthat/_snaps/001_plotter/proportion-unpaired-mean-diff-float-false.svg
+++ b/tests/testthat/_snaps/001_plotter/proportion-unpaired-mean-diff-float-false.svg
@@ -21,41 +21,41 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-Control 1
-N = 40
-Test 1
-N = 40
-proportion of success
+
+
+
+
+
+
+
+
+
+
+
+
+
+0.00
+0.25
+0.50
+0.75
+1.00
+
+
+
+
+
+Control 1
+N = 40
+Test 1
+N = 40
+proportion of success
@@ -68,35 +68,35 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-0.0
-0.2
-0.4
-0.6
-
-
-
-
-Test 1
-minus
-Control 1
-Mean difference
+
+0.0
+0.2
+0.4
+0.6
+
+
+
+
+Test 1
+minus
+Control 1
+Mean difference
diff --git a/tests/testthat/_snaps/001_plotter/proportion-unpaired-mean-diff-float-true.svg b/tests/testthat/_snaps/001_plotter/proportion-unpaired-mean-diff-float-true.svg
index 850e1e5..5cb901d 100644
--- a/tests/testthat/_snaps/001_plotter/proportion-unpaired-mean-diff-float-true.svg
+++ b/tests/testthat/_snaps/001_plotter/proportion-unpaired-mean-diff-float-true.svg
@@ -21,41 +21,41 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-Control 1
-N = 40
-Test 1
-N = 40
-proportion of success
+
+
+
+
+
+
+
+
+
+
+
+
+
+0.00
+0.25
+0.50
+0.75
+1.00
+
+
+
+
+
+Control 1
+N = 40
+Test 1
+N = 40
+proportion of success
@@ -68,38 +68,38 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
--0.2
-0.0
-0.2
-0.4
-0.6
-0.8
-Test 1
-minus
-Control 1
-Mean difference
+
+
+
+
+
+
+
+-0.2
+0.0
+0.2
+0.4
+0.6
+0.8
+Test 1
+minus
+Control 1
+Mean difference
diff --git a/tests/testthat/_snaps/001_plotter/proportion-unpaired-multigroup-mean-diff.svg b/tests/testthat/_snaps/001_plotter/proportion-unpaired-multigroup-mean-diff.svg
index 31b5a0e..2055ab6 100644
--- a/tests/testthat/_snaps/001_plotter/proportion-unpaired-multigroup-mean-diff.svg
+++ b/tests/testthat/_snaps/001_plotter/proportion-unpaired-multigroup-mean-diff.svg
@@ -28,41 +28,41 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-0.00
-0.25
-0.50
-0.75
-1.00
-
-
-
-
-
-Control 1
-N = 40
-Test 1
-N = 40
-Test 2
-N = 40
-proportion of success
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0.00
+0.25
+0.50
+0.75
+1.00
+
+
+
+
+
+Control 1
+N = 40
+Test 1
+N = 40
+Test 2
+N = 40
+proportion of success
@@ -75,42 +75,42 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
--0.25
-0.00
-0.25
-0.50
-
-
-
-
-Test 1
-minus
-Control 1
-Test 2
-minus
-Control 1
-Mean difference
+
+-0.25
+0.00
+0.25
+0.50
+
+
+
+
+Test 1
+minus
+Control 1
+Test 2
+minus
+Control 1
+Mean difference
diff --git a/tests/testthat/_snaps/001_plotter/two-groups-unpaired-mean-diff-colour-float-false.svg b/tests/testthat/_snaps/001_plotter/two-groups-unpaired-mean-diff-colour-float-false.svg
index 22afb07..34cf4f3 100644
--- a/tests/testthat/_snaps/001_plotter/two-groups-unpaired-mean-diff-colour-float-false.svg
+++ b/tests/testthat/_snaps/001_plotter/two-groups-unpaired-mean-diff-colour-float-false.svg
@@ -34,67 +34,67 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-3
-4
-
-
-Control 1
-N = 20
-Test 1
-N = 20
-value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3
+4
+
+
+Control 1
+N = 20
+Test 1
+N = 20
+value
@@ -107,36 +107,36 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-0.0
-0.3
-0.6
-0.9
-
-
-
-
-Test 1
-minus
-Control 1
-Mean difference
+
+0.0
+0.3
+0.6
+0.9
+
+
+
+
+Test 1
+minus
+Control 1
+Mean difference
@@ -146,10 +146,12 @@
-
-
-
-Female
-Male
+
+
+
+
+
+Female
+Male
diff --git a/tests/testthat/_snaps/001_plotter/two-groups-unpaired-mean-diff-colour-float-true.svg b/tests/testthat/_snaps/001_plotter/two-groups-unpaired-mean-diff-colour-float-true.svg
index 69d104b..7952a2e 100644
--- a/tests/testthat/_snaps/001_plotter/two-groups-unpaired-mean-diff-colour-float-true.svg
+++ b/tests/testthat/_snaps/001_plotter/two-groups-unpaired-mean-diff-colour-float-true.svg
@@ -37,64 +37,64 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-3
-4
-
-
-Control 1
-N = 20
-Test 1
-N = 20
-value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3
+4
+
+
+Control 1
+N = 20
+Test 1
+N = 20
+value
@@ -107,35 +107,30 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-0
-1
-Test 1
-minus
-Control 1
-Mean difference
-
-
-
-Female
-Male
+
+
+
+0
+1
+Test 1
+minus
+Control 1
+Mean difference
diff --git a/tests/testthat/_snaps/001_plotter/two-groups-unpaired-mean-diff-float-false.svg b/tests/testthat/_snaps/001_plotter/two-groups-unpaired-mean-diff-float-false.svg
index 0b7401d..e49f2cc 100644
--- a/tests/testthat/_snaps/001_plotter/two-groups-unpaired-mean-diff-float-false.svg
+++ b/tests/testthat/_snaps/001_plotter/two-groups-unpaired-mean-diff-float-false.svg
@@ -25,67 +25,67 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-3
-4
-
-
-Control 1
-N = 20
-Test 1
-N = 20
-value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3
+4
+
+
+Control 1
+N = 20
+Test 1
+N = 20
+value
@@ -98,35 +98,35 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-0.0
-0.3
-0.6
-0.9
-
-
-
-
-Test 1
-minus
-Control 1
-Mean difference
+
+0.0
+0.3
+0.6
+0.9
+
+
+
+
+Test 1
+minus
+Control 1
+Mean difference
diff --git a/tests/testthat/_snaps/001_plotter/two-groups-unpaired-mean-diff-float-true.svg b/tests/testthat/_snaps/001_plotter/two-groups-unpaired-mean-diff-float-true.svg
index fa9ae42..c03a26b 100644
--- a/tests/testthat/_snaps/001_plotter/two-groups-unpaired-mean-diff-float-true.svg
+++ b/tests/testthat/_snaps/001_plotter/two-groups-unpaired-mean-diff-float-true.svg
@@ -28,64 +28,64 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-3
-4
-
-
-Control 1
-N = 20
-Test 1
-N = 20
-value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3
+4
+
+
+Control 1
+N = 20
+Test 1
+N = 20
+value
@@ -98,30 +98,30 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-0
-1
-Test 1
-minus
-Control 1
-Mean difference
+
+
+
+0
+1
+Test 1
+minus
+Control 1
+Mean difference