Estimates coefficients of a Hierarchical Bayes Multinomial Logit Model
The ChoiceModelR package includes the function choicemodelr that implements an MCMC algorithm to estimate a hierarchical multinomial logit model with a normal heterogeneity distribution. The algorithm uses a hybrid Gibbs Sampler with a random walk metropolis step for the MNL coefficients for each unit. Means of the distribution of heterogeneity can optionally be modeled as a linear function of unit descriptor variables.
The dependent variable can be either discrete or a share. If the dependent variable y_i is a share (0 to 1 inclusive), instead of discrete (1 ,..., nalt; where nalt is the number of alternatives in choice set), then each choice observation is replicated wgt times with alternative i chosen in wgt*y_i observations. Independent variables can be continuous or discrete, with order constraints imposed on estimated coefficients.
The basic structure of the code for this algorithm was derived from the rhierMnlRwMixture program of the bayesm package available at cran.r-project.org. Significant modifications were made to greatly reduce the run time, to allow constraints on estimated parameters, handle varying number of choice observations, handle varying number of choice alternatives within each choice scenario, and to optionally allow the dependent variable to be a share (between 0 and 1) instead of discrete (1 ,..., nalt; where nalt is the number of alternatives in choice set).
Ryan Sermas, assisted by John V. Colias Ph.D., at Decision Analyst, Inc. DecisionAnalystR@decisionanalyst.com
Maintainer: John V. Colias <firstname.lastname@example.org>
Rossi, Peter; Allenby, Greg M.; and McCulloch, Robert (2005), Bayesian Statistics and Marketing, John Wiley and Sons.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.