Learn R Programming

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

RSGHB (version 1.0.2)

Functions for Hierarchical Bayesian Estimation: A Flexible Approach

Description

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/negative log-normal, positive/negative censored 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: http://elsa.berkeley.edu/Software/abstracts/train1006mxlhb.html See Train's chapter on HB in Discrete Choice with Simulation here: http://elsa.berkeley.edu/books/choice2.html; and his paper on using HB with non-normal distributions here: http://elsa.berkeley.edu/~train/trainsonnier.pdf

Copy Link

Version

Install

install.packages('RSGHB')

Monthly Downloads

1,093

Version

1.0.2

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Jeff Dumont

Last Published

May 30th, 2014

Functions in RSGHB (1.0.2)

vech

Vectorizes a symmetric matrix
RSGHB-internal

Internal RSGHB Functions
choicedata

A synthetic discrete choice dataset
plotC

Plots the content of the C file
Example2_A

An example A file
Example2_Bsd

An example Bsd file
plotF

Plots the content of the F file
plotA

Plots the content of the A file
doHB

Starts the model estimation process
Example2_Csd

An example Csd file
xpnd

Convert a vector into a symmetrix matrix
Example2_C

An example C file
plotLog

Plots statistics contained in a model's the log file
Example2_D

An example D file
Example2_B

An example B file
Example1_F

An example F file