- Posts: 6
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Conducting a conjoint design - Show different images to certain test groups
- Chrissl11
- Topic Author
- Offline
- New Member
Less
More
5 years 2 months ago #179677
by Chrissl11
Conducting a conjoint design - Show different images to certain test groups was created by Chrissl11
Hi there
I hope there is no similar topic already, if so, please apologize, but I could not find a complete answer to my question.
I currently try to conduct a conjoint design in LimeSurvey.
In the end, I will have 50 different testgroups, therefore I use a hidden question, in the given example only 8 instead of 50.
The hidden question is this and seem to work, that is good so far I use equation as a question type.
{rand(1,}
However, the next question is supposed to be the first conjoint table, in the end it should look like this (3.jpg) and the attributes should change to a certain design, which I will tell the programm. However, that's where I struggle, I tried a lot, but it is not working and now showing all four pictures in one cell.
Can someone please help me and tell me what is still wrong?
Currently I only tried to set up the first cell. That is the code used in this cell:
<td>{if(random.NAOK=='1','2'), '<img alt="" src="/upload/surveys/559527/images/01_Balea.jpg" />'}, {if(random.NAOK=='3','4'),'<img alt="" src="/upload/surveys/559527/images/01_Nivea.jpg" />'}, {if(random.NAOK=='5','6'), '<img alt="" src="/upload/surveys/559527/images/01_Lavera.jpg" />'}, {if(random.NAOK=='7','8'), '<img alt="" src="/upload/surveys/559527/images/01_Dove.png" />'}</td>
Thanks for your help
I hope there is no similar topic already, if so, please apologize, but I could not find a complete answer to my question.
I currently try to conduct a conjoint design in LimeSurvey.
In the end, I will have 50 different testgroups, therefore I use a hidden question, in the given example only 8 instead of 50.
The hidden question is this and seem to work, that is good so far I use equation as a question type.
{rand(1,}
However, the next question is supposed to be the first conjoint table, in the end it should look like this (3.jpg) and the attributes should change to a certain design, which I will tell the programm. However, that's where I struggle, I tried a lot, but it is not working and now showing all four pictures in one cell.
Can someone please help me and tell me what is still wrong?
Currently I only tried to set up the first cell. That is the code used in this cell:
<td>{if(random.NAOK=='1','2'), '<img alt="" src="/upload/surveys/559527/images/01_Balea.jpg" />'}, {if(random.NAOK=='3','4'),'<img alt="" src="/upload/surveys/559527/images/01_Nivea.jpg" />'}, {if(random.NAOK=='5','6'), '<img alt="" src="/upload/surveys/559527/images/01_Lavera.jpg" />'}, {if(random.NAOK=='7','8'), '<img alt="" src="/upload/surveys/559527/images/01_Dove.png" />'}</td>
Thanks for your help
Attachments:
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
5 years 2 months ago #179678
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Conducting a conjoint design - Show different images to certain test groups
This term =='1','2' looks incorrect to me. You might have some formating issues with HTML as well.
So please provide a Limesurvey LSS export and state what version of LimeSurvey you use. You can just create a small survey and attach the export here. You don't need to provide the complete survey.
So please provide a Limesurvey LSS export and state what version of LimeSurvey you use. You can just create a small survey and attach the export here. You don't need to provide the complete survey.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: Chrissl11
The topic has been locked.
- KompetenzZ
- Offline
- Premium Member
Less
More
- Posts: 153
- Thank you received: 8
5 years 2 months ago - 5 years 2 months ago #179679
by KompetenzZ
Cheers kompetenzz
Replied by KompetenzZ on topic Conducting a conjoint design - Show different images to certain test groups
Hi,
I don't know this rand function but I saw your screenshot and if you want a more consistent design of you choice sets you could look here: www.limesurvey.org/forum/can-i-do-this-w...dels?start=15#164707
I don't know this rand function but I saw your screenshot and if you want a more consistent design of you choice sets you could look here: www.limesurvey.org/forum/can-i-do-this-w...dels?start=15#164707
Cheers kompetenzz
Last edit: 5 years 2 months ago by KompetenzZ.
The following user(s) said Thank You: Chrissl11
The topic has been locked.
- Chrissl11
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
5 years 2 months ago - 5 years 2 months ago #179682
by Chrissl11
Replied by Chrissl11 on topic Conducting a conjoint design - Show different images to certain test groups
@KompetenzZ:
Thank you!
I will defintley try this file, however, still need to solve how to tell LimeSurvey when to insert which attributes...
LG
Chrissl
Thank you!
I will defintley try this file, however, still need to solve how to tell LimeSurvey when to insert which attributes...
LG
Chrissl
Last edit: 5 years 2 months ago by Chrissl11.
The topic has been locked.
- Chrissl11
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
5 years 2 months ago - 5 years 2 months ago #179683
by Chrissl11
Replied by Chrissl11 on topic Conducting a conjoint design - Show different images to certain test groups
@jelo: Thank you for checking this for me
The testfile is attached.
The testfile is attached.
Attachments:
Last edit: 5 years 2 months ago by Chrissl11.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3593
5 years 2 months ago #179685
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Conducting a conjoint design - Show different images to certain test groups
The brackets are misplaced in the nested IF statements. It should probably be something like this (line-breaks added for clarity):
Code:
{if(random.NAOK == '1' OR random.NAOK == '2', '<img alt="" src="/upload/surveys/559527/images/01_Balea.jpg" />', if(random.NAOK=='3' OR random.NAOK == '4', '<img alt="" src="/upload/surveys/559527/images/01_Nivea.jpg" />', if(random.NAOK=='5' OR random.NAOK == '6', '<img alt="" src="/upload/surveys/559527/images/01_Lavera.jpg" />', '<img alt="" src="/upload/surveys/559527/images/01_Dove.png" />')))}
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- Chrissl11
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
5 years 2 months ago #179689
by Chrissl11
Replied by Chrissl11 on topic Conducting a conjoint design - Show different images to certain test groups
Hi tpartner!
Thanks for your responde, however it's still not correct, now it will give me only the last picture always, no matter which response was given in the hidden question.
It is the same result, when using this code (I tried it before I asked here already).
<td>{if(random.NAOK=='1','2'), '<img alt="" src="/upload/surveys/559527/images/01_Balea.jpg" />', if(random.NAOK=='3','4'),'<img alt="" src="/upload/surveys/559527/images/01_Nivea.jpg" />', if(random.NAOK=='5','6'), '<img alt="" src="/upload/surveys/559527/images/01_Lavera.jpg" />', if(random.NAOK=='7','8'), '<img alt="" src="/upload/surveys/559527/images/01_Dove.png" />'}</td>
So any other guesses?
Thanks for your responde, however it's still not correct, now it will give me only the last picture always, no matter which response was given in the hidden question.
It is the same result, when using this code (I tried it before I asked here already).
<td>{if(random.NAOK=='1','2'), '<img alt="" src="/upload/surveys/559527/images/01_Balea.jpg" />', if(random.NAOK=='3','4'),'<img alt="" src="/upload/surveys/559527/images/01_Nivea.jpg" />', if(random.NAOK=='5','6'), '<img alt="" src="/upload/surveys/559527/images/01_Lavera.jpg" />', if(random.NAOK=='7','8'), '<img alt="" src="/upload/surveys/559527/images/01_Dove.png" />'}</td>
So any other guesses?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3593
5 years 2 months ago #179693
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Conducting a conjoint design - Show different images to certain test groups
That was not a guess, it was a solution given based on your first post. Are you sure that the code "random" is correct? Can you see what value is loaded into that equation question?
The survey you attached has nothing to do with the topic.
The survey you attached has nothing to do with the topic.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
5 years 2 months ago #179698
by jelo
Please attach your updated LSS export. Just posting fragments of code it more guessing than helping.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Conducting a conjoint design - Show different images to certain test groups
You don't seem to use tpartners solution. I still see '1','2'.Chrissl11 wrote: {if(random.NAOK=='1','2')
Please attach your updated LSS export. Just posting fragments of code it more guessing than helping.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- Chrissl11
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
5 years 2 months ago #179701
by Chrissl11
Replied by Chrissl11 on topic Conducting a conjoint design - Show different images to certain test groups
@tpartner:
Oh, you are right, I uploaded the wrong file, I am sooo sorry!
Don't know where my mind is at the moment...
So attached there is now in File1 the code I tried previously and in File2 the code you recommended me to use.
Both are in the preview the same result.
The equation random gives the participants a random number between 1 and 8. I did not hide the question in the example and it seems to work properly (don't know if that is, what you were asking for...).
@jelo:
I uploaded two files now, one showing my solution, the other one tpartners, both in the preview the same result.
However, I hope the correct files help you now to better understand my problem and I am looking forward to your responses and solutions! Thanks anyway for sharing your ideas with me
Oh, you are right, I uploaded the wrong file, I am sooo sorry!
Don't know where my mind is at the moment...
So attached there is now in File1 the code I tried previously and in File2 the code you recommended me to use.
Both are in the preview the same result.
The equation random gives the participants a random number between 1 and 8. I did not hide the question in the example and it seems to work properly (don't know if that is, what you were asking for...).
@jelo:
I uploaded two files now, one showing my solution, the other one tpartners, both in the preview the same result.
However, I hope the correct files help you now to better understand my problem and I am looking forward to your responses and solutions! Thanks anyway for sharing your ideas with me
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3593
5 years 2 months ago - 5 years 2 months ago #179702
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Conducting a conjoint design - Show different images to certain test groups
Two problems, one major, one minor...
1) Major - you have introduced spaces in the equation question before the actual equation. This means that the returned value will never be a simple number.
2) Minor - when generating a random number, you should always put in a check to see if the number has been previously generated:
Here is a working survey. I have moved unnecessary groups and questions to avoid having to go through them to test. (please keep in mind that we do not need or want to see unnecessary survey elements while testing for you)
1) Major - you have introduced spaces in the equation question before the actual equation. This means that the returned value will never be a simple number.
2) Minor - when generating a random number, you should always put in a check to see if the number has been previously generated:
Code:
{if(is_empty(random), rand(1, 8), random)}
Here is a working survey. I have moved unnecessary groups and questions to avoid having to go through them to test. (please keep in mind that we do not need or want to see unnecessary survey elements while testing for you)
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 5 years 2 months ago by tpartner.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
5 years 2 months ago #179706
by jelo
LimeSurvey isn't offering any help (visually and conceptional) when it comes to CBC.
When doing it in LimeSurvey (without workarounds) the None Option is not shown side by side.
The answer buttons are not directly shown under the concepts (3 concepts + Noneoption).
To implement the experimental design is a lot of work:
How many attributes do you have?
And what is maximum of levels the attributes have?
You mentioned 50 test groups. What do you mean with test group? A task (question with 3 concepts and a none-option)?
What kind of tool do you use to analyze the choice data?
Personally I wouldn't change the images in the task. I would create a dedicated question(group) for every task. When it comes to debugging, your approach can drive you mad. You might have a little mistype in one concept and won't find the issue. If you have one task per question(group) you can print them out, do screenshots with a fixed question name.
In Conjoint is no real random factor. You create as many testplans as possible (today you often use 1000-2000 ones, to ensure you don't have framing effects or order effects) and then try to distribute them over your respondents. An easy way to distribute is to use a random number which chooses the testplan.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Conducting a conjoint design - Show different images to certain test groups
Is there a reason why you choose LimeSurvey to do a choice based conjoint (CBC)?Chrissl11 wrote: Don't know where my mind is at the moment...
LimeSurvey isn't offering any help (visually and conceptional) when it comes to CBC.
When doing it in LimeSurvey (without workarounds) the None Option is not shown side by side.
The answer buttons are not directly shown under the concepts (3 concepts + Noneoption).
To implement the experimental design is a lot of work:
How many attributes do you have?
And what is maximum of levels the attributes have?
You mentioned 50 test groups. What do you mean with test group? A task (question with 3 concepts and a none-option)?
What kind of tool do you use to analyze the choice data?
Personally I wouldn't change the images in the task. I would create a dedicated question(group) for every task. When it comes to debugging, your approach can drive you mad. You might have a little mistype in one concept and won't find the issue. If you have one task per question(group) you can print them out, do screenshots with a fixed question name.
In Conjoint is no real random factor. You create as many testplans as possible (today you often use 1000-2000 ones, to ensure you don't have framing effects or order effects) and then try to distribute them over your respondents. An easy way to distribute is to use a random number which chooses the testplan.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.