[R] cross-validation / sensitivity anaylsis for logistic regression model

From: Dylan Beaudette <dylan.beaudette_at_gmail.com>
Date: Mon, 14 May 2007 16:38:21 -0700


Hi,

I have developed a logistic regression model in the form of (factor_1~ numeric + factor_2) and would like to perform a cross-validation or some similar form of sensitivity analysis on this model.

using cv.glm() from the boot package:

# dataframe from which model was built in 'z'
# model is called 'm_geo.lrm'

# as suggested in the man page for a binomial model:
cost <- function(r, pi=0) mean(abs(r-pi)>0.5) cv.10.err <- cv.glm(z, m_geo.lrm, cost, K=10)$delta

I get the following:
cv.10.err

    1 1
0.275 0.281

Am I correct in interpreting that this is the mean estimated error percentage for this specified model, after 10 runs of the cross-validation?

any tips on understanding the output from cv.glm() would be greatly appreciated. I am mostly looking to perform a sensitivity analysis with this model and dataset - perhaps there are other methods?

thanks

-- 
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341

______________________________________________
R-help_at_stat.math.ethz.ch 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.
Received on Mon 14 May 2007 - 23:42:52 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 15 May 2007 - 01:31:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.