LoslegenKostenlos loslegen

Attributes and levels

Let's take a look the data in chocolate_wide. If you type head(chocolate_wide) you'll see we have a lot of columns. The column labeled Selection stores our observed choice, similar to the Choice variable in the sportscar data. The columns labeled Brand1, Brand2 and Brand3 show the brands of the alternatives that were included in the choice questions. Similarly Price1, Price2 and Price3 contain the prices and Type1, Type2 and Type3 show the types.

Diese Übung ist Teil des Kurses

Choice Modeling for Marketing in R

Kurs anzeigen

Anleitung zur Übung

  • Use head to inspect the first rows in the data frame.
  • Use summary to see which Brands, Prices and Types were included in the survey.

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Look at the head() of chocolate_wide


# Use summary() to see which brands and types are in chocolate_wide
Code bearbeiten und ausführen