(This obviously isn't my research question, but I'm just using it as an illustration.)
Imagine that I'm interested in seeing if there is an interaction between hair colour and weight, as predictors of a person's speed, after accounting for height.
Is the plot that I create below the best (or at least ONE) way of showing this interaction after accounting for height?
Speed = rnorm(1000)
Height = rnorm(1000)
Weight = rnorm(1000)
HairColour = sample(1:3, size = 1000, replace = TRUE)
HairColour <- as.factor(HairColour)
data <- as.data.table(cbind(Speed, Height, Weight, HairColour))
m1 <- lm(Speed ~ Height + Weight*HairColour, data = data)
data$PredictedSpeed <- predict(m1)
ggplot(data, aes(x = Weight, y = PredictedSpeed, col = factor(HairColour), group = HairColour)) + geom_jitter(alpha = .2) + geom_smooth(method = "lm")