was not sure how to title this.
I have a vector of risk bins ranging from 0.01 to 0.10:
risk_bins <- seq(0.01, 0.1, 0.01).
I'm trying to see how many observations I have in each risk bin that further satisfy another condition.
For instance, the third element of risk_bins is 0.03. When I calculate the following two statements
sum(preds == 0.03 & condition2 == 1)
sum(preds == risk_bins[3] & condition2 == 1)
I get the same result.
However, for 5 and 6, I do not get the same result. I've attached a screenshot below that demonstrates this issue. As you can see, it works for 0.03, 0.05, and 0.09, but not for 0.06 or 0.07. Can someone point me to why this was the case?