O'Reilly logo

Logistic Regression Using SAS®: Theory and Application by Paul D. Allison

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

7.2. Chocolate Example

The discrete choice model has often been used in studies of consumer preference. Consider the following experiment (SAS Institute 1995). Ten people were each given eight chocolate bars with varying characteristics. After eating the bars, they were asked to choose the one they liked best. The bars were distinguished by the following variables:

DARK 0=milk chocolate, 1=dark chocolate

SOFT 0=hard center, 1=soft center

NUTS 0=no nuts, 1=nuts

Each subject tasted eight chocolate bars with all possible combinations of these characteristics. The aim was to determine which characteristics of the bars affected people’s choices. Here are the data:

DATA my.chocs; INPUT id choose dark soft nuts @@; DATALINES; 1 0 0 0 0 1 0 0 0 1 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required