Generate ROC and Precision-Recall curves after fitting a Bayesian logit or probit regression using jags

mcmcRocPrc(object, yname, xnames, curves, fullsims)

## Arguments

object A "rjags" object (see jags) for a fitted binary choice model. (character(1)) The name of the dependent variable, should match the variable name in the JAGS data object. (base::character()) A character vector of the independent variable names, should match the corresponding names in the JAGS data object. logical indicator of whether or not to return values to plot the ROC or Precision-Recall curves. If set to FALSE (default), results are returned as a list without the extra values. logical indicator of whether full object (based on all MCMC draws rather than their average) will be returned. Default is FALSE. Note: If TRUE is chosen, the function takes notably longer to execute.

## Value

Returns a list; the specific structure depends on the combination of the "curves" and "fullsims" argument values.

## References

Beger, Andreas. 2016. “Precision-Recall Curves.” Available at SSRN: http://dx.doi.org/10.2139/ssrn.2765419

## Examples

.old_wd <- setwd(tempdir())
# \donttest{
# load simulated data and fitted model (see ?sim_data and ?jags_logit)
data("jags_logit")

# using mcmcRocPrc
fit_sum <- mcmcRocPrc(jags_logit,
yname = "Y",
xnames = c("X1", "X2"),
curves = TRUE,
fullsims = FALSE)
# }

setwd(.old_wd)