R Code Files

Chapters 2-14 each have an accompanying .R code file. You can access the code files one at a time, or as a single ZIP file with all chapters at once.

Note: for 1st edition specifically, see: Code Files for 1st edition.

Readers of the 1st edition are also welcomed to use the 2nd edition code shown here; differences are mostly easy to follow.

Other code

choicetools is an R package in development with utility functions for simulating conjoint surveys, estimating models, working with MaxDiff data, doing market simulation, and other tasks. Documentation is in progress; check the vignettes and/or read the .R file headers for example code. Note examples located in if (FALSE) blocks in the code.

To install choicetools:

# install devtools package first, if needed: install.packages("devtools")
library(devtools) 
install_github("cnchapman/choicetools")

R-Forge Project Access

Direct access to the R-Forge project site, i.e., hosting this website (not generally needed) is here: https://r-forge.r-project.org/projects/r-marketing/