Thanks so much! I've added the +, and then it has this error. Sorry it seems to be a very low-level question, is there any resources that I can look it also?
ggplot(data = npa_meta_paper_form, aes(X= advantage, Y = optout)) + geom_point(size = 1, colour = "black") + geom_point(size = 1, colour = "white") + geom_smooth(aes(colour = "black"),method = 'lm') + ggtitle("chosen adventage vs optout rate") +theme(legend.position = "none")
Error: stat_smooth requires the following missing aesthetics: x, y
If you're running the code exactly as you pasted it in here, then I think you've stumbled on the fact that R is case-sensitive.
In your ggplot() call, you define the X and Y aesthetics, when you need to be defining the x and y aesthetics. So when geom_smooth() goes to look for the required x and y aesthetics, it's only finding X and Y, which are not the same thing.