pearson correlation r code example
Example 1: calculate correlation in r
cor(x, method = "pearson", use = "complete.obs")
Example 2: Pearson correlation
The usual definition of correlation. Technically,
Corr[X,Y] = Cov[X,Y]/(Std[X] * Std[Y]).
cor(x, method = "pearson", use = "complete.obs")
The usual definition of correlation. Technically,
Corr[X,Y] = Cov[X,Y]/(Std[X] * Std[Y]).