Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Choice Based Max-Diff Design

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 1 week ago - 1 month 1 week ago #258654 by Joffm
Replied by Joffm on topic Choice Based Max-Diff Design
What do you want to store in Dset1_S1?
{Dset1_S1=substr(Set_1,0,1)=='1' or substr(Set_1,1,1)=='1' or substr(Set_1,2,1)=='1' or substr(Set_1,3,1)=='1'}
This assignment gives you TRUE or FALSE. You only compare logical terms.


Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 1 month 1 week ago by Joffm.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 1 week ago - 1 month 1 week ago #258655 by Joffm
Replied by Joffm on topic Choice Based Max-Diff Design
Now I understood.
Create a question of type "array(number)". (RCont, like "ResultContainer") RCont_1_1 to RCont_6_2
Before you create a question of type equation with

{RCont_1_1=substr(Set_1,intval(Set1_1)-1,1)}
{RCont_1_2=substr(Set_1,intval(Set1_2)-1,1)}

{RCont_2_1=substr(Set_2,intval(Set2_1)-1,1)}
{RCont_2_2=substr(Set_2,intval(Set2_2)-1,1)}

{RCont_3_1=substr(Set_3,intval(Set3_1)-1,1)}
{RCont_3_2=substr(Set_3,intval(Set3_2)-1,1)}

{RCont_4_1=substr(Set_4,intval(Set4_1)-1,1)}
{RCont_4_2=substr(Set_4,intval(Set4_2)-1,1)}

{RCont_5_1=substr(Set_5,intval(Set5_1)-1,1)}
{RCont_5_2=substr(Set_5,intval(Set5_2)-1,1)}

{RCont_6_1=substr(Set_6,intval(Set6_1)-1,1)}
{RCont_6_2=substr(Set_6,intval(Set6_2)-1,1)}


You will get
 
with the codes of your model

Joffm



 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 1 month 1 week ago by Joffm.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 1 week ago #258657 by Joffm
Replied by Joffm on topic Choice Based Max-Diff Design
Hi,
your question was how to display a maxdiff depending on a given model.
This you got and everything to easy analize it.

I Want to store code "1" in Dset1_S1 if substr(Set_1,0,1)=='1' or substr(Set_1,1,1)=='1' or substr(Set_1,2,1)=='1' or substr(Set_1,3,1)=='1' and so on

This is a new question not really related to the maxdiff.
What means "and so on"?
You only want to store "1" (or nothing) in DSet1_S1? 
Or what?

Here you have to use an IF-function and you should use an appropiate function (like "strpos")
If you only store "1":
{DSet1_S1=if(strpos(join('#',Set_1),'1')>0,1,"")}
The added "#" avoids a result of "0", that also means "not found".
Read the manual about implemented functions

We do not know what is your further workflow.
Explain more detailled, or show.

Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 1 week ago #258688 by Joffm
Replied by Joffm on topic Choice Based Max-Diff Design
Sorry, I did not understand fully.

Send the lss export.

then store the code "1" for the hid1 as a option "1"(Selected as code 1) then similarly for code "2" contain in Set_1 then it store the code "2" and for 3 and so on upto code 8

As I showed before. In one question of type "equation" to set your "hit" variables.
{hid1_1=if(strpos(join('#',Set_1),'1')>0,"Y","")}
{hid1_2=if(strpos(join('#',Set_1),'2')>0,"Y","")}
{hid1_3=if(strpos(join('#',Set_1),'3')>0,"Y","")}
...
​​​​​​​{hid2_1=if(strpos(join('#',Set_2),'1')>0,"Y","")}
​​​​​​​...


And in my opinion this step to create new variables (hid1 to hid6) is not necessary.
What for? You have all information already in variables "Set_x". 

I have no idea what you want to do.

Then for variable hid2 it filter form Set_2 then for variable hid3 it filter form Set_3 and so on

Where and when do you want to do this?
You have your model, you show the 6 sets of each version.

And now?

Again. Send your lss export.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 1 week ago #258725 by Joffm
Replied by Joffm on topic Choice Based Max-Diff Design
1. In your other post I wrote that this does not work in array by columns.
2. I do not see any necessity.
You have a working solution, you have a solution for easy analysis.

Now I am out regarding your maxdiff.

Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 1 week ago #258801 by Joffm
Replied by Joffm on topic Choice Based Max-Diff Design

I just look for the best way to implemented the max-diff design
I think the below are best for me

This is not the design of the maxdiff.
These are the equations to restructure your results.

If you run this survey
 

File Attachment:

File Name: limesurvey...25_J.lss
File Size:134 KB


you get the following data (export to Excel)
Here displayed only the first two sets to explain, what you see
 
1. Set 1:
As you see the first respondent selected item 1 as "most" and item 2 as "least"
The first Set was "7162".
So the respondent selected object 7 as "most" and object 1 as "least".
And exactly this is stored in "RCont1_1" and "RCont1_2"

The second respondent also selected item 1 as "most" and item 2 as "least"
But here according to your model the set was "2543".
So the respondent selected object 2 as "most" and object 5 as "least".
And exactly this is stored in "RCont1_1" and "RCont1_2"

Analogue for the other sets.
2. Set 2:
As you see the first respondent selected item 2 as "most" and item 3 as "least"
The first Set was "3458".
So the respondent selected object 4 as "most" and object 5 as "least".
And exactly this is stored in "RCont2_1" and "RCont2_2"

The second respondent also selected item 2 as "most" and item 3 as "least"
But here according to your model the set was "6178".
So the respondent selected object 1 as "most" and object 7 as "least".
And exactly this is stored in "RCont1_1" and "RCont1_2"

I really do not know what else do you want.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

More
4 weeks 2 days ago #259138 by rajkumar_dms
Replied by rajkumar_dms on topic Choice Based Max-Diff Design
Hi Joffm,

Thank you so much for your help

Can we random the order of Answer option in this design and i had tried the the random order on but seems not random the Answer options

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 weeks 1 day ago #259154 by Joffm
Replied by Joffm on topic Choice Based Max-Diff Design
At the end of the script you will find this option.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

More
4 weeks 1 day ago #259158 by rajkumar_dms
Replied by rajkumar_dms on topic Choice Based Max-Diff Design
Hi Joffm,
Thanks for reply

I already Yes the Random Order option but seems it's doesn't work

Please Log in to join the conversation.

More
4 weeks 1 day ago #259189 by rajkumar_dms
Replied by rajkumar_dms on topic Choice Based Max-Diff Design
Hi Team,

Anyone can you help on this

Unable to rotate the answer option in Max-Diff design i have already YES the random order

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar Topic Author
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 weeks 23 hours ago #259194 by tpartner
Replied by tpartner on topic Choice Based Max-Diff Design
As indicated in the code comments, you need to "Set the second parameter to true for randomized rows", not set to "Yes".

Code:
maxDiff({QID}, true);

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: rajkumar_dms

Please Log in to join the conversation.

More
3 weeks 2 days ago #259762 by rajkumar_dms
Replied by rajkumar_dms on topic Choice Based Max-Diff Design
Hi,

Can you show below image in the mobile screen

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose