Learn R Programming

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

bayesm (version 2.0-5)

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), Multinomial Logit (MNL) and Multinomial Probit (MNP), Multivariate Probit, Negative Binomial (Poisson) Regression, Multivariate Mixtures of Normals (including clustering), Hierarchical Linear Models with normal prior and covariates, Hierarchical Multinomial Logits with 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.0-5

License

GPL (version 2 or later)

Maintainer

Peter Rossi

Last Published

September 24th, 2023

Functions in bayesm (2.0-5)

Scotch

Survey Data on Brands of Scotch Consumed
rhierBinLogit

MCMC Algorithm for Hierarchical Binary Logit
rbiNormGibbs

Illustrate Bivariate Normal Gibbs Sampler
cheese

Sliced Cheese Data
createX

Create X Matrix for Use in Multinomial Logit and Probit Routines
fsh

Flush Console Buffer
condMom

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

Compute GHK approximation to Multivariate Normal Integrals
rhierNegbinRw

MCMC Algorithm for Negative Binomial Regression
clusterMix

Cluster Observations Based on Indicator MCMC Draws
eMixMargDen

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

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

Compute Posterior Expectation of Normal Mixture Model Moments
init.rmultiregfp

Initialize Variables for Multivariate Regression Draw
detailing

Physician Detailing Data from Manchanda et al (2004)
mixDen

Compute Marginal Density for Multivariate Normal Mixture
rmixture

Draw from Mixture of Normals
logMargDenNR

Compute Log Marginal Density Using Newton-Raftery Approx
rmvpGibbs

Gibbs Sampler for Multivariate Probit
rmultireg

Draw from the Posterior of a Multivariate Regression
rsurGibbs

Gibbs Sampler for Seemingly Unrelated Regressions (SUR)
rnegbinRw

MCMC Algorithm for Negative Binomial Regression
runireg

IID Sampler for Univariate Regression
llnhlogit

Evaluate Log Likelihood for non-homothetic Logit Model
rscaleUsage

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

Household Panel Data on Margarine Purchases
simmnp

Simulate from Multinomial Probit Model
simmvp

Simulate from Multivariate Probit Model
rmvst

Draw from Multivariate Student-t
rhierLinearModel

Gibbs Sampler for Hierarchical Linear Model
mixDenBi

Compute Bivariate Marginal Density for a Normal Mixture
simmnl

Simulate from Multinomial Logit Model
llmnp

Evaluate Log Likelihood for Multinomial Probit Model
rbprobitGibbs

Gibbs Sampler (Albert and Chib) for Binary Probit
rmnpGibbs

Gibbs Sampler for Multinomial Probit
lndMvst

Compute Log of Multivariate Student-t Density
rivGibbs

Gibbs Sampler for Linear "IV" Model
breg

Posterior Draws from a Univariate Regression with Unit Error Variance
simmnlwX

Simulate from MNL given X Matrix
lndIChisq

Compute Log of Inverted Chi-Squared Density
rmnlIndepMetrop

MCMC Algorithm for Multinomial Logit Model
rdirichlet

Draw From Dirichlet Distribution
numEff

Compute Numerical Standard Error and Relative Numerical Efficiency
rtrun

Draw from Truncated Univariate Normal
rnmixGibbs

Gibbs Sampler for Normal Mixtures
simnhlogit

Simulate from Non-homothetic Logit Model
lndIWishart

Compute Log of Inverted Wishart Density
rmultiregfp

Draw from the Posterior of a Multivariate Regression
runiregGibbs

Gibbs Sampler for Univariate Regression
customerSat

Customer Satifaction Data
rwishart

Draw from Wishart and Inverted Wishart Distribution
rmixGibbs

Gibbs Sampler for Normal Mixtures w/o Error Checking
rhierMnlRwMixture

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

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

Evaluate Log Likelihood for Multinomial Logit Model
mnlHess

Computes -Expected Hessian for Multinomial Logit
lndMvn

Compute Log of Multivariate Normal Density
nmat

Convert Covariance Matrix to a Correlation Matrix
mnpProb

Compute MNP Probabilities