Warning! It seems that you are using Dodona within another webpage, so not everything may work properly. Let your teacher know so that he can solve the problem by adjusting a setting in the learning environment. In the meantime, you can click this link to open Dodona in a new window.
Chapter 5 exercise 5
Sign in to test your solution.
# convert the dependent variable to a numeric variable
Default$default <- as.numeric(Default$default == "Yes")
# 1
...
# 2
## 1. Split the sample set into a training set and a validation set.
set.seed(1)
...
## 2. Fit a multiple logistic regression model using only the training observations.
...
## 3. Obtain a prediction of default status for each individual in the validation dataset.
...
## 4. Compute the validation set error.
...
# 3
...
for (i in 1:3) {
set.seed(i)
...
}
# 4
set.seed(1)
...
You can submit as many times as you like. Only your latest submission will be taken into account.
Sign in to test your solution.