Compute correlation between all combinations of xvars
and yvars
columns
of x
in subdata corresponding to conditions generated from condition
columns.
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,
threads = 1,
...
)
A tibble with found rules.
a matrix or data frame with data to search in.
a tidyselect expression (see tidyselect syntax) specifying the columns to use as condition predicates
a tidyselect expression (see tidyselect syntax) specifying the columns to use for computation of correlations
a tidyselect expression (see tidyselect syntax) specifying the columns to use for computation of correlations
a character string indicating which correlation coefficient is
to be used for the test. One of "pearson"
, "kendall"
, or "spearman"
indicates the alternative hypothesis and must be one of
"two.sided"
, "greater"
or "less"
. "greater"
corresponds to
positive association, "less"
to negative association.
a logical indicating whether an exact p-value should be computed.
Used for Kendall's tau and Spearman's rho. See stats::cor.test()
for
more information.
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.
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.
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 x
. For logical data, it equals to the
relative frequency of rows such that all condition predicates are TRUE on it.
For numerical (double) input, the support is computed as the mean (over all
rows) of multiplications of predicate values.
the number of threads to use for parallel computation.
Further arguments, currently unused.
Michal Burda
dig()
, stats::cor.test()