Package: RprobitB 1.2.0.9000

RprobitB: Bayesian Probit Choice Modeling

Bayes estimation of probit choice models in cross-sectional and panel settings. The package can analyze binary, multivariate, ordered, and ranked choices, as well as heterogeneity of choice behavior among deciders. The main functionality includes model fitting via Gibbs sampling, tools for convergence diagnostic, choice data simulation, in-sample and out-of-sample choice prediction, and model selection using information criteria and Bayes factors. The latent class model extension facilitates preference-based decider classification, where the number of latent classes can be inferred via the Dirichlet process or a weight-based updating heuristic. This allows for flexible modeling of choice behavior without the need to impose structural constraints. For a reference on the method, see Oelschlaeger and Bauer (2021) <https://trid.trb.org/view/1759753>.

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

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

# 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
Datasets:

On CRAN:

Conda:

bayesdiscrete-choiceprobitopenblascppopenmp

5.24 score 5 stars 3 scripts 300 downloads 42 exports 152 dependencies

Last updated from:97bceb45f6. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK284
linux-devel-x86_64OK320
source / vignettesOK476
linux-release-arm64OK288
linux-release-x86_64OK300
macos-release-arm64OK225
macos-release-x86_64OK595
macos-oldrel-arm64OK339
macos-oldrel-x86_64OK848
windows-develOK362
windows-releaseOK486
windows-oldrelOK305
wasm-releaseOK192

Exports:as_cov_namescheck_priorchoice_probabilitiesclassificationcompute_p_sicov_mixcreate_lagged_covd_to_gammafit_modelget_covll_orderedmmlmode_approxmodel_selectionnparoverview_effectsplot_class_allocationplot_mixture_contourplot_rocpoint_estimatespred_accprepare_dataR_hatRprobitB_parametersample_allocationsimulate_choicestrain_testupdate_bupdate_b_cupdate_classes_dpupdate_classes_wbupdate_coefficientupdate_dupdate_mupdate_Omegaupdate_Omega_cupdate_supdate_Sigmaupdate_Uupdate_U_rankedupdate_zWAIC

Dependencies:askpassbackportsbase64encBBbbmlebdsmatrixbenchmarkmebenchmarkmeDatabootbriobslibcachemcallrcheckmateclicodetoolscommonmarkcpp11crayoncrosstalkcubaturecurldata.tabledescdiffobjdigestdoParalleldoSNOWdplyrevaluatefarverfastmapfontawesomefontBitstreamVerafontLiberationfontquiverforeachfsfuturefuture.applygdtoolsgenericsGenOrdggfunggimageggiraphggplot2ggplotifyglobalsglueGPArotationgridExtragridGraphicsgridSVGgtablehexbinhexStickerhighrhmshtmltoolshtmlwidgetshttpuvhttrisobanditeratorsjquerylibjsonlitekernlabknitrlabelinglaterlatticelazyevallifecyclelistenvmagickmagrittrMASSMatrixmemoisemimemixtoolsmnormtmvtnormnleqslvnlmenumDerivoeliopensslotelparallellypillarpkgbuildpkgconfigpkgloadplotlyplotROCplyrpraiseprettyunitsprocessxprogressprogressrpromisespspsychpurrrquadprogR6rappdirsrbibutilsRColorBrewerRcppRcppArmadilloRdpackrlangrmarkdownrprojrootS7sassscalessegmentedshinyshowtextshowtextdbSimMultiCorrDatasnowsourcetoolsstringistringrsurvivalsyssysfontssystemfontstestthattibbletidyrtidyselecttinytextriangleutf8vctrsVGAMviridisviridisLitewaldowithrxfunXMLxtableyamlyulab.utils

Choice data

Rendered fromv02_choice_data.Rmdusingknitr::rmarkdownon Jun 03 2026.

Last update: 2025-08-25
Started: 2022-02-14

Choice prediction

Rendered fromv05_choice_prediction.Rmdusingknitr::rmarkdownon Jun 03 2026.

Last update: 2025-08-26
Started: 2022-02-14

Introduction

Rendered fromRprobitB.Rmdusingknitr::rmarkdownon Jun 03 2026.

Last update: 2025-08-25
Started: 2022-02-14

Model definition

Rendered fromv01_model_definition.Rmdusingknitr::rmarkdownon Jun 03 2026.

Last update: 2025-08-25
Started: 2022-02-14

Model fitting

Rendered fromv03_model_fitting.Rmdusingknitr::rmarkdownon Jun 03 2026.

Last update: 2025-08-25
Started: 2022-02-14

Model selection

Rendered fromv06_model_selection.Rmdusingknitr::rmarkdownon Jun 03 2026.

Last update: 2025-08-25
Started: 2022-03-18

Modeling heterogeneity

Rendered fromv04_modeling_heterogeneity.Rmdusingknitr::rmarkdownon Jun 03 2026.

Last update: 2025-08-26
Started: 2022-02-23

Readme and manuals

Help Manual

Help pageTopics
Re-label alternative specific covariatesas_cov_names
Check model formulacheck_form
Check prior parameterscheck_prior
Compute choice probabilitieschoice_probabilities
Preference-based classification of decidersclassification
Extract model effectscoef.RprobitB_fit plot.RprobitB_coef print.RprobitB_coef
Compute choice probabilities at posterior samplescompute_p_si
Extract estimated covariance matrix of mixing distributioncov_mix
Create lagged choice covariatescreate_lagged_cov
Transform increments to thresholdsd_to_gamma
Fit probit model to choice datafit_model
Extract covariates of choice occasionget_cov
Gibbs sampler for probit modelsgibbs_sampler
Compute ordered probit log-likelihoodll_ordered
Approximate marginal model likelihoodmml plot.RprobitB_mml print.RprobitB_mml
Gibbs sample modemode_approx
Compare fitted modelsmodel_selection print.RprobitB_model_selection
Extract number of model parametersnpar npar.RprobitB_fit
Print effect overviewoverview_effects
Plot class allocation (for 'P_r = 2' only)plot_class_allocation
Plot bivariate contour of mixing distributionsplot_mixture_contour
Plot ROC curveplot_roc
Visualize fitted probit modelplot.RprobitB_fit
Compute point estimatespoint_estimates
Compute prediction accuracypred_acc
Predict choicespredict.RprobitB_fit
Prepare choice data for estimationprepare_data
Compute Gelman-Rubin statisticR_hat
Define probit model parameterprint.RprobitB_parameter RprobitB_parameter
Sample allocationsample_allocation
Simulate choice datasimulate_choices
Stated Preferences for Train Travelingtrain_choice
Split choice data into train and test subsettrain_test
Transform fitted probit modeltransform.RprobitB_fit
Update class meansupdate_b
Update mean of a single classupdate_b_c
Dirichlet process class updatesupdate_classes_dp
Weight-based class updatesupdate_classes_wb
Update coefficient vectorupdate_coefficient
Update utility threshold incrementsupdate_d
Update class sizesupdate_m
Update class covariancesupdate_Omega
Update covariance of a single classupdate_Omega_c
Update class weight vectorupdate_s
Update error covariance matrixupdate_Sigma
Update utility vectorupdate_U
Update ranked utility vectorupdate_U_ranked
Update class allocation vectorupdate_z
Update and re-fit probit modelupdate.RprobitB_fit