Exercises

Chapman & Feit, R for Marketing Research and Analytics, 2nd ed

R code in all files is (c) 2019 Springer. Materials are provided to complement R for Marketing Research and Analytics, 2nd ed..


Exercises: Table of Contents

.R files are available now for all exercises. Notebook files will be posted soon. Note that .R files download immediately to your browser's download destination.

Be sure to read the introduction in each chapter that explains background for the Exercises, how to access data, and so forth.

Exercises are new in the 2nd edition. However, readers of the 1st edition are welcomed to use them. Read the questions preceeding each code section and work out a solution before reading the code. The notebooks (coming soon) will contain the text of each exercise. A PDF with all of the Exercises (and without code solutions) is here: Compiled Exercises for 2nd Edition. With the exception of the new Chapter 14, readers of the 1st edition should be able to solve all of the exercises.

Also available: a single ZIP file with all .R exercise code. After downloading, unzip it in a folder of your choice.

Example notebook: An example notebook with some initial guidance on personal and classroom usage is here: Example notebook. Open it in RStudio and use as a staring point for your code files and/or homework.

Note on solutions: most problems in R have multiple, sometimes quite different solutions. The solutions here are not intended to be definitive; they are examples. Try to work out your own, and then compare them!

Chapter Raw .R RStudio Notebook
(coming soon)
Chapter 1: Welcome to R [no exercises] (na) (na)
Chapter 2: The R Language [Exercises] R code coming soon
Chapter 3: Describing Data [Exercises] R code coming soon
Chapter 4: Relationships between Continuous Variables [Exercises] R code coming soon
Chapter 5: Comparing Groups: Tables and Visualizations [Exercises] R code coming soon
Chapter 6: Comparing Groups: Statistical Tests [Exercises] R code coming soon
Chapter 7: Identifying Drivers of Outcomes: Linear Models [Exercises] R code coming soon
Chapter 8: Reducing Data Complexity (PCA and EFA) [Exercises] R code coming soon
Chapter 9: Additional Linear Model Topics (Collinearity, Logistic, HLM) [Exercises] R code coming soon
Chapter 10: Confirmatory Factor Analysis and SEM [Exercises] R code coming soon
Chapter 11: Segmentation: Clustering and Classification [Exercises] R code coming soon
Chapter 12: Association Rules for Market Basket Analysis [Exercises] R code coming soon
Chapter 13: Choice Modeling (Choice-based conjoint analysis) [Exercises] R code coming soon
Chapter 14: Behavior Sequences [Exercises] R code coming soon
All chapters: PDF of Exercise text (no code) ZIP with all solutions (na)


About the Exercise Materials

The files present two views of the material:

  • Raw code:
    • .R files: These correspond in order to the exercises in each chapter.
  • Notebook: (to be completed)