I'm trying to plot empirical probability of a logistic regression. My data is students' homework score range from 0 to 20. The response is if they passed the final exam, 1 for pass and 0 for fail.
I want to know from my data, what is the rate of passing the final exam for students who received 18-20 in their homework, 16-18, etc.
I assume I can achieve this by several loops, but seems very complicated. Does anyone know an easier way? Thanks in advance.