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.- All chapters: Download code Code, single ZIP file
- All chapters: Download code, data, and exercises: Code, Data, and Exercises, single ZIP file
- Chapter 2: Chapter2-ChapmanFeit.R
- Chapter 3: Chapter3-ChapmanFeit.R
- Chapter 4: Chapter4-ChapmanFeit.R
- Chapter 5: Chapter5-ChapmanFeit.R
- Chapter 6: Chapter6-ChapmanFeit.R
- Chapter 7: Chapter7-ChapmanFeit.R
- Chapter 8: Chapter8-ChapmanFeit.R
- Chapter 9: Chapter9-ChapmanFeit.R
- Chapter 10: Chapter10-ChapmanFeit.R
- Chapter 11: Chapter11-ChapmanFeit.R
- Chapter 12: Chapter12-ChapmanFeit.R
- Chapter 13: Chapter13-ChapmanFeit.R
- Chapter 14: Chapter14-ChapmanFeit.R
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/