Cindex {BranchGLM} | R Documentation |
Calculates the c-index/AUC.
Cindex(object, ...)
AUC(object, ...)
## S3 method for class 'numeric'
Cindex(object, y, ...)
## S3 method for class 'BranchGLM'
Cindex(object, ...)
## S3 method for class 'BranchGLMROC'
Cindex(object, ...)
object |
a |
... |
further arguments passed to other methods. |
y |
Observed values, can be a numeric vector of 0s and 1s, a two-level factor vector, or a logical vector. |
Uses trapezoidal rule to calculate AUC when given a BranchGLMROC object and uses Mann-Whitney U to calculate it otherwise. The trapezoidal rule method is less accurate, so the two methods may give different results.
A number corresponding to the c-index/AUC.
Data <- ToothGrowth
Fit <- BranchGLM(supp ~ ., data = Data, family = "binomial", link = "logit")
Cindex(Fit)
AUC(Fit)