MC³ LabCUHK Psychology

Free course · 19 short lessons

R for Psychological Research

From installing R to running and reporting the tests used in psychology research. No experience needed.

Short lessons

About 30 minutes each. One idea at a time, with pictures.

One dataset

Every lesson uses the same Student Life Survey, so you get to know it well.

Try, then check

Each lesson ends with exercises. Hints and answers are hidden until you need them.

Lessons 0 to 9 teach you to use R. Lessons 10 to 17 are statistics. Lesson 18 is a milestone project, and more sections are on the way.

Lessons

Open a section to see its lessons.

1Getting startedInstall R, find your way around RStudio and learn the basics.Lessons 0 to 3
  1. 0Set upInstall R and RStudio, and make a folder for the course.
  2. 1RStudio tourFind your way around RStudio, run code and save it in a script.
  3. 2Objects & functionsStore values, work with lists of numbers, and use functions.
  4. 3Tables & packagesWork with a table of data, add packages, and read error messages.
2Working with dataLoad, change, summarise and chart the dataset.Lessons 4 to 9
  1. 4Load dataOpen the course dataset from a CSV, Excel or SPSS file and take a first look.
  2. 5Pick rows & columnsKeep the columns and rows you need, and sort them, with dplyr.
  3. 6Change dataMake new columns, recode values and deal with missing data.
  4. 7Summarise groupsTurn 300 rows into a few numbers, for everyone or for each group.
  5. 8Charts: one variableBuild your first charts with ggplot2, a layer at a time.
  6. 9Charts: compare & relateCompare groups with boxplots, show relationships with scatter plots, and make charts ready for a report.
3StatisticsDescribe data and run the tests used in psychology research.Lessons 10 to 17
  1. 10Describe dataReport the middle and the spread of a variable, overall and for each group.
  2. 11z-scoresSee how unusual a score is, and test a group against a known population with a z-test.
  3. 12CorrelationMeasure how strongly two numbers go together, test it, and report it.
  4. 13Before a t-testPick the right t-test, plan your sample size, and check the assumptions.
  5. 14One-sample t-testTest whether a group's average differs from a fixed value, with an effect size.
  6. 15Two-group t-testCompare the averages of two separate groups, show it on a chart and report it.
  7. 16Paired t-testTest a change in the same people from one time to another.
  8. 17Chi-square testTest whether two categories are related, using counts.
4MilestoneA project that brings everything so far together. More sections are on the way.Lesson 18
  1. 18Milestone projectBring lessons 0 to 17 together. Answer four research questions about the Student Life Survey on your own, from loading the data to writing the results.