broom and modelr

Exercises:

Cross-validation and Bootstrap

Look at the R lab Sections 5.3 on Cross-validation and Bootstrap of Introduction to Statistical Learning with applications in R (ISLR) by James, Witten, Hastie and Tibshirani. Freely available from statlearning.com.

Exercises:

A simple model

The ToothGrowth data set (see ?ToothGrowth for explanation) contains observations on 60 guinea pigs treated with either vitamins and or orange juice.

  • Fit a linear model to the data. Let dose be numeric.
  • Investigate if there is an interaction between dose and supp.

Is the interaction really significant?

  • Compute the bootstrap confidence intervals. Both by case and residual bootstrap re-sampling.
  • Does your conclusion change?
  • Which one is preferable in for this type of data?