Homework Problem 25, Due Wednesday May 7. ----------------------------------------- Access the data "Rubber" from the MASS library within R. This dataset has 3 variables: loss (the amount of rubber wear, the response variable) and two predictors, "hard" and "tens". The objective of this exercise is to compare the predictive success of different methods of "predicting" above-median rubber-loss (ie, loss > 165). (i) Develop three methods of predicting above-median rubber loss from the variables "hard" and "tens": --- using a linear-regression model (normal errors) --- using a logistic regression model --- using a nonparametric regression model (kernel density estimator with a single bandwidth b=40) for "loss" as a function of the linear-regression fitted linear combination of "hard" and "tens". You should code a function which does the model-fitting and defines predictions based on a dataset of the same structure as "Rubber", but with size n between 25 and 30. Note that each prediction method is an algorithm mapping the dataset to a logical vector of the same size n (where T corresponds to "> 165" and F to "<= 165"). For convenience, you should probably write your function to calculate the numbers or proportions of correct predictions on a test dataset input to the same function. (ii) Do a small cross-validation study (say, of 1000 replications), by repeatedly leaving out 5 observations chosen at random from the original dataset of 30, designed to estimate the accuracy of prediction of [loss > 165] by each of the three prediction methods you developed in (i).