View source: R/functions_corelation.R
correlation | R Documentation |
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.
correlation(
eda_object,
y,
type = c("pearson", "spearman", "kendall", "kappa"),
ci = TRUE,
...
)
eda_object |
an EDA object, created by |
y |
an EDA object, created by |
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. |
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.
an eTest object with test statistics, correlation coefficients and p values.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.