dig_correlations {nuggets} | R Documentation |
Search for conditional correlations
Description
Compute correlation between all combinations of xvars
and yvars
columns
of x
in subdata corresponding to conditions generated from condition
columns.
Usage
dig_correlations(
x,
condition = where(is.logical),
xvars = where(is.numeric),
yvars = where(is.numeric),
method = "pearson",
alternative = "two.sided",
exact = NULL,
min_length = 0L,
max_length = Inf,
min_support = 0.02,
...
)
Arguments
x |
a matrix or data frame with data to search in. The matrix must be
numeric (double) or logical. If |
condition |
a tidyselect expression (see tidyselect syntax) specifying the columns to use as condition predicates |
xvars |
a tidyselect expression (see tidyselect syntax) specifying the columns to use for computation of correlations |
yvars |
a tidyselect expression (see tidyselect syntax) specifying the columns to use for computation of correlations |
method |
a character string indicating which correlation coefficient is
to be used for the test. One of |
alternative |
indicates the alternative hypothesis and must be one of
|
exact |
a logical indicating whether an exact p-value should be computed.
Used for Kendall's tau and Spearman's rho. See |
min_length |
the minimum size (the minimum number of predicates) of the condition to be generated (must be greater or equal to 0). If 0, the empty condition is generated in the first place. |
max_length |
The maximum size (the maximum number of predicates) of the condition to be generated. If equal to Inf, the maximum length of conditions is limited only by the number of available predicates. |
min_support |
the minimum support of a condition to trigger the callback
function for it. The support of the condition is the relative frequency
of the condition in the dataset |
... |
Further arguments, currently unused. |
Value
A tibble with found rules.
Author(s)
Michal Burda