correlation: Correlate two EDA objects.

View source: R/functions_corelation.R

correlationR Documentation

Correlate two EDA objects.

Description

Correlates two EDA objects of the same length. For numeric-type EDAs, Pearson, Spearman and Kendall TauB correlations are available. Factor-type analyses can be specifically adressed by Cohen's kappa ('kappa'). EDA objects are converted to the respective type prior to analysis.

Usage

correlation(
  eda_object,
  y,
  type = c("pearson", "spearman", "kendall", "kappa"),
  ci = TRUE,
  ...
)

Arguments

eda_object

an EDA object, created by eda.

y

an EDA object, created by eda.

type

which correlation is to be calculated: Pearson (pearson), Spearman (spearman), Kendall TauB (kendall) or Cohen's Kappa (kappa). Defaults to 'pearson'.

ci

logical, should 95% confidence intervals be computed?

....

extra arguments passed to the correlation computing functions.

Details

Pearson correlation is computed with cor.test, Spearman correlation is calculated with SpearmanRho, Kendall TauB is returned by KendallTauB. Kappa is calculated with Kappa. Correlation failures raise a warning and NULL is returned.

Value

an eTest object with test statistics, correlation coefficients and p values.


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