Graphics Reference
In-Depth Information
sp + geom_point(colour = "grey60" ) + stat_smooth()
sp + geom_point(colour = "grey60" ) + stat_smooth(method = loess)
Figure 5-19. A LOESS fit
Additional parameters can be passed along to the loess() function by just passing them to
stat_smooth() .
Another common type of model fit is a logistic regression. Logistic regression isn't appropriate
for the heightweight data set, but it's perfect for the biopsy data set in the MASS library. In
Search WWH ::




Custom Search