I am doing some analysis regarding a binomial glm model that I have fitted earlier in R. While looking at my data, I figured out that the suitable cutoff point for my binary outcome should be 0.75 instead of 0.5. I am trying to get the cost()
function of the cv.glm()
{boot package}
to use the 0.75 cutoff point, but I have failed to get the right syntax.
I know for the 0.5 cutoff we normally use:
cost <- function(r, pi = 0) mean(abs(r-pi) > 0.5)
Can someone show me what is the right way to change the cutoff point in this function? (let's stick to 0.75 maybe).