blrmStats: Compute Indexes of Predictive Accuracy and Their...

View source: R/blrm.r

blrmStatsR Documentation

Compute Indexes of Predictive Accuracy and Their Uncertainties


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"))



an object produced by blrm()


number of posterior draws to use in the calculations (default is 400)


HPD interval probability (default is 0.95)


set to TRUE to plot the posterior densities using base graphics


if pl is TRUE specifies whether to plot the density estimate (the default) or a histogram


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 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

See Also



## Not run: 
  f <- blrm(...)
  blrmStats(f, pl=TRUE)   # print and plot

## End(Not run)

rmsb documentation built on April 12, 2022, 5:06 p.m.