R Code Files
Chapters 8-10 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 code and data files at once.
Chapter | Code File (direct download) | Code File (TXT for viewing) |
---|---|---|
Chapter 8 | ChapmanRodden-csat-code.R | csat-code.txt |
Chapter 9 | ChapmanRodden-sunburst-code.R | sunburst-code.txt |
Chapter 10 | ChapmanRodden-maxdiff-code.R | maxdiff-code.txt |
All chapters (ZIP file) | CodeAndData.zip | --- |
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. It is used in Chapter 10 (MaxDiff) of the book. 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")