compare_variables: Compare or correlate features between collectives/cohorts.

View source: R/functions_exploration.R

compare_variablesR Documentation

Compare or correlate features between collectives/cohorts.

Description

Compares the given variable between the provided data sets with a range of statistical sets as described for test (statistical testing), distribution (distribution comparison), variance (variance comparison), correlate (correlation), covariance (covariance) or eff_size (effect size).

Usage

compare_variables(
  ...,
  variables,
  split_factor = NULL,
  what = c("test", "distribution", "variance", "correlation", "covariance", "eff_size"),
  types = "t_test",
  exact = TRUE,
  ci = TRUE,
  boot_method = "percentile",
  pub_styled = FALSE,
  signif_digits = 2,
  adj_method = "none",
  simplify_p = TRUE,
  .parallel = FALSE,
  .paropts = furrr::furrr_options(seed = TRUE)
)

Arguments

...

data frames.

variables

a vector with variable names.

split_factor

optional, the name of a factor used for splitting the variables of interest into analysis groups.

what

the requested analysis: 'test', 'distribution', 'variance', 'correlation', 'covariance' or 'eff_size'. Defaults to 'test'.

types

a vector with the types of statistical test, see test, correlate and covariance for details. The vector length must be either one or the length of the 'variables' vector.

exact

logical, should exact values for Chi-squared. Mann-Whitney and Wilcoxon test be returned?

ci

logical, should confidence intervals for the test effect size be returned?

boot_method

indicates how the bootstrap confidence intervals are calculated. Can be any of 'percentile', 'bca', or 'normality', defaults to 'percentile'.

pub_styled

logical, should the output be publication-ready formatted?

signif_digits

significant digits used for rounding in the publication-style output.

adj_method

the method for adjusting p values for multiple testing, as defined for p.adjust, defaults to 'none'. The adjusted p value is summarized in the 'significance' column, when pub_style output is chosen.

simplify_p

logical, should p_values < 0.001 be presented in a p < 0.001 form?

.parallel

logical, should the analysis be run in parallel? Experimental, uses the parallel solutions provided by furrr package.

.paropts

an object created by furrr_options, enabling i.e. provision of globals by the user.

Details

in case, the split_factor is provided, only the first of the input data frames will be analyzed.


PiotrTymoszuk/ExDA documentation built on Nov. 17, 2024, 5:46 p.m.