Learn R Programming

⚠️There's a newer version (3.1-6) of this package.Take me there.

bayesm (version 2.2-1)

Bayesian Inference for Marketing/Micro-econometrics

Description

bayesm covers many important models used in marketing and micro-econometrics applications. The package includes: Bayes Regression (univariate or multivariate dep var), Bayes Seemingly Unrelated Regression (SUR), Binary and Ordinal Probit, Multinomial Logit (MNL) and Multinomial Probit (MNP), Multivariate Probit, Negative Binomial (Poisson) Regression, Multivariate Mixtures of Normals (including clustering), Dirichlet Process Prior Density Estimation with normal base, Hierarchical Linear Models with normal prior and covariates, Hierarchical Linear Models with a mixture of normals prior and covariates, Hierarchical Multinomial Logits with a mixture of normals prior and covariates, Hierarchical Negative Binomial Regression Models, Bayesian analysis of choice-based conjoint data, Bayesian treatment of linear instrumental variables models, and Analyis of Multivariate Ordinal survey data with scale usage heterogeneity (as in Rossi et al, JASA (01)). For further reference, consult our book, Bayesian Statistics and Marketing by Rossi, Allenby and McCulloch.

Copy Link

Version

Install

install.packages('bayesm')

Monthly Downloads

11,239

Version

2.2-1

License

GPL (version 2 or later)

Maintainer

Peter Rossi

Last Published

September 24th, 2023

Functions in bayesm (2.2-1)

ghkvec

Compute GHK approximation to Multivariate Normal Integrals
lndMvst

Compute Log of Multivariate Student-t Density
simnhlogit

Simulate from Non-homothetic Logit Model
plot.bayesm.nmix

Plot Method for MCMC Draws of Normal Mixtures
mnlHess

Computes -Expected Hessian for Multinomial Logit
rDPGibbs

Density Estimation with Dirichlet Process Prior and Normal Base
rmnlIndepMetrop

MCMC Algorithm for Multinomial Logit Model
rbiNormGibbs

Illustrate Bivariate Normal Gibbs Sampler
cheese

Sliced Cheese Data
rdirichlet

Draw From Dirichlet Distribution
createX

Create X Matrix for Use in Multinomial Logit and Probit Routines
plot.bayesm.mat

Plot Method for Arrays of MCMC Draws
nmat

Convert Covariance Matrix to a Correlation Matrix
lndMvn

Compute Log of Multivariate Normal Density
customerSat

Customer Satisfaction Data
clusterMix

Cluster Observations Based on Indicator MCMC Draws
rordprobitGibbs

Gibbs Sampler for Ordered Probit
mixDen

Compute Marginal Density for Multivariate Normal Mixture
llmnl

Evaluate Log Likelihood for Multinomial Logit Model
rhierLinearModel

Gibbs Sampler for Hierarchical Linear Model
margarine

Household Panel Data on Margarine Purchases
rbprobitGibbs

Gibbs Sampler (Albert and Chib) for Binary Probit
breg

Posterior Draws from a Univariate Regression with Unit Error Variance
rhierBinLogit

MCMC Algorithm for Hierarchical Binary Logit
rmixture

Draw from Mixture of Normals
rhierMnlRwMixture

MCMC Algorithm for Hierarchical Multinomial Logit with Mixture of Normals Heterogeneity
runireg

IID Sampler for Univariate Regression
Scotch

Survey Data on Brands of Scotch Consumed
llmnp

Evaluate Log Likelihood for Multinomial Probit Model
mnpProb

Compute MNP Probabilities
condMom

Computes Conditional Mean/Var of One Element of MVN given All Others
cgetC

Obtain A List of Cut-offs for Scale Usage Problems
fsh

Flush Console Buffer
rmvst

Draw from Multivariate Student-t
lndIChisq

Compute Log of Inverted Chi-Squared Density
rivGibbs

Gibbs Sampler for Linear "IV" Model
rmnpGibbs

Gibbs Sampler for Multinomial Probit
plot.bayesm.hcoef

Plot Method for Hierarchical Model Coefs
summary.bayesm.nmix

Summarize Draws of Normal Mixture Components
rmixGibbs

Gibbs Sampler for Normal Mixtures w/o Error Checking
logMargDenNR

Compute Log Marginal Density Using Newton-Raftery Approx
mixDenBi

Compute Bivariate Marginal Density for a Normal Mixture
rscaleUsage

MCMC Algorithm for Multivariate Ordinal Data with Scale Usage Heterogeneity.
runiregGibbs

Gibbs Sampler for Univariate Regression
summary.bayesm.var

Summarize Draws of Var-Cov Matrices
detailing

Physician Detailing Data from Manchanda et al (2004)
orangeJuice

Store-level Panel Data on Orange Juice Sales
rhierNegbinRw

MCMC Algorithm for Negative Binomial Regression
rmultireg

Draw from the Posterior of a Multivariate Regression
rhierLinearMixture

Gibbs Sampler for Hierarchical Linear Model
tuna

Data on Canned Tuna Sales
momMix

Compute Posterior Expectation of Normal Mixture Model Moments
eMixMargDen

Compute Marginal Densities of A Normal Mixture Averaged over MCMC Draws
rmvpGibbs

Gibbs Sampler for Multivariate Probit
rnegbinRw

MCMC Algorithm for Negative Binomial Regression
summary.bayesm.mat

Summarize Mcmc Parameter Draws
rtrun

Draw from Truncated Univariate Normal
rsurGibbs

Gibbs Sampler for Seemingly Unrelated Regressions (SUR)
lndIWishart

Compute Log of Inverted Wishart Density
bank

Bank Card Conjoint Data of Allenby and Ginter (1995)
numEff

Compute Numerical Standard Error and Relative Numerical Efficiency
llnhlogit

Evaluate Log Likelihood for non-homothetic Logit Model
rivDP

Linear "IV" Model with DP Process Prior for Errors
rnmixGibbs

Gibbs Sampler for Normal Mixtures
rwishart

Draw from Wishart and Inverted Wishart Distribution