How to Complete a Pearson’s Correlation Coefficient in RStudio
Steps: To start select which groups will be compared
- In this instance the level of family involvement will be compared based on household income.
- To run a Pearson’s Correlation Coefficient in Rstudio, type in this formula:
- Z <y[is.na(y$v6)=0 & is.na(y$v36)=0,]
- cor(z$v36, z$v6)
- Once it is typed in exactly correctly, highlight and click run
Interpretation- When running this Pearson’s Correlation Coefficient, the level of family involvement which is the dependent variable will be compared with household income which is the dependent variable. The level of family involvement is measured on a 0-10 scale with 0 being not involved at all and 10 being involved a great amount. Household income is measured on a 1-6 scale with 1 being less than $10,000, 2 being $10,000-$30,999, 3 being $31,000- $50,999, 4 being $51,000-$70,999, 5 being $71,000-$90,999 and 6 being $91,000 or more. The correlation found was -0.76. This means that as parent involvement increases, household income decreases. This Pearson’s Correlation Coefficient is a weak negative correlation.