1

Im using ChoiceModelR to analyse a conjoint designe. Every participants had to answer 12 choice-sets, each consisting of 3 choice-options plus no-choice. 6 Variables described the choice-options.

My imput-data for ChoiceModelR looks like this:

> head(dataChoice_train)
      participantID ques alt V_1 V_2 V_3 V_4 V_5 V_6 choice.cbc
    1      12628880    1   1   3   6   3   2   1   1          2
    2      12628880    1   2   1   5   3   1   5   2          0
    3      12628880    1   3   2   3   4   2   5   1          0
    4      12628880    2   1   4   2   1   2   1   1          2
    5      12628880    2   2   6   7   3   3   3   2          0
    6      12628880    2   3   1   5   4   1   5   2          0

Participant 12628880 ownes the first 12 * 3 = 36 rows, the next 36 belong to participant 12628881 and so on.

I run

hb.post.baseline <- choicemodelr(data=dataChoice_train, xcoding=rep(0, 6),
                                 mcmc=list(R=20000, use=10000),
                                 options=list(save=TRUE,none=TRUE))

> dim(hb.post.baseline$betadraw)
[1]  846   23 1000

I got all my 846 participants and all my 23 different realisations for my variables (not including the reference realisation for each variable). I got 1000 estimation which fits whit the standard keep value of 10.

My Question:

The thing i am worried about is the ordering of my participants. I would expect, that nothing has changed but i am not sure. I would expect the first 36 rows of dataChoice_train (belonging to participant 12628880) would be represented in the top layer of hb.post.baseline$betadraw (so in hb.post.baseline$betadraw[1,,]).

This way i could use unique(dataChoice_train) to assigne the participantID to my file of betadraws.

Could somebody confirm this? Is there any better/more straight forward method of assigning the calculated betas to the participants?

Thanks in advance!

merv
  • 67,214
  • 13
  • 180
  • 245
TinglTanglBob
  • 627
  • 1
  • 4
  • 14

0 Answers0