| measureit.rocit | R Documentation |
This is an S3 method for object of class "rocit".
It computes various performance metrics at different cutoff values.
## S3 method for class 'rocit'
measureit(x, measure = c("ACC", "SENS"), ... = NULL)
x |
An object of class |
measure |
The performance metrics to be evaluated. See "Details" for available options. |
... |
|
This function calls measureit.default. From the
components of "rocit" objects, it calculates the score
and class
variables internally. See measureit.default for other
details and available options for measure argument.
An object of class "measureit", same as returned by
measureit.default.
See measureit.default.
measureit.default, print.measureit
data("Diabetes")
logistic.model <- glm(as.factor(dtest)~chol+age+bmi,
data = Diabetes,family = "binomial")
class <- logistic.model$y
score <- logistic.model$fitted.values
rocit_object <- rocit(score = score, class = class)
# -------------------------------------------------------------
measure <- measureit(rocit_object, measure = c("ACC", "SENS", "FSCR"))
names(measure)
plot(measure$ACC~measure$Cutoff, type = "l")
plot(measure$TP~measure$FP, type = "l")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.