I have a logistic model fitted with the following R function:

    glmfit<-glm(formula, data, family=binomial)

A  reasonable cutoff value in order to get a good data classification (or
confusion matrix) with the fitted model is 0.2 instead of the mostly used
0.5.

And I want to use the `cv.glm` function with the fitted model:

    cv.glm(data, glmfit, cost, K)

Since the response in the fitted model is a binary variable an appropriate
cost function is (obtained from "Examples" section of ?cv.glm):

    cost <- function(r, pi = 0) mean(abs(r-pi) > 0.5)

As I have a cutoff value of 0.2, can I apply this standard cost function or
should I define a different one and how?

Thank you very much in advance,


-- 
Pedro Carmona
Departament de Comptabilitat
Facultat d'Economia
Universitat de València
telf. 96 16 25 188

        [[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to