Session Ready
Exercise

Correlation matrix

You can measure the strength of a linear relationship by looking at the correlation coefficient. The correlation coefficient can be directly computed in R by means of the cor() command.

The cor.test() function can be utilized to see whether the correlation coefficient, and thus the relationship between the two variables, is significantly different from zero or not.

Instructions
100 XP
  • Compute the pairwise correlations in matrix form. Leave out the first variable pid as this is just an identification variable and does not provide you with additional insight. Make sure to round off the correlation coefficients to two decimal places!
  • See which pairwise correlations are statistically significant. Note that the results link back to the scatterplots of the previous exercise!