Dichotomous Independent Variables

Regression analysis always operates upon numerical data, but sometimes a key factor in a model could be categorical. We can easily incorporate categorical data into regression models through the use of a dummy variable—an artificial variable created to represent the different values of a categorical variable. In this chapter we'll illustrate the use of dummy variables for dichotomous variables, that is, variables that can take on only two different values.

For our first example, we'll return to the sonatas of Haydn and Mozart and some data that we first analyzed in Chapter 13 (Rydén 2007). If you recall in the sonata form, the composer introduces a melody in the exposition, and then elaborates and recapitulates ...

Get Practical Data Analysis with JMP® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.