Question
How to solve this question by using R Language? In this exercise, we will predict the number of applications received using the other variables in
How to solve this question by using R Language?
In this exercise, we will predict the number of applications received using the other variables in the \texttt{College} dataset.
```{r} library(tidyverse) library(ISLR) head(College) ```
(a) Split the dataset into a training set and a test test (of roughly equal size). Fit a linear model using least squares on the training set, and report the prediction error on the test set.
(b) Use 10-fold cross-validation to estimate the prediction error (on the whole dataset). Compare to that of part (a). (c) Comment on the bias and variance of the prediction errors of (a) and (b).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started