/
09-s02-lab09a.Rmd
70 lines (51 loc) · 4.24 KB
/
09-s02-lab09a.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Correlations
## Overview
As you will read in <a href="https://drive.google.com/file/d/0B1fyuTuvj3YoaFdUR3FZaXNuNXc/view" target = "_blank">Miller and Haden (2013)</a> as part of the Correlations Basics reading, correlations are **used to detect and quantify relationships among numerical variables**. In short, you measure two variables and the correlation analysis tells you whether or not they are related in some manner - positively (i.e., one increases as the other increases) or negatively (i.e., one decreases as the other increases). Schematic examples of three extreme bivariate relationships (i.e., the relationship between two (bi) variables) are shown below:
```{r cor-examples, echo=FALSE, warning=FALSE, message = FALSE}
library(patchwork)
library(tidyverse)
dat1 <- tibble(x = c(1,2,3,4,5,6,7,8,9,10),
y = x)
dat2 <- tibble(x = c(1,2,3,4,5,6,7,8,9,10),
y = -x)
dat3 <- tibble(x = c(1,2,3,4,5,6,7,8,9,10),
y = c(5,10,3,9,6,5,9,8,5,6))
a <- ggplot(dat1, aes(x,y)) +
geom_point() +
labs(title = "Positive Relationship") +
theme_classic() +
theme(axis.text.x = element_blank(),
axis.text.y = element_blank())
c <- ggplot(dat2, aes(x,y)) +
geom_point() +
labs(title = "Negative Relationship") +
theme_classic() +
theme(axis.text.x = element_blank(),
axis.text.y = element_blank())
b <- ggplot(dat3, aes(x,y)) +
geom_point() +
labs(title = "No Relationship") +
theme_classic() +
theme(axis.text.x = element_blank(),
axis.text.y = element_blank())
```
```{r ch10-show-figure, echo = FALSE, fig.cap = 'Schematic examples of extreme bivariate relationships'}
a+b+c
```
However, unfortunately, you may have heard people say lots of critical things about correlations:
* they do not prove causality
* they suffer from the bidirectional problem (A vs B is the same as B vs A)
* any relationship found may be the result of an unknown third variable (e.g. murders and ice-creams)
Whilst these are true and we must be aware of them, correlations are an incredibly useful and commonly used measure in the field, so don't be put off from using them or designing a study that uses correlations. In fact, they can be used in a variety of areas. Some examples include:
* looking at reading ability and IQ scores such as in Miller and Haden Chapter 11, which we will also look at today;
* exploring personality traits in voices (see <a href="http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0185651" target = "_blank">Phil McAleer's work on Voices</a>);
* or traits in faces (see <a href="http://facelab.org/" target = "_blank">Lisa DeBruine's work</a>);
* brain-imaging analysis looking at activation in say the amygdala in relation to emotion of faces (see <a href="https://psych.princeton.edu/person/alexander-todorov" target = "_blank">Alex Todorov's work at Princeton</a>);
* social attitudes, both implicit and explicit, as Helena Paterson will discuss in her Social lectures this semester;
* or a whole variety of fields where you simply measure the variables of interest.
To actually carry out a correlation is very simple and we will show you that in a little while: you can use the `cor.test()` function. The harder part of correlations is really wrangling the data (which you've learned to do in the first part of this book) and interpreting the data (which we will focus more on this chapter). So, we are going to run a few correlations, showing you how to do one, and asking you to perform others to give you some good practice at running and interpreting the relationships between two variables.
**Note:** When dealing with correlations it is better to refer to **relationships** and NOT predictions. In a correlation, X does not predict Y, that is really more regression which we will look at later on the book. In a correlation, what we can say is that X and Y are related in some way. Try to get the correct terminology and please feel free to pull us up if we say the wrong thing in class. It is an easy slip of the tongue to make!
In this chapter we will:
* Introduce the Miller and Haden book, which we will be using throughout the rest of the book
* Show you the thought process of a researcher running a correlational analysis.
* Give you practice in running and writing up a correlation.