I've learnt to do this type of plots with r, and add this regression lines predicted from a model.
## Predict values of the model##
p11=predict(model.coh1, data.frame(COH=coh1, espajpe=1:4))
p12=predict(model.coh1, data.frame(COH=coh2, espaje=1:4))
p11
1 2 3 4
1.996689 2.419994 2.843298 3.266602
p12
1 2 3 4
1.940247 2.414299 2.888351 3.362403
##PLOT##
plot(espapli~espaje, mydata)
lines(1:4,p11, col="red")
lines(1:4,p12, col="green")
Now, I would like to do something similar using ggplot, is that possible? That is, introducing a regression line for these particular values.
