correlate_ml | R Documentation |
This function computes correlations between a series of specified variables. If no cluster identifier is specified, the function provides simple single-level correlations at the individual level of observations. If a cluster identifier is specified, the function provides multilevel correlations between the respective group means at the specified hierarchical level.
correlate_ml(data, .cols, .id_cluster)
data |
A data frame. |
.cols |
< |
.id_cluster |
< |
A tibble containing a correlation matrix of variables specified in .cols
.
# compute single-level correlations between students' mathematics and reading achievement
correlate_ml(data = studach, .cols = read:math)
# compute multilevel correlations between students' mathematics and reading achievement
# at the school level
correlate_ml(data = studach, .cols = c(gender, read, math), .id_cluster = id_sch)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.