Diana Marcela Martinez Ruiz
2012-Aug-15 21:01 UTC
[R] sensitivity and specificity in svyglm??
Hello, As obtained from a table svyglm clasificaion, sensitivity and specificity. The funtion ConfusionMatrix () of the library (caret) gives these results but not how to apply it to svyglm. thanks [[alternative HTML version deleted]]
Sensitivity and specificity are improper scoring rules so beware. They are optimized by a bogus model. Frank Diana Marcela Martinez Ruiz wrote> > Hello, > > As obtained from a table svyglm clasificaion, sensitivity and > specificity. The funtion ConfusionMatrix () of the library (caret) > gives these results but not how to apply it to svyglm. > > thanks > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@ 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. >----- Frank Harrell Department of Biostatistics, Vanderbilt University -- View this message in context: http://r.789695.n4.nabble.com/sensitivity-and-specificity-in-svyglm-tp4640427p4640478.html Sent from the R help mailing list archive at Nabble.com.
On Thu, Aug 16, 2012 at 9:01 AM, Diana Marcela Martinez Ruiz <dianammr06 at hotmail.com> wrote:> Hello, > > As obtained from a table svyglm clasificaion, sensitivity and specificity. > The funtion ConfusionMatrix () of the library (caret) > gives these results but not how to apply it to svyglm. >predict() will give you fitted values from svyglm on either the training data or new test data. You need to choose a threshold to turn the predicted probabilities into predicted 1s and 0s. At this point you could use ConfusionMatrix to compute sensitivity and specificity, but its uncertainty estimates won't be appropriate for the survey design. -thomas -- Thomas Lumley Professor of Biostatistics University of Auckland