Data Science, Statistics, Programming, R Programming, Science.
set.seed(268) sample_size <- floor(0.7 * nrow(data_raw)) sample_indi <- sample(seq_len(nrow(data_raw)), size = sample_size) d_train <- data_raw[sample_indi,] d_test <- data_raw[-sample_indi,] y_train <- y[sample_indi] y_test <- y[-sample_indi] ## 3. Logistic Regression Model Fitting glm_1 <-