Now, instead of a random selection of predictors, we are going to search for those that are most predictive of the outcome. We can do this by comparing the values for the y = 1 group to those in the y = 0 group, for each predictor, using a t-test. You can perform this step like this:
Create a vector of the p-values and call it pvals.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here