auto.correlate {EGAnet} | R Documentation |
Automatic correlations
Description
This wrapper is similar to cor_auto
. There
are some minor adjustments that make this function simpler and to
function within EGAnet
. NA
values are not treated
as categories (this behavior differs from cor_auto
)
Usage
auto.correlate(
data,
corr = c("kendall", "pearson", "spearman"),
ordinal.categories = 7,
forcePD = TRUE,
na.data = c("pairwise", "listwise"),
empty.method = c("none", "zero", "all"),
empty.value = c("none", "point_five", "one_over"),
verbose = FALSE,
...
)
Arguments
data |
Matrix or data frame. Should consist only of variables to be used in the analysis |
corr |
Character (length = 1).
The standard correlation method to be used.
Defaults to |
ordinal.categories |
Numeric (length = 1).
Up to the number of categories before a variable is considered continuous.
Defaults to |
forcePD |
Boolean (length = 1).
Whether positive definite matrix should be enforced.
Defaults to |
na.data |
Character (length = 1).
How should missing data be handled?
Defaults to
|
empty.method |
Character (length = 1).
Method for empty cell correction in
|
empty.value |
Character (length = 1).
Value to add to the joint frequency table cells in
|
verbose |
Boolean (length = 1).
Whether messages should be printed.
Defaults to |
... |
Not actually used but makes it easier for general functionality in the package |
Author(s)
Alexander P. Christensen <alexpaulchristensen@gmail.com>
Examples
# Load data
wmt <- wmt2[,7:24]
# Obtain correlations
wmt_corr <- auto.correlate(wmt)