Activity B: Correlation
This activity explores correlation and to learn how to create and interpret a scatterplot using R.
The Data
Using content from this website (note that we’re using RStudio, not Excel), here is the context for this activity:
A researcher was interested in whether there was an association between communication skills and quality of peer relationships in third grade classrooms. Teachers in each class completed a communicative skills checklist and a rating scale of peer relations for each child. The items for each scale were averaged to provide an overall score for each child.
Variable names in the provided CSV
file:
ID
= case identification numbercomm
= communication skillspeers
= quality of peer relations
Steps to completion
Watch the following!
- Scatterplot in RStudio
- How to make a scatterplot in R (with regression line)
- Plotting with ggplot2 to get the basics on how to produce the plots you need below.
Again, we’re using the Posit Cloud Activity B template for this assignment. This is very similar to the Activity A template.
This activity goes well beyond simply displaying frequencies and descriptives for common concepts like means and medians. You will need to dig around the R documentation for the commands to best answer the questions below. For this activity, create and submit a document that includes and answers the following (again, these instructions are preloaded in your qmd
):
- A scatterplot that displays the relationship between the peers and comm variables. Referencing the scatterplot, answer the following:
- What does this chart tell you about the relationship between the two variables?
- What direction is this association?
- How did you determine this?
- If you had to identify the association, would you label is small, moderate, or strong? Why?
- Determine the Pearson correlation for the peers and comm variables. Referencing the Pearson correlation coefficient, answer the following:
- Interpret this number.
- What is the strength of the association?
- What is the direction?
- Like the scatterplot above, do you think it is small, moderate, or strong?
- How does your interpretation of the Pearson correlation coefficient compare to that of the scatterplot?
- Determine R2 by computing the square of the correlation coefficient you previously calculated.. Using this coefficient of determination, answer the following:
- Interpret this value. What does it indicate about the association?
- Write a statement about the meaning of the R-squared (R2) value in terms of the variables.
- How does R2 compare to what you saw in the scatterplot and the Pearson correlation coefficient?
- Do you think this is a more valuable statistic? Why?
Submitting
- Complete the grading declaration quiz in the LMS. Note that this is not the same content that goes into your assignment submission!
- Submit both your
qmd
and yourHTML
file to the Activity B dropbox in the LMS by the stated due date and time. - Remember: the point of using this file system is reproducibility. Ensure you haven’t removed the
embed-resources: true
YAML line!