I have managed to get a logistic regression in RStudio, but I am having difficulties calculating test classification error rates for the following cut-offs given some estimated probability. Any help would be appreciated.
Since it mentions test classification error rates, I am assuming this is for the test data only. This is what I have tried so far:
glm_dir (this is my logistic regression name that I have estimated)
test is my test data
test_pred <- factor(ifelse(predict(glm_dir, newdata = test, type = "response") <= 0.4, "Down", "Up"))