Learn R Programming

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

bayesm (version 2.0-9)

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 Linear Models with mixture of normals 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

10,837

Version

2.0-9

License

GPL (version 2 or later)

Maintainer

Peter Rossi

Last Published

September 24th, 2023

Functions in bayesm (2.0-9)

lndIChisq

Compute Log of Inverted Chi-Squared Density
simmnlwX

Simulate from MNL given X Matrix
simmnl

Simulate from Multinomial Logit Model
nmat

Convert Covariance Matrix to a Correlation Matrix
rhierNegbinRw

MCMC Algorithm for Negative Binomial Regression
llmnp

Evaluate Log Likelihood for Multinomial Probit Model
rmultireg

Draw from the Posterior of a Multivariate Regression
logMargDenNR

Compute Log Marginal Density Using Newton-Raftery Approx
llmnl

Evaluate Log Likelihood for Multinomial Logit Model
numEff

Compute Numerical Standard Error and Relative Numerical Efficiency
rnmixGibbs

Gibbs Sampler for Normal Mixtures
fsh

Flush Console Buffer
breg

Posterior Draws from a Univariate Regression with Unit Error Variance
detailing

Physician Detailing Data from Manchanda et al (2004)
rdirichlet

Draw From Dirichlet Distribution
rivGibbs

Gibbs Sampler for Linear "IV" Model
lndMvst

Compute Log of Multivariate Student-t Density
rmnlIndepMetrop

MCMC Algorithm for Multinomial Logit Model
clusterMix

Cluster Observations Based on Indicator MCMC Draws
rmvst

Draw from Multivariate Student-t
momMix

Compute Posterior Expectation of Normal Mixture Model Moments
rscaleUsage

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

MCMC Algorithm for Negative Binomial Regression
rbprobitGibbs

Gibbs Sampler (Albert and Chib) for Binary Probit
condMom

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

Survey Data on Brands of Scotch Consumed
cgetC

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

Draw from Mixture of Normals
simnhlogit

Simulate from Non-homothetic Logit Model
rhierLinearMixture

Gibbs Sampler for Hierarchical Linear Model
simmnp

Simulate from Multinomial Probit Model
rtrun

Draw from Truncated Univariate Normal
rhierBinLogit

MCMC Algorithm for Hierarchical Binary Logit
rmultiregfp

Draw from the Posterior of a Multivariate Regression
simmvp

Simulate from Multivariate Probit Model
ghkvec

Compute GHK approximation to Multivariate Normal Integrals
rsurGibbs

Gibbs Sampler for Seemingly Unrelated Regressions (SUR)
init.rmultiregfp

Initialize Variables for Multivariate Regression Draw
cheese

Sliced Cheese Data
mnpProb

Compute MNP Probabilities
runireg

IID Sampler for Univariate Regression
rhierMnlRwMixture

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

Gibbs Sampler for Multivariate Probit
margarine

Household Panel Data on Margarine Purchases
mnlHess

Computes -Expected Hessian for Multinomial Logit
rbiNormGibbs

Illustrate Bivariate Normal Gibbs Sampler
rmnpGibbs

Gibbs Sampler for Multinomial Probit
mixDenBi

Compute Bivariate Marginal Density for a Normal Mixture
eMixMargDen

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

Evaluate Log Likelihood for non-homothetic Logit Model
runiregGibbs

Gibbs Sampler for Univariate Regression
bank

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

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

Customer Satifaction Data
rwishart

Draw from Wishart and Inverted Wishart Distribution
lndMvn

Compute Log of Multivariate Normal Density
lndIWishart

Compute Log of Inverted Wishart Density
rhierLinearModel

Gibbs Sampler for Hierarchical Linear Model
mixDen

Compute Marginal Density for Multivariate Normal Mixture
rmixGibbs

Gibbs Sampler for Normal Mixtures w/o Error Checking