Skip to content
Prev 306331 / 398506 Next

Interaction scatterplots in ggplot with multiple regression lines

Some like this help?

mydata$modnew  <-  cut(mydata$moderator, 7)
ggplot(mydata, aes(x=predictor, y=outcome, color=modnew)) +
geom_point() + stat_smooth(method=lm, se=TRUE, fullrange=T)


John Kane
Kingston ON Canada
____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!