Functions for Hierarchical Bayesian Estimation: A Flexible Approach
Switch branches/tags
Nothing to show
Clone or download
Jeff Dumont Jeff Dumont
Jeff Dumont and Jeff Dumont Dealing with the CRAN notes and warnings
Latest commit 8f29e21 Oct 13, 2018
Failed to load latest commit information.
data Dropped example_MNL data and documentation. May 21, 2015
NAMESPACE Dealing with the CRAN notes and warnings Oct 13, 2018

This Site Has Changed!

The RSGHB model examples have moved to their own GitHub site:

The 2014 ART Forum poster code has moved to its own GitHub site:

The RSGHB Package

This package can be used to estimate models using a hierarchical Bayesian framework. The flexibility comes in allowing the user to specify the likelihood function directly instead of assuming predetermined model structures. Types of models that can be estimated with this code include the family of discrete choice models (Multinomial Logit, Mixed Logit, Nested Logit, Error Components Logit and Latent Class) as well ordered response models like ordered probit and ordered logit. In addition, the package allows for flexibility in specifying parameters as either fixed (non-varying across individuals) or random with continuous distributions. Parameter distributions supported include normal, positive log-normal, negative log-normal, positive truncated normal and the Johnson SB distribution.

Kenneth Train's Matlab and Gauss code for doing hierarchical Bayesian estimation has served as the basis for a few of the functions included in this package. These Matlab/Gauss functions have been rewritten to be optimized within R. Considerable code has been added to increase the flexibility and usability of the code base.

Train's original Gauss and Matlab code can be found here:

See Train's chapter on HB in Discrete Choice with Simulation here:;

and his paper on using HB with non-normal distributions here:

RSGHB and all its example files are covered by the GPL 3 license.


The authors would also like to thank the invaluable contributions of Stephane Hess and the Choice Modelling Centre:


RSGHB and its examples are covered by the GPL-3 license. See for more detail.