correlate_variables: Correlate variables in the data set.

View source: R/functions_exploration.R

correlate_variablesR Documentation

Correlate variables in the data set.

Description

Correlates two variables in the provided data sets by Pearson, Spearman or Kendall method.

Usage

correlate_variables(
  ...,
  variables,
  what = c("correlation", "covariance"),
  type = c("pearson", "spearman", "kendall", "kappa"),
  ci = TRUE,
  boot_method = "percentile",
  pub_styled = FALSE,
  signif_digits = 2,
  adj_method = "none",
  simplify_p = TRUE
)

Arguments

...

data sets.

variables

a vector with variable names. If more than two provided, only the first two are analyzed.

what

the requested analysis: 'correlation' or 'covariance'. Defaults to 'correlation'.

type

the type of correlation/covariance: Pearson, Spearman, Kendall or Kohen's kappa. Defaults to Pearson. See: correlate and covariance for details.

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?


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