[R] sensitivity and specificity in svyglm??

Thomas Lumley tlumley at uw.edu
Thu Aug 16 22:44:42 CEST 2012


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



More information about the R-help mailing list