Today, we’ll discuss what an interaction means, and we’ll run a linear model to test whether one exists. We’ll also have time to work in groups.
“Quiz”
What have you learned about interaction effects from the two assigned videos?
Write down 1-2 questions you have after watching the two videos.
Reflect on your contributions to writing R code with your group during the past week. Approximately what percent did you contribute? If it was more or less than 33%, explain why. How well do you feel you understand the code that you submitted last night?
What is an interaction?
Interactions occur when a relationship between two variables depends on the value of a third variable.
This is most clearly indicated by non-parallel lines in a graph.
Research question
Do people update their judgments of whether somebody is a good cooperative partner more readily when they strongly endorse the moral value that was violated, and is this true only in cases of hypocrisy?
Getting ready for today’s analyses
#library(tidyverse) # This gives us access to dplyr and ggplot. library(magrittr) # This allows us to use the double pipe.library(ggthemes) # This allows us to use a minimal theme.library(wesanderson) # This gives access to some nice color palettes.TidyData <-read.csv('TidyData.csv', header =TRUE,stringsAsFactors =FALSE) # Here's the data we'll use.TidyData %<>%mutate(GoodCoopPartnerChange =as.numeric(rowMeans(select(., c(IntegrityChange:FutureBehChange)))))