I have the following example plot:
Created via:
q<-ggplot(data=all_summ,aes(x=Xvals, y=Yvals,color=ColorVals),size=2)+
geom_point(size=2)+
geom_smooth(method = "lm", fill = NA)+
facet_grid(.~facets)
My question is: how can I compare the created lm() models? Typically I would just do:
lm_model1<-lm(...)
lm_model2<-lm(...)
anova(lm_model1,lm_model2)
Or something along these lines. Unfortunately I am unsure how to do this if all the models are created in ggplot2
. Is there somewhere it stores all of these models so I can analyze them?