help garbage_mixl

Title

garbage_mixl -- Bayesian garbage class mixed logit model estimation in Stata

Syntax

garbage_mixl
depvar
[if] [in] ,
rand(varlist)
id(varname)
group(varname)
[burn(#)
mcmc(#)
bernoulli(#)
nogarbage
diag
invwishart]

Description

garbage_mixl fits standard and garbage class mixed logit models using Bayesian MCMC methods via a C++ plugin for computational efficiency

Options for garbage_mixl

rand(varlist) is required and specifies the independent variables. All independent variables’ coefficients are assumed to be random; fixed coefficients are not supported.

id(varname) is required and specifies a numeric identifier variable for the decision
makers.

group(varname) is required and specifies a numeric identifier variable
for the choice occasions.

burn(#) specifies the number of burn-in MCMC draws. The default and minimum value is burn(50000).

mcmc(#) specifies the number of MCMC draws used to approximate the posterior after the burn-in iterations. The default and minimum value is mcmc(50000).

bernoulli(#) specifies the prior distribution for the individual-level MIXL class probabilities in the garbage class mixed logit model. The default is bernoulli(0.5). Note
that the garbage class mixed logit results tend to be sensitive to the Bernoulli prior, particularly with limited observations per decision maker. Therefore,
garbage_mixl requires at least as many observations per decision maker as the number of random parameters specified.

nogarbage specifies that garbage_mixl fits a standard mixed logit model.

diag specifies that a diagonal (uncorrelated) mixed logit model is being fit, with half-Normal(10) priors on the standard deviations of the normal mixing distributions.

invwishart replaces the default Huang and Wand (2013) scaled inverse Wishart prior with a conventional inverse Wishart prior on the variance-covariance matrix. The
inverse Wishart prior is specified with a unit scale matrix and degrees of freedom equal to the number of random parameters. This prior
is more informative and restrictive than the default prior, and seldom recommended.

Examples

The following examples use traindata.dta, which is described in Hole (2007).

Example 1: The standard garbage class MIXL model

. use http://fmwww.bc.edu/repec/bocode/t/traindata.dta

. garbage_mixl y, rand (price contract local wknown tod seasonal) id(pid) group(gid)

Example 2: The garbage class MIXL model with user-specified Bernoulli priors

. garbage_mixl y, rand (price contract local wknown tod seasonal) id(pid) group(gid) bernoulli(0.8)

Note: the informative Bernoulli(0.8) prior specifies for each decision maker 0.8 prior probability of MIXL class membership, which corresponds to the prior expectation that the size of the garbage class is approximately 20%.
As shown, this changes the posterior mean garbage class estimate from roughly 10% in example 1 to 6.5% in example 2.

Example 3: The standard MIXL model

. garbage_mixl y, rand (price contract local wknown tod seasonal) id(pid) group(gid) nogarbage

Example 4: Standard MIXL model with an inverse Wishart prior

. garbage_mixl y, rand (price contract local wknown tod seasonal) id(pid) group(gid) nogarbage invwishart

Note: this syntax provides close-to-identical estimates as the ssc -bayesmixedlogit- command of Matthew Baker.

Example 5: Standard (diagonal) MIXL model

. garbage_mixl y, rand (price contract local wknown tod seasonal) id(pid) group(gid) nogarbage diag

References

Hole AR. 2007. Fitting mixed logit models by using maximum simulated likelihood. The Stata Journal 7: 388-401.

Huang A and Wand MP. 2013. Simple marginally noninformative prior distributions for covariance matrices. Bayesian Analysis 8(2): 439-452.

Jonker MF. 2022. The garbage class mixed logit model. Value in Health 25(11): 1871-1877.

Author

Marcel F. Jonker (marcel@mfjonker.com), Erasmus University Rotterdam, The Netherlands.