RprobitB

CRAN status CRAN downloads R-CMD-check

The goal of RprobitB is to fit mixed probit models to choice data. The package differs from comparable packages in two ways: Bayesian estimation and a focus on taste heterogeneity.

Installation

You can install the released version of RprobitB from CRAN with:

install.packages("RprobitB")

Documentation

The package is documented in several vignettes:

browseVignettes("RprobitB")

Example

This is a basic example to show how to fit a mixed probit model and make choice predictions:

library(RprobitB)
data("Train", package = "mlogit")
data = prepare(form = choice ~ price | 0 | time + comfort + change,
               choice_data = Train,
               re = "price",
               standardize = "all",
               test_prop = 0.5)
model = mcmc(data$train)
summary(model)
plot(model, type = "mixture")
predict(model, data$test)