RprobitB1.1.4 package

Bayesian Probit Choice Modeling

as_cov_names

Re-label alternative specific covariates

check_form

Check model formula

check_prior

Check prior parameters

choice_probabilities

Compute choice probabilities

classification

Classify deciders preference-based

coef.RprobitB_fit

Extract model effects

compute_choice_probabilities

Compute probit choice probabilities

compute_p_si

Compute choice probabilities at posterior samples

cov_mix

Extract estimated covariance matrix of mixing distribution

create_labels_alpha

Create labels for alpha

create_labels_b

Create labels for b

create_labels_d

Create labels for d

create_labels_Omega

Create labels for Omega

create_labels_s

Create labels for s

create_labels_Sigma

Create labels for Sigma

create_lagged_cov

Create lagged choice covariates

d_to_gamma

Transform threshold increments to thresholds

dmvnorm

Density of multivariate normal distribution

draw_from_prior

Sample from prior distributions

euc_dist

Euclidean distance

filter_gibbs_samples

Filter Gibbs samples

fit_model

Fit probit model to choice data

get_cov

Extract covariates of choice occasion

gibbs_sampling

Markov chain Monte Carlo simulation for the probit model

ll_ordered

Log-likelihood in the ordered probit model

missing_covariates

Handle missing covariates

mml

Approximate marginal model likelihood

model_selection

Compare fitted models

npar

Extract number of model parameters

overview_effects

Print effect overview

parameter_labels

Create parameters labels

plot.RprobitB_data

Visualize choice data

plot.RprobitB_fit

Visualize fitted probit model

plot_acf

Autocorrelation plot of Gibbs samples

plot_class_allocation

Plot class allocation (for P_r = 2 only)

plot_class_seq

Visualizing the number of classes during Gibbs sampling

plot_mixture_contour

Plot bivariate contour of mixing distributions

plot_mixture_marginal

Plot marginal mixing distributions

plot_roc

Plot ROC curve

plot_trace

Visualizing the trace of Gibbs samples.

point_estimates

Compute point estimates

posterior_pars

Parameter sets from posterior samples

pred_acc

Compute prediction accuracy

predict.RprobitB_fit

Predict choices

preference_flip

Check for flip in preferences after change in model scale.

prepare_data

Prepare choice data for estimation

R_hat

Compute Gelman-Rubin statistic

rdirichlet

Draw from Dirichlet distribution

rmvnorm

Draw from multivariate normal distribution

RprobitB-package

RprobitB: Bayesian Probit Choice Modeling

RprobitB_data

Create object of class RprobitB_data

RprobitB_fit

Create object of class RprobitB_fit

RprobitB_gibbs_samples_statistics

Create object of class RprobitB_gibbs_samples_statistics

RprobitB_latent_classes

Create object of class RprobitB_latent_classes

RprobitB_normalization

Create object of class RprobitB_normalization

RprobitB_parameter

Define probit model parameter

rtnorm

Draw from one-sided truncated normal

rttnorm

Draw from two-sided truncated normal

rwishart

Draw from Wishart distribution

set_initial_gibbs_values

Set initial values for the Gibbs sampler

simulate_choices

Simulate choice data

sufficient_statistics

Compute sufficient statistics

train_test

Split choice data in train and test subset

transform

Transform fitted probit model

transform_gibbs_samples

Transformation of Gibbs samples

transform_parameter

Transformation of parameter values

undiff_Sigma

Transform differenced to non-differenced error term covariance matrix

update.RprobitB_fit

Update and re-fit probit model

update_b

Update class means

update_classes_dp

Dirichlet process-based update of latent classes

update_classes_wb

Weight-based update of latent classes

update_d

Update utility threshold increments

update_m

Update class sizes

update_Omega

Update class covariances

update_reg

Update coefficient vector of multiple linear regression

update_s

Update class weight vector

update_Sigma

Update error term covariance matrix of multiple linear regression

update_U

Update latent utility vector

update_U_ranked

Update latent utility vector in the ranked probit case

update_z

Update class allocation vector

WAIC

Compute WAIC value

Bayes estimation of probit choice models, both in the cross-sectional and panel setting. 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 Markov chain Monte Carlo m ethods, 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>.

  • Maintainer: Lennart Oelschläger
  • License: GPL-3
  • Last published: 2024-02-26