- Posts: 12943
- Thank you received: 3979
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Choice Based Max-Diff Design
- Joffm
- Offline
- LimeSurvey Community Team
{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
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
- Posts: 12943
- Thank you received: 3979
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
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
- Posts: 12943
- Thank you received: 3979
your question was how to display a maxdiff depending on a given model.
This you got and everything to easy analize it.
This is a new question not really related to the maxdiff.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
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
- Offline
- LimeSurvey Community Team
- Posts: 12943
- Thank you received: 3979
Send the lss export.
As I showed before. In one question of type "equation" to set your "hit" variables.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
{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.
Where and when do you want to do this?Then for variable hid2 it filter form Set_2 then for variable hid3 it filter form Set_3 and so on
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
- Offline
- LimeSurvey Community Team
- Posts: 12943
- Thank you received: 3979
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
- Offline
- LimeSurvey Community Team
- Posts: 12943
- Thank you received: 3979
This is not the design of the maxdiff.I just look for the best way to implemented the max-diff design
I think the below are best for me
These are the equations to restructure your results.
If you run this survey
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.
- rajkumar_dms
- Offline
- Senior Member
- Posts: 42
- Thank you received: 0
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
- Offline
- LimeSurvey Community Team
- Posts: 12943
- Thank you received: 3979
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Please Log in to join the conversation.
- rajkumar_dms
- Offline
- Senior Member
- Posts: 42
- Thank you received: 0
Thanks for reply
I already Yes the Random Order option but seems it's doesn't work
Please Log in to join the conversation.
- rajkumar_dms
- Offline
- Senior Member
- Posts: 42
- Thank you received: 0
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
- Topic Author
- Offline
- LimeSurvey Community Team
- Posts: 10109
- Thank you received: 3595
maxDiff({QID}, true);
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Please Log in to join the conversation.
- rajkumar_dms
- Offline
- Senior Member
- Posts: 42
- Thank you received: 0
Please Log in to join the conversation.