Instructor Content

Chapman & Feit, R for Marketing Research and Analytics

R code in all files is (c) 2015-2019 Springer. Materials are provided for instructor, student, and classroom usage to complement R for Marketing Research and Analytics.


Instructor Slides: Table of Contents

Slides will work for both 1st and 2nd editions. Chapter 14 (Behavior Sequences) is specific to the 2nd edition. See the respective Code files for exact correspondance to each edition (the slides are somewhat more general).

An example notebook that may be a starting point for exercises and homework assignments is here: Example Notebook. We suggest that students work inside R notebooks and submit the work either as notebooks themselves or as PDFs created with the "Knit to PDF" function.

Readers of the 1st edition may use the Exercises; see the Exercises page.

Chapter Slides Slide code Markdown
Chapter 1: Welcome to R HTML (na) RPres
Chapter 2: The R Language HTML Code RPres
Chapter 3: Describing Data HTML Code RPres
Chapter 4: Relationships between Continuous Variables HTML Code RPres
Chapter 5: Comparing Groups: Tables and Visualizations HTML Code RPres
Chapter 6: Comparing Groups: Statistical Tests HTML Code RPres
Chapter 7: Identifying Drivers of Outcomes: Linear Models HTML Code RPres
Chapter 8: Reducing Data Complexity (PCA and EFA) PDF (Ch 8 & 10) (full code) Rmd/Beamer
Chapter 9: Additional Linear Model Topics (Collinearity, Logistic, HLM) HTML Code RPres
Chapter 10: Confirmatory Factor Analysis [and, TBD, SEM] PDF (Ch 8 & 10) (full code) Rmd/Beamer
Chapter 11: Segmentation: Clustering and Classification HTML Code RPres
Chapter 12: Association Rules for Market Basket Analysis HTML Code RPres
Chapter 13: Choice Modeling (Choice-based conjoint analysis) HTML Code RPres
Chapter 14: Behavior Sequences (such as web logs) coming soon coming soon coming soon


Using the slides

The files here represent three different views of the material:

  • Slides: HTML and PDF. The HTML links are slides ready to present in the browser. Note that the HTML display is the slide; there is no PowerPoint or other file to download.
    • To advance from slide to slide, use the navigation icons on the slides, or the cursor keys (left, right).
    • To see all slides, you can use "o" to see an overview.
    • For the 2 PDF chapters, you can download the PDF (or display in browser).
  • Slide code:
    • .R files: These are generated from the markdown files and contain code snippets as shown in the slides. They could be used by students in class to step through the code chunks being discussed. Suggested usage: students could copy and paste the full .R file into the RStudio editor and step through it during class.
    • Full code: When slide-specific code is not available, this is the full .R file corresponding to the book chapter.
  • Markdown: Rpres and Rmd. These contain the full slide content and may be edited by an instructor (please retain the original authors' attribution and copyright notice).
    • Rpres files are specific to markdown in RStudio. If you build new slides, you may need to download linked JPGs or other images.
    • If you edit or add code to the .RPres files, you may wish to create .R code files that match your customized slides. The R script we use to generate the .R files as listed above is here: R code extractor for slides. To use it, edit the working directory, file list, and definition of "infile" and "outfile" to match your setup.
      • Note: a standard way to extract text from .Rpres/.Rmd file is the knitr::purl() function. (The script here is provided because it may be more easily customizable for classroom purposes.)