Choice data in two files

Choice Modeling for Marketing in R

Elea McDonnell Feit

Assistant Professor of Marketing, Drexel University

Choice data in two files

Alternatives in one file

sportscar_alts[1:3, ]
  resp_id ques alt seat  trans convert price
1       1    1   1    2 manual     yes    35
2       1    1   2    5   auto      no    40
3       1    1   3    5   auto      no    30

Choices in another file

sportscar_choices[1, ]
  resp_id ques segment choice
1       1    1   basic      3
Choice Modeling for Marketing in R

Merging the two files

sportscar <- merge(sportscar_choices, sportscar_alts, 
                     by = c("resp_id", "ques"))

sportscar
     resp_id ques segment choice alt seat  trans convert price
1          1    1   basic      3   1    2 manual     yes    35
2          1    1   basic      3   2    5   auto      no    40
3          1    1   basic      3   3    5   auto      no    30
4          1   10   basic      1   1    5   auto     yes    40
5          1   10   basic      1   2    4   auto      no    30
6          1   10   basic      1   3    2 manual     yes    40
Choice Modeling for Marketing in R

Let's practice!

Choice Modeling for Marketing in R

Preparing Video For Download...