InfluentialPoints.com
Biology, images, analysis, design...
 Use/Abuse Principles How To Related
"It has long been an axiom of mine that the little things are infinitely the most important" (Sherlock Holmes)

## Pearson's correlation coefficient - using R

### Pearson's correlation coefficient

It is simple enough to calculate Pearson's correlation coefficient, from first principles, if you only need its value.

Gave us this:

 [1] 0.5871208

### Test of Pearson's correlation coefficient

Which produced the result shown below:

Notice that, since method="pearson" is the default for this function, we have only included for sake of clarity.

 Pearson's product-moment correlation data: x and y t = 2.9012, df = 16, p-value = 0.01042 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: 0.1656595 0.8272375 sample estimates: cor 0.5871208

We now repeat the test without the influential (deviant ??) point to assess how robust the result is:

### Pearson's correlation coefficient

The R output for the Pearson correlation test is as follows:

 Pearson's product-moment correlation data: x and y t = 2.2368, df = 15, p-value = 0.04091 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: 0.0256361 0.7906962 sample estimates: cor 0.5001185