blrmStats | R Documentation |
For a binary or ordinal logistic regression fit from blrm()
, computes several indexes of predictive accuracy along with highest posterior density intervals for them. Optionally plots their posterior densities.
When there are more than two levels of the outcome variable, computes Somers' Dxy and c-index on a random sample of 10,000 observations.
blrmStats(fit, ns = 400, prob = 0.95, pl = FALSE, dist = c("density", "hist"))
fit |
an object produced by |
ns |
number of posterior draws to use in the calculations (default is 400) |
prob |
HPD interval probability (default is 0.95) |
pl |
set to |
dist |
if |
list of class blrmStats
whose most important element is Stats
. The indexes computed are defined below, with gp, B, EV, and vp computed using the intercept corresponding to the median value of Y. See https://fharrell.com/post/addvalue for more information.
Somers' Dxy rank correlation between predicted and observed. The concordance probability (c-index; AUROC in the binary Y case) may be obtained from the relationship Dxy=2(c-0.5).
Gini's mean difference: the average absolute difference over all pairs of linear predictor values
Gini's mean difference on the predicted probability scale
Brier score
explained variation
variance of linear predictor
variable of estimated probabilities
Frank Harrell
Hmisc::rcorr.cens()
## Not run:
f <- blrm(...)
blrmStats(f, pl=TRUE) # print and plot
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.