Welcome to the LimeSurvey Community Forum

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

Can i set up Conjoint analysis with item randomize with out Java code

  • fi1Fatima
  • fi1Fatima's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 day 11 hours ago #270632 by fi1Fatima
Please help us help you and fill where relevant:
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
Own server or LimeSurvey hosting:
Survey theme/template:
==================
Hello,I am currently developing a study involving conjoint experiment using LimeSurvey, and I have a specific question regarding the implementation of randomized condition presentation.In my study, there are 8 different conditions (or choice sets) that I would like to show to each participant. To minimize potential order effects and improve data quality, I am hoping to randomize the order in which these 8 conditions are presented.However, I’ve encountered a limitation: I am unable to use JavaScript within my LimeSurvey environment, due to technical or policy restrictions. Given this constraint, I would like to ask:
  • Is it possible to randomize the presentation of the 8 conditions in LimeSurvey without using JavaScript?
  • If yes, what would be the recommended method or workaround within LimeSurvey’s built-in functionality (e.g., question groups, randomization groups, relevance equations)?

Thanks in advance.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 day 11 hours ago #270635 by Joffm
Hi,
short answer.
1. Yes
2. ExpressionScript is sufficient 

Better you provide a lss export of this part of your survey.

Joffm 

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

Please Log in to join the conversation.

  • fi1Fatima
  • fi1Fatima's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 day 9 hours ago #270637 by fi1Fatima
Hi, 
Please find attached the raw setup of my choice task for your reference. I wasn’t able to present two profiles side by side, so I structured the survey as a choice task instead. It’s not perfect yet, but I’m working on refining it

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 day 9 hours ago #270638 by Joffm
Yes, this will be your challenge: to create a good looking layout.
Without javascript you can't use the "green apple - banana" example.

Well, I'll have a look at your lss.

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 day 8 hours ago #270639 by Joffm
But here are two examples equal to your idea
 

Imagine your items instead of these images.
 

But now my question:
What are your items?
I found
Item 1:
As a firm, we respect international standards and adhere to the laws in the regions where we operate.
As a firm, we respect our national standards and adhere to the local laws.

Item 2:
To meet the needs of a fast-paced, growing market, Explorer is developed in partnership with IBM
To meet the needs of a fast-paced, growing market, Explorer is developed in partnership with Baidu.
To meet the needs of a fast-paced, growing market, Explorer is developed in partnership with Philips

Item 3:
Explorer received the 2024 European Best Design Award for excellence in industrial design.
Explorer received the 2024 Asian Best Design Award for excellence in industrial design.

Are there more?

So you want to select for each task two out of each group - can be the same, according to your example.

A first, easy approach is:
There are only 12 different combinations (2x3x2)
As you have 6 tasks and 2 combinations per task you will display all 12..
Now you should create a random order from 1-12 and display the items according to this scheme
 
The procedure to create this randomized order with ExpressionScript is a bit lengthy but very straightforward.

The display itself you do with tayloring, like
{if(combi==1,'test 1',if(combi==2,'text 2',if(combi==3,'text 3',if(combi==4,'...

I' send a proposal tomorrow.

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
11 hours 6 minutes ago #270642 by Joffm
Now, here's the promised sample.
 

File Attachment:

File Name: limesurvey...22_J.lss
File Size:117 KB


The idea:
In your 6 "choices" groups you display a pair of the 12 possible combinations.
Each pair is different, no pair double.

To do this, you generate a random oder of the 12 combinations.
I showed then already.

To do this (only with ExpressionScript) I created a question of type "multiple short text" (eMat) as a container to store the results of the equations.
 
b1 - b12  (base)
r1-r12 (random)
z1-z12 (number
total

Initially I fill the pool with a string of 12 characters as a pool, like "123456789ABC"
{eMat_b1="123456789ABC"}
Now a random numer is generated (from 1 - length of the string)
{eMat_r1=if(is_empty(eMat_r1),rand(1,strlen(eMat_b1)),eMat_r1)}
We store the character at this position.
{eMat_z1=substr(eMat_b1,sum(eMat_r1,-1),1)}
We remove the character from the string to get the next "base" string
{eMat_b2=str_replace(eMat_z1,"",eMat_b1)}

And so on
  • Generate a random number
  • Stoe the character at the position
  • Remove the character from the pool

{eMat_r2=if(is_empty(eMat_r2),rand(1,strlen(eMat_b2)),eMat_r2)}
{eMat_z2=substr(eMat_b2,sum(eMat_r2,-1),1)}
{eMat_b3=str_replace(eMat_z2,"",eMat_b2)}

{eMat_r3=if(is_empty(eMat_r3),rand(1,strlen(eMat_b3)),eMat_r3)}
{eMat_z3=substr(eMat_b3,sum(eMat_r3,-1),1)}
{eMat_b4=str_replace(eMat_z3,"",eMat_b3)}
....

 
At the end I join all numbers to a result string
{eMat_tot=join("#",eMat_z1,eMat_z2,eMat_z3,eMat_z4,eMat_z5,eMat_z6,eMat_z7,eMat_z8,eMat_z9,eMat_z10,eMat_z11,eMat_b12)}
This is not really necessary - you can work with the values of z1 - z12 as well, instead of the "substr"

You get something like
 

So in your "choice 1 you compare the combinations of the first two characters, in "choice 2" of the third and fourth, in "choice 3" of the fifth and sixth, and so on. 
To do this you taylor the text according to the characters.
Choice 1:
Profile A = 5  ->  1 3 1 (international - Philips - European)
Profile B = 3  ->  1 2 1

Choice 2:
Profile A = 2  ->  1 1 2
Profile B = A (10)  ->  2 2 2
...

You see in the sample that I taylored the first item totally, while in the second and third item only the one switching word.

Now the layout.
In the third group I added a "none" column with a different background color.

Please read the manual to understand the used functions, especially the IF(condition,TRUE,FALSE), but also the string functions (substr, str_replace, strlen)
One last remark: The '#' at the start of the "total" string is not necesaary in this case.
It is a relict of a different survey where the function "strpos" was used.

Two more screenshots
 
 

Joffm

P.S.
Of course, would be much shorter if you were able to use javascript
 

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

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose