Package: RprobitB 2.0.1

RprobitB: Bayesian Probit Choice Modeling

Fits Bayesian probit models for binary, multinomial, ordered, and ranked choices in cross-sectional and panel data. Correlated or uncorrelated normal and log-normal random coefficients, finite mixtures, sparse finite mixtures, and Dirichlet process mixtures describe preference heterogeneity. Multiple Gibbs chains produce posterior draws for diagnostics and choice prediction. Choice data can be supplied as a data frame or simulated from the requested specification. For an overarching treatment of the methodology, see Oelschlaeger (2026) <https://pub.uni-bielefeld.de/record/3014719>. The latent-class model is described in Oelschlaeger and Bauer (2021) <https://trid.trb.org/view/1759753>.

Authors:Lennart Oelschläger [aut, cre], Dietmar Bauer [aut]

RprobitB_2.0.1.tar.gz
RprobitB_2.0.1.zip(r-4.7-x86_64)RprobitB_2.0.1.zip(r-4.7-arm64)RprobitB_2.0.1.zip(r-4.6-x86_64)RprobitB_2.0.1.zip(r-4.6-arm64)RprobitB_2.0.1.zip(r-4.5-x86_64)
RprobitB_2.0.1.tgz(r-4.6-x86_64)RprobitB_2.0.1.tgz(r-4.6-arm64)RprobitB_2.0.1.tgz(r-4.5-x86_64)RprobitB_2.0.1.tgz(r-4.5-arm64)
RprobitB_2.0.1.tar.gz(r-4.7-arm64)RprobitB_2.0.1.tar.gz(r-4.7-x86_64)RprobitB_2.0.1.tar.gz(r-4.6-arm64)RprobitB_2.0.1.tar.gz(r-4.6-x86_64)
RprobitB_2.0.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
RprobitB/json (API)

# Install 'RprobitB' in R:
install.packages('RprobitB', repos = c('https://loelschlaeger.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/loelschlaeger/rprobitb/issues

Pkgdown/docs site:https://loelschlaeger.de

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library

On CRAN:

Conda:

bayesdiscrete-choicemcmc-samplerprobitopenblascppopenmp

6.37 score 6 stars 26 scripts 750 downloads 24 exports 131 dependencies

Last updated from:bc0c363819. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK236
linux-devel-x86_64OK230
source / vignettesOK733
linux-release-arm64OK256
linux-release-x86_64OK289
macos-release-arm64OK201
macos-release-x86_64OK287
macos-oldrel-arm64OK208
macos-oldrel-x86_64OK573
windows-devel-arm64OK323
windows-devel-x86_64OK305
windows-release-arm64OK349
windows-release-x86_64OK270
windows-oldrel-x86_64OK245
wasm-releaseOK186

Exports:bayes_factord_to_gammafitinterpretlatent_class_diagnosticslog_likelihood_orderedloosample_allocationtrain_testupdate_bupdate_b_cupdate_classes_dpupdate_classes_wbupdate_coefficientupdate_dupdate_mupdate_Omegaupdate_Omega_cupdate_supdate_Sigmaupdate_Uupdate_U_rankedupdate_zWAIC

Dependencies:abindaskpassbackportsbase64encbayesplotBBbbmlebdsmatrixbenchmarkmebenchmarkmeDatabootbridgesamplingbrioBrobdingnagbslibcachemcallrcheckmatechoicedataclicodacodetoolsContourFunctionscpp11crayoncubaturecurldescdiffobjdigestdistributionaldoParalleldplyrevaluatefarverfastmapfontawesomeforeachFormulafsfuturefuture.applygenericsGenOrdggdistggplot2ggridgesglobalsglueGPArotationgtablehighrhtmltoolshttrisobanditeratorsjquerylibjsonliteknitrlabelinglatticelbfgsb3clhslifecyclelistenvloomagrittrMASSMatrixmatrixStatsmemoisemimemnormtmvtnormnleqslvnlmenumDerivoeliopenssloptimizeRotelparallellypillarpkgbuildpkgconfigpkgloadplyrposteriorpracmapraiseprocessxprogressrpspsychpurrrquadprogR6rappdirsrbibutilsRColorBrewerRcppRcppArmadilloRdpackreshape2rlangrmarkdownrprojrootS7sassscalesSimMultiCorrDatastringistringrsystensorATestFunctionstestthattibbletidyrtidyselecttinytextriangleucminfutf8vctrsVGAMviridisLitewaldowithrxfunyaml

Modeling preference heterogeneity
Random coefficients | Willingness to pay for electricity supplier attributes | Latent classes | A fixed number of classes | Class-specific coefficients | Weight-based class updates | Sparse finite mixtures | Dirichlet-process mixtures | Ordered and ranked responses | Further reading | References

Last update: 2026-10-21
Started: 2026-09-15

Bayesian model evaluation
A nested model comparison for travel mode choices | WAIC and PSIS-LOO | Bayes factors | Models with random coefficients | Ordered responses | Further reading | References

Last update: 2026-10-21
Started: 2026-09-15

Get started with RprobitB
The probit model | A stated choice experiment on train trips | Posterior summaries | Graphical convergence diagnostics | Working with the posterior draws | Parallel chains | Further reading | References

Last update: 2026-10-21
Started: 2026-09-15

Model specification and variants
Normalization | Prior distribution | Covariate types and alternative-specific constants | Individual choice sets | Ordered responses | Ranked responses | Further reading | References

Last update: 2026-10-21
Started: 2026-09-15

Posterior prediction
A random price coefficient | Population predictions | Conditional predictions for fitted deciders | Scenario analysis in a stated choice experiment | Out-of-sample prediction and calibration | Residuals | Marginal effects | Predictions for ordered responses | Further reading | References

Last update: 2026-10-21
Started: 2026-09-15

Readme and manuals

Help Manual

Help pageTopics
Convert a fitted model to posterior drawsas_draws.RprobitB_fit
Compare models with a Bayes factorbayes_factor
Update latent classesclass_updates sample_allocation update_classes_dp update_classes_wb update_m update_s update_z
Extract posterior coefficient summariescoef.RprobitB_fit
Update coefficient distributionscoefficient_updates update_b update_b_c update_coefficient update_Omega update_Omega_c
Compute posterior credible intervalsconfint.RprobitB_fit
Fit a Bayesian probit choice modelfit
Extract the fitted formulaformula.RprobitB_fit
Interpret the estimates of a fitted choice modelinterpret print.RprobitB_interpretation
Diagnose latent-class occupancy and membershiplatent_class_diagnostics
Extract the fitted log-likelihoodlogLik.RprobitB_fit
Compute approximate leave-one-out cross-validationloo loo.RprobitB_fit
Extract the fitted datamodel.frame.RprobitB_fit
Count independent likelihood unitsnobs.RprobitB_fit
Plot posterior drawsplot.RprobitB_fit
Predict choicespredict.RprobitB_fit
Print a fitted choice modelprint.RprobitB_fit
Print a fitted model summaryprint.summary.RprobitB_fit
Extract choice residualsresiduals.RprobitB_fit
Summarize a fitted choice modelsummary.RprobitB_fit
Update and refit a choice modelupdate.RprobitB_fit
Update utilities and thresholdsd_to_gamma log_likelihood_ordered update_d update_Sigma update_U update_U_ranked utility_updates
Extract the posterior covariance matrixvcov.RprobitB_fit
Compute the widely applicable information criterionWAIC