RStudio in Chapter 10: Correlation
Code to enter:
> z <-y[is.na(y$v36)==0 & is.na(y$v7)==0,] > cor(z$v7,z$v36)
What the code entered should look like:

What the output of the Correlation should be able to look like?
z <-y[is.na(y$v36)==0 & is.na(y$v7)==0,] > cor(z$v7,z$v34) [1] 0.3540245
Chapter 10: Correlation SPSS
- Analyze → Correlate → Bivariate
- Transfer both the independent and the dependent variables into variables category
- Check Pearson under correlation coefficients
- Click Okay