Editing Statistics and Statistical Programming (Winter 2017)/R lecture outline: Week 7
From CommunityData
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 5: | Line 5: | ||
** module formulae, which we've already seen! | ** module formulae, which we've already seen! | ||
** looking at model objects: summary(); m$<tab> or names(m) | ** looking at model objects: summary(); m$<tab> or names(m) | ||
*** m$fitted.values; m$residuals | *** m$fitted.values; | ||
*** also functions: coefficients(m) (or coef), predict(m), residuals(m) (or resid) | *** residuals: mtcars$mpg - m$fitted.values OR m$residuals | ||
*** also functions: coefficients(m) (or coef), predict(m), residuals(m) (or resid) | |||
* plotting residuals: | * plotting residuals: | ||
** hist(residuals(m)) | ** hist(residuals(m)) |