Learn R Programming

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

bayesm (version 1.1-2)

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), Multinomial Logit (MNL) and Multinomial Probit (MNP), Multivariate Probit, Negative Binomial Regression, Multivariate Mixtures of Normals, 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 Allenby, McCulloch and Rossi.

Copy Link

Version

Install

install.packages('bayesm')

Monthly Downloads

10,837

Version

1.1-2

License

GPL (version 2 or later)

Maintainer

Peter Rossi

Last Published

September 24th, 2023

Functions in bayesm (1.1-2)

eMixMargDen

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

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

Simulate from Multivariate Probit Model
Scotch

Survey Data on Brands of Scotch Consumed
customerSat

Customer Satifaction Data
rhierBinLogit

MCMC Algorithm for Hierachical Binary Logit
margarine

Household Panel Data on Margarine Purchases
llnhlogit

Evaluate Log Likelihood for non-homothetic Logit Model
rwishart

Draw from Wishart and Inverted Wishart Distribution
cheese

Sliced Cheese Data
llmnp

Evaluate Log Likelihood for Multinomial Probit Model
mixDen

Compute Marginal Density for Multivariate Normal Mixture
rmultiregfp

Draw from the Posterior of a Multivariate Regression
llmnl

Evaluate Log Likelihood for Multinomial Logit Model
init.rmultiregfp

Initialize Variables for Multivariate Regression Draw
detailing

Physician Detailing Data from Manchanda et al (2004)
runireg

Draw from Posterior for Univariate Regression
lndIChisq

Compute Log of Inverted Chi-Squared Density
createX

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

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

Gibbs Sampler for Linear "IV" Model
cgetC

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

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

Gibbs Sampler for Univariate Regression
rmvpGibbs

Gibbs Sampler for Multivariate Probit
mnlHess

Computes -Expected Hessian for Multinomial Logit
logMargDenNR

Compute Log Marginal Density Using Newton-Raftery Approx
lndMvst

Compute Log of Multivariate Student-t Density
ghkvec

Compute GHK approximation to Multivariate Normal Integrals
lndIWishart

Compute Log of Inverted Wishart Density
rnmixGibbs

Gibbs Sampler for Normal Mixtures
rmultireg

Draw from the Posterior of a Multivariate Regression
rmixture

Draw from Mixture of Normals
rtrun

Draw from Truncated Univariate Normal
rbprobitGibbs

Gibbs Sampler (Albert and Chib) for Binary Probit
rmixGibbs

Gibbs Sampler for Normal Mixtures w/o Error Checking
fsh

Flush Console Buffer
rdirichlet

Draw From Dirichlet Distribution
simmnl

Simulate from Multinomial Logit Model
simmnp

Simulate from Multinomial Probit Model
rnegbinRw

MCMC Algorithm for Negative Binomial Regression
rscaleUsage

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

Simulate from Non-homothetic Logit Model
rmvst

Draw from Multivariate Student-t
nmat

Convert Covariance Matrix to a Correlation Matrix
lndMvn

Compute Log of Multivariate Normal Density
simmnlwX

Simulate from MNL given X Matrix
momMix

Compute Posterior Expectation of Normal Mixture Model Moments
breg

Posterior Draws from a Univariate Regression with Unit Error Variance
rhierNegbinRw

MCMC Algorithm for Negative Binomial Regression
numEff

Compute Numerical Standard Error and Relative Numerical Efficiency
rhierLinearModel

Gibbs Sampler for Hierarchical Linear Model
rmnpGibbs

Gibbs Sampler for Multinomial Probit
rmnlIndepMetrop

MCMC Algorithm for Multinomial Logit Model