correlate {tidycomm} | R Documentation |
Compute correlation coefficients
Description
Computes correlation coefficients for all combinations of the specified variables. If no variables are specified, all numeric (integer or double) variables are used.
Usage
correlate(data, ..., method = "pearson", partial = NULL, with = NULL)
Arguments
data |
|
... |
Variables to compute correlations for (column names). Leave empty to compute for all numeric variables in data. |
method |
a character string indicating which correlation coefficient is to be computed. One of "pearson" (default), "kendall", or "spearman" |
partial |
Specifies a variable to be used as a control in a partial correlation.
By default, this parameter is set to |
with |
Specifies a focus variable to correlate all other variables with.
By default, this parameter is set to |
Value
a tdcmm model
Examples
WoJ %>% correlate(ethics_1, ethics_2, ethics_3)
WoJ %>% correlate()
WoJ %>% correlate(ethics_1, ethics_2, ethics_3, with = work_experience)
WoJ %>% correlate(autonomy_selection, autonomy_emphasis, partial = work_experience)
WoJ %>% correlate(with = work_experience)