View source: R/GLM_functions.R
lrcm | R Documentation |
This function computes a variety of classification measures relevant to logistic regression models.
lrcm(
roc,
x = "best",
best.method = "youden",
transpose = FALSE,
ret = "all",
seed,
...
)
roc |
a "roc" object from the pROC::roc function, or a "smooth.roc" object from the pROC::smooth function. |
x |
the coordinates to look for. Numeric (if so, their meaning is
defined by the |
best.method |
if |
transpose |
whether
to return the thresholds in columns ( |
ret |
The coordinates to return. See “Available coordinates” section below. Alternatively, the single value “all” can be used to return every coordinate available. |
seed |
A single number to be passed to set.seed(), which is used to ensure reproducibility of the bootstrapped confidence intervals. |
... |
further arguments passed from other methods. Ignored. |
=============================================================================
This function is a convnient wrapper around pROC::coords() and pROC::ci.coords(). Most of the arguments are passed along to those functions. What lrcm() does is just gather the results of both estimates and bootstrapped confidence intervals into a data frame. See the details sections of documentetion for pROC::coords() and pROC::ci.coords() for more information. Some information mentioned in the descriptions of individual parameters listed above is absent here because these parameters are inherited from pROC. It is more efficient to refer you to the pROC documentation than to retype it.
A data frame showing estimates and bootstrapped confidence intervals for various classification measures.
Robin, X., Turck, N., Hainard, A., Tiberti, N., Lisacek, F., Sanchez, J.-C., & Müller, M. (2011). pROC: an open-source package for R and S+ to analyze and compare ROC curves. BMC Bioinformatics, 12, 77. doi:10.1186/1471-2105-12-77
Youden, W. J. (1950). Index for rating diagnostic tests. Cancer, 3(1), 32-35. doi:10.1002/1097-0142(1950)3
roc
, coords
,
ci.coords
, set.seed
.
library(pROC)
m1 <- glm(formula = vs ~ wt + disp, family = binomial, data = mtcars)
set.seed(4921) # For reproducibility of bootstrap estimates.
rocm1 <- roc(m1$y ~ predict(m1, type = "response"), ci = TRUE,
direction = "<", ci.method = "bootstrap")
print(rocm1)
lrcm(rocm1, seed = 563)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.