Rcbc utilities for discrete choice models in R

I just posted my “Rcbc” code (Rcbc R scripts), which demonstrates some core functionality for choice-based conjoint analysis (CBC) in R. This code is in development, and represents a package-in-progress. [For those new to CBC, it allows one to determine user preference and tradeoffs among products or product features using a variety of logistic regression.]

The Rcbc code is primarily useful for didactic purposes to show how conjoint models work and to show a relatively easy-to-understand gradient descent method for aggregate multinomial logit model estimation (MNL). It may help supplement commercial CBC software (e.g., Sawtooth Software) for some analytic tasks such as MNL estimation on subsamples, or determining attribute importance, or for getting data and design matrices into a simple format. Note that more complete R functionality for conjoint models is provided in the “bayesm”, “clogit”, and “mlogit” packages.

One novel and useful feature in my Rcbc package is a new attribute importance estimation function (cf. ART Forum poster on attribute importance).

I have not yet written a code vignette, but the code is reasonably well-commented and there are various executable walkthroughs presented inside “if false” blocks in the code. Note that there may be both large and small bugs!

To use: (1) save the file as a “.R” file. (2) source it in its entirety (warning: functions will go into global namespace). (3) read the code and try the examples.

Rcbc R scripts

Leave a Comment