In the context of a number of research projects, the Mobility Analytics Research Group (MARG) has developed a number of codes in the open source R programming language. MARG is pleased to make these codes available through this website. The bank of R codes will likely be expanded as the group undertakes additional research projects that involve model estimation and application tasks. The Mobility Analytics Research Group does not plan to develop a comprehensive suite of model codes; packages such as GAUSS, Matlab, NLOGIT, Biogeme, ALOGIT, and others provide far more extensive model estimation and application capabilities. In addition, Professor Chandra Bhat has made a number of advanced choice model estimation and application codes (programmed in GAUSS and R) available at his website. Individuals, groups, or organizations interested in contributing further to the bank of R codes available at this site are welcome to contact the Mobility Analytics Research Group team. Please cite this webpage (along with other references cited below) in any work that utilizes the R codes made available through this site. This website should be cited as follows:
This code covers basic linear regression, count regression models (poisson and negative binomial), zero-inflated versions of poisson and negative binomial regression models, ordered probit, and multinomial logit (accommodates both generic and alternative-specific variables, but not variable choice sets across observations) models.
This code may be used to estimate the multiple discrete-continuous extreme value (MDCEV) model. There are two versions of the model, one in which the choice set includes an outside good that is consumed at least to some degree by all observations in the data set, and the second in which the choice set does not include such an outside good. Both codes may be used to estimate either an alpha or a gamma profile of the MDCEV model. These R codes are entirely based on the GAUSS codes developed by Professor Chandra Bhat's research group. Please cite the following papers:
The MDCEV model application code may be used to calibrate, validate, and apply MDCEV models in forecasting mode. There are two versions of the MDCEV forecasting code - one in which the choice set includes an outside good that is consumed at least to some degree by all observations in the data set, and the second in which the choice set does not include such an outside good. The codes may be used to apply both alpha-profile and gamma-profile versions of the MDCEV model. These R codes are entirely based on the GAUSS codes developed by Professor Chandra Bhat's research group. Please cite the following paper, in addition to the two papers referenced above in the context of the MDCEV model estimation code: