Skip to content

bayesm Bayesian Inference for Marketing/Micro-Econometrics

Dataset summary

Everyone
Time period
Varies by bundled dataset
Updates
Irregular
Geography
n/a

bayesm is an open-source R package for Bayesian analysis of models used in marketing and applied economics. The package provides modeling functions and real-world datasets for teaching quantitative methods, replicating published work, and conducting research.

The package is authored and maintained by Peter Rossi, currently James Collins Distinguished University Professor of Marketing, Economics and Statistics at the UCLA Anderson School of Management. Rossi earlier founded the Kilts Center for Marketing while on the faculty at the University of Chicago Booth School of Business.

Because the package continues to change, verify model and bundled-dataset descriptions against the installed release.

Install and load bayesm from the Comprehensive R Archive Network (CRAN):

install.packages("bayesm")
library(bayesm)

The canonical CRAN page provides current source packages, Windows and macOS binaries, release information, vignettes, and the reference manual. The package requires compilation on platforms without a compatible binary.

No Kilts subscription, registration, or separate data-use agreement is required.

Per the current CRAN package description, bayesm covers:

  • Bayesian univariate and multivariate regression, and seemingly unrelated regression (SUR).
  • Binary and ordinal probit, multinomial logit (MNL) and probit (MNP), and multivariate probit.
  • Negative binomial (Poisson) regression.
  • Multivariate mixtures of normals (including clustering) and Dirichlet process prior density estimation with a normal base.
  • Hierarchical linear models with a normal prior, and with a mixture-of-normals prior, over covariates.
  • Hierarchical multinomial logit with a mixture-of-normals prior and with a Dirichlet process prior over covariates.
  • Hierarchical negative binomial regression.
  • Bayesian analysis of choice-based conjoint data, and linear instrumental-variables (“IV”) models.
  • Analysis of multivariate ordinal survey data with scale-usage heterogeneity.
  • Bayesian analysis of aggregate random-coefficient logit models (as in Berry-Levinsohn-Pakes-style demand estimation).

The current CRAN package may include additional models. Consult the installed package documentation (help(package = "bayesm")) for the complete list that applies to your version.

The package includes conjoint-survey, scanner-panel, key-account, store-level, and other survey datasets. Review datasets included with bayesm for examples and commands for discovering the data in your installed release.

Open the package index in R:

help(package = "bayesm")

The CRAN reference manual provides function and dataset documentation. The CRAN page also links the package overview vignette.

Generate the citation associated with your installed release:

citation("bayesm")