library(jroreillyregression) data(bond) head(bond)
trainControl object to set up for cross validation estimates of test error of a modellibrary(caret) tc = trainControl(method = "cv", number = 10)
Alcohol_Units and Relationships to predict number of kills using the train function from caret to estimate test errorm = train(Kills~Alcohol_Units + Relationships, data = bond, method = "lm")
Fit a new model that also includes Nationality as a predictor. Does this improve the predictive ability of the model?
If you have time, create bootstrapped estimates of the regression coefficients to determine the variance of them.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.