Learn R Programming

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

bayesm (version 0.0-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, Multivariate Mixtures of Normals, Hierarchical Linear Models with normal prior and covariates, Hierarchical Multinomial Logits with mixture of normals prior and covariates, 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

11,239

Version

0.0-2

License

GPL (version 2 or later)

Maintainer

Peter Rossi

Last Published

September 24th, 2023

Functions in bayesm (0.0-2)

ghkvec

Compute GHK approximation to Multivariate Normal Integrals
nmat

Convert Covariance Matrix to a Correlation Matrix
rmvpGibbs

Gibbs Sampler for Multivariate Probit
rnmixGibbs

Gibbs Sampler for Normal Mixtures
llmnl

Evaluate Log Likelihood for Multinomial Logit Model
init.rmultiregfp

Initialize Variables for Multivariate Regression Draw
llmnp

Evaluate Log Likelihood for Multinomial Probit Model
fsh

Flush Console Buffer
lndIWishart

Compute Log of Inverted Wishart Density
rmixGibbs

Gibbs Sampler for Normal Mixtures w/o Error Checking
rmultiregfp

Draw from the Posterior of a Multivariate Regression
rmnlIndepMetrop

MCMC Algorithm for Multinomial Logit Model
rmultireg

Draw from the Posterior of a Multivariate Regression
momMix

Compute Posterior Expectation of Normal Mixture Model Moments
cgetC

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

Simulate from MNL given X Matrix
rwishart

Draw from Wishart and Inverted Wishart Distribution
rscaleUsage

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

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

Gibbs Sampler for Univariate Regression
lndIChisq

Compute Log of Inverted Chi-Squared Density
mnlHess

Computes -Expected Hessian for Multinomial Logit
rtrun

Draw from Truncated Univariate Normal
simmvp

Simulate from Multivariate Probit Model
rivGibbs

Gibbs Sampler for Linear "IV" Model
lndMvst

Compute Log of Multivariate Student-t Density
condMom

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

Compute Log of Multivariate Normal Density
llnhlogit

Evaluate Log Likelihood for non-homothetic Logit Model
rdirichlet

Draw From Dirichlet Distribution
rbprobitGibbs

Gibbs Sampler (Albert and Chib) for Binary Probit
simmnl

Simulate from Multinomial Logit Model
simmnp

Simulate from Multinomial Probit Model
eMixMargDen

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

Compute Marginal Density for Multivariate Normal Mixture
numEff

Compute Numerical Standard Error and Relative Numerical Efficiency
simnhlogit

Simulate from Non-homothetic Logit Model
breg

Posterior Draws from a Univariate Regression with Unit Error Variance
rhierLinearModel

Gibbs Sampler for Hierarchical Linear Model
rmixture

Draw from Mixture of Normals
runireg

Draw from Posterior for Univariate Regression
logMargDenNR

Compute Log Marginal Density Using Newton-Raftery Approx
rhierMnlRwMixture

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

Draw from Multivariate Student-t
rmnpGibbs

Gibbs Sampler for Multinomial Probit