Conducting a conjoint design - Show different images to certain test groups

More
2 years 10 months ago #179677 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,8)}

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.
More
2 years 10 months ago #179678 by jelo
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.

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.
More
2 years 10 months ago - 2 years 10 months ago #179679 by KompetenzZ
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

Cheers kompetenzz
Last edit: 2 years 10 months ago by KompetenzZ.
The following user(s) said Thank You: Chrissl11
The topic has been locked.
More
2 years 10 months ago - 2 years 10 months ago #179682 by Chrissl11
@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
Last edit: 2 years 10 months ago by Chrissl11.
The topic has been locked.
More
2 years 10 months ago - 2 years 10 months ago #179683 by Chrissl11
@jelo: Thank you for checking this for me :-)

The testfile is attached.

File Attachment:

File Name: ConjointTestfile.lss
File Size:23 KB
Attachments:
Last edit: 2 years 10 months ago by Chrissl11.
The topic has been locked.
More
2 years 10 months ago #179685 by tpartner
The brackets are misplaced in the nested IF statements. It should probably be something like this (line-breaks added for clarity):

{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.
More
2 years 10 months ago #179689 by Chrissl11
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? :-)
The topic has been locked.
More
2 years 10 months ago #179693 by tpartner
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.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
2 years 10 months ago #179698 by jelo

{if(random.NAOK=='1','2')

You don't seem to use tpartners solution. I still see '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.
More
2 years 10 months ago #179701 by Chrissl11
@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 :-)

File Attachment:

File Name: File1.lss
File Size:43 KB

File Attachment:

File Name: File2.lss
File Size:43 KB
Attachments:
The topic has been locked.
More
2 years 10 months ago - 2 years 10 months ago #179702 by tpartner
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:
{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)

File Attachment:

File Name: limesurvey...5271.lss
File Size:43 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
Last edit: 2 years 10 months ago by tpartner.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
More
2 years 10 months ago #179706 by jelo

Don't know where my mind is at the moment...

Is there a reason why you choose LimeSurvey to do a choice based conjoint (CBC)?
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.
More
2 years 10 months ago #179724 by Chrissl11
@tpartner:
Thank you tpartner for your solution!

As far as I checked it, it is working. :-)
And please appoligize, I did not know, that it is necessary to provide only the relevant questions as jelo said "You can just create a small survey and attach the export here. You don't need to provide the complete survey." so I thought it is up to me and of course, I've chose the easiest way. But I will keep that in mind!

But what do you mean by "Minor - when generating a random number, you should always put in a check to see if the number has been previously generated". I thought actually when having 1000 participants, that (almost, because it is random) every 50st will start with no. 1 again. Is that a wrong assumption?



@jelo:
There are several reasons!
First, the panel provider I will be using, uses LimeSurvey too. Therefore, it will be very easy by simply providing them the final file. Second, I can use the Sawtooth company account of a good friend to analyze the data. But I cannot carry out my survey on that, because it is her company account. I checked a lot of different providers besides Sawtooth, however, they are all really expensive - above 1,000 euros per licence. That is why I have chosen LimeSurvey: It provides a lot of possibilites and a proper support.

Yours,
Chrissl
The topic has been locked.
More
2 years 10 months ago #179725 by jelo

I thought actually when having 1000 participants, that (almost, because it is random) every 50st will start with no. 1 again. Is that a wrong assumption?

Tony meant the issue, that the random number in a equation changes every time it triggered (e.g. a respondent is switching back and forth in a survey). So the random number would change during an interview and the respondent would get different questions when going forwards again.

That is prevented via {if(is_empty(random), rand(1, 8), random)}. The random number will only be assigned once.

The random number is random. So you don't get a 100 percent correct distribution between 1 and 8.
If you have enough respondents you will get a proper distribution.

First, the panel provider I will be using, uses LimeSurvey too. Therefore, it will be very easy by simply providing them the final file.

Panelprovider runs the survey with LimeSurvey? Interesting. Splendid?

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.

Start now!

Just create your account and start using Limesurvey today.

Register now