As no packages were available providing a clean output of a correlation table, including descriptive statistics, I function was constructed in the CaviR package. By using this, a clean table will appear which can be copied wright away in Excel, Word, etc.
Note
First, make a subset of all variables you want to include in the correlation matrix. You can choose which order they have.
The output can be opened in Rstudio or in your browser. When copy it (CTRL + A or CMD + A), you can change the layout in your Excel or Word file to whatever you like.
Tip
If you want to change the names of the variables, use colnames(correlation_dataset) <- c(NEW_NAMES) after step 1 where you replace NEW_NAMES by a vector of names you prefer.
Make a useful netwerk plot based on the variables in the correlation table.
The same CaviR package can be used for multilevel correlations (up until 2 levels).
Note
First, make a subset of all variables you want to include in the correlation matrix. You can choose which order they have, but make sure the grouping variable is the first one.
Run the multicoR() function.
The upper diagonal will present the correlations within levels of the grouping variable. The lower diagonal will do this across groups.
Important
The multicoR function recognizes the first variable as the group variable, so make sure this is the first one in the dataset.
The table shows high ICC-values, indicating that 64% of the variance in the Integration variable is between groups (i.e., participants in this dataset) and 36% is located within groups, for instance.
Between-group correlations (below diagonal): Group’s overall mean level of Integration (i.e., across time) is related negatively with group’s overall mean on Suppression.
Within-group correlations (upper diagonal): When a person reports a momentary higher level of Integration compared to the overall mean across time, this person also reports a momentary lower level of Suppression compared to the overall mean across time.
Note
The ICC represents the Intra-Class Correlation or the level of between-grouping variable.