Welcome to the LimeSurvey Community Forum

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

Randomize position of slider's labels

  • LolaTx
  • LolaTx's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 10 months ago #242539 by LolaTx
Hello, 

I'm using LimeSurvey version 3.28.42+221213. The server is hosted by my university. 

Is there a way to randomize the position of the labels of a slider ? We have groups of questions with sliders and we would like to randomize the position of our slider labels for our different items (see screenshot below). Is it possible to make LimeSurvey randomly decide to reverse the 'identique' and 'different' labels, i.e. sometimes the 'identique' label is positioned on the left and the 'different' label is positioned on the right and vice versa? 

If needed I also provide the .Iss of our questionnaire, the question groups of interest are 'GeoCatScalar1' and 'GeoCatScalar'. 
 

File Attachment:

File Name: limesurvey...4-18.lss
File Size:663 KB


Thanks for your help!

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 10 months ago #242545 by Joffm
Replied by Joffm on topic Randomize position of slider's labels
Hi,

If you really want to confuse your respondents and make them angry, the solution is really easy (at first glance).
Something like
{if(randomnumber==1,"|identique|different","|different|identique")}
as subquestion text.

But what about the scale? This isn't changed at all.
In one case "different" gives a value of 0, sometimes "identique"
This means you have to create your random numbers before and store them.
As you have to recalculate the values you have to know the value of the random number.

Maybe like this
With a small javascript snippet create a string containing 24 random numbers "1" or "2". (QRandom)
Then you can change the above formula to 
{if(substr(QRandom,0,1)==1,"|identique|different","|different|identique")} for the first question
{if(substr(QRandom,1,1)==1,"|identique|different","|different|identique")} for the second question
{if(substr(QRandom,2,1)==1,"|identique|different","|different|identique")} for the third question
...

And regarding the scale. I have to admit, I do not know your exact scale, so here I use 0 - 100.
In an expression at the end of the survey you can recalculate like
{Q1_1=if(substr(QRandom,0,1,)==2,100-Q1_1,Q1_1)}

It's possible, but I do not recommend at all.
Much better you randomize, but for all questions in the same direction.
One respondent always sees "different - identique" the other "identique - different"

JOffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

  • LolaTx
  • LolaTx's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 10 months ago #242549 by LolaTx
Replied by LolaTx on topic Randomize position of slider's labels
Dear Joffm, 

Thank you. I will discuss this with my PhD supervisor but you are right : it is a much better idea to have some participants always seeing "different - identic" and other to always see "identic - different". Any idea of how to implement this ? 

Best wishes, 
Lola

 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 10 months ago #242552 by Joffm
Replied by Joffm on topic Randomize position of slider's labels
In this case you only need one random number and then "taylor" the subquestions as I showed in the first example.
{if(randomnumber==1,"|identique|different","|different|identique")}
 

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

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 10 months ago #242554 by holch
Replied by holch on topic Randomize position of slider's labels
Yeah, changing the scale within the same survey is a problem. I wouldn't trust the data collected with such an approach. Why? People are lazy. They have a look at the scale and the "learn" that on one side is THIS and on the other is THAT.

Many will not notice that the scale has changed and will just answer based on what they have learned at the beginning of the survey. This is natural behaviour. Most respondents also don't read long explanations, they will not read the scales one by one, etc.

So if you switch the scale extremes throughout the survey, there is a good chance that your are collecting wrong data.

If you want to avoid any biases because of the position of a word always on the left, then it might make sense to follow Joffm's suggestion to randomize the position per respondent.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.

Please Log in to join the conversation.

  • LolaTx
  • LolaTx's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 10 months ago #242556 by LolaTx
Replied by LolaTx on topic Randomize position of slider's labels
Dear Joffm and Holch, 

Thank you for your valuable suggestions. 
However, I really do not understand what I have to do. Where do I have to put this code "{if(randomnumber==1,"|identique|different","|different|identique")}" ? As a first subquestion of my 'GeoCatScalar1' group ? 

What does "tayloring" the subquestions mean ? Does that mean adding the below codes as a source code in each subquestion of 'GeoCatScalar1' ?
{if(substr(QRandom,0,1)==1,"|identique|different","|different|identique")} for the first question
{if(substr(QRandom,1,1)==1,"|identique|different","|different|identique")} for the second question
{if(substr(QRandom,2,1)==1,"|identique|different","|different|identique")} for the third question

What would be the code for the fourth question ? {if(substr(QRandom,3,1)==1,"|identique|different","|different|identique")} ???

I'm really not familiar with computer language. 

Thank you, 
Lola

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 10 months ago - 1 year 10 months ago #242557 by Joffm
Replied by Joffm on topic Randomize position of slider's labels
"Tayloring" means this
[url] www.limesurvey.org/manual/ExpressionScri...BINSERTANS:xxx.7D.29 [/url]

And read the manual about "implemented functions" to learn what substr() means.

But as I wrote: If you randomize on respondent level you do not need this, but only a single random number. (let's call it "randnum")

And now something else:
The "tayloring of the slider's subquestions doesn't seem to work.
So it is easier for you.
You only double the subquestions and display according to the random number.
 

And at the end you recalculate all SQ002 subquestions.


Here a rough example
 

File Attachment:

File Name: limesurvey...8434.lss
File Size:32 KB

Joffm


 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 1 year 10 months ago by Joffm.
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 10 months ago #242562 by Joffm
Replied by Joffm on topic Randomize position of slider's labels
An extended example that takes the two groups of questions into account.

 

File Attachment:

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


Joffm

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

Please Log in to join the conversation.

  • LolaTx
  • LolaTx's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 10 months ago - 1 year 10 months ago #242587 by LolaTx
Replied by LolaTx on topic Randomize position of slider's labels
 

File Attachment:

File Name: limesurvey...7942.lss
File Size:670 KB
Dear Joffm,

In order to test your solution, I have doubled the subquestions of ATT1, ATT2, ATT3, ATT4, ATT5, ATT6 (question group 'GeoCatScalar1') and also added 'randpositioncurseur' according to what you did in the LSexport you have sent yesterday (QImage & randnum). Doing this, the questions of 'GeoCatScalar1' don't display on the screen anymore. Any idea what's wrong ? 

Thank you again, 
Lola 
 
 
Last edit: 1 year 10 months ago by LolaTx.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 10 months ago #242591 by Joffm
Replied by Joffm on topic Randomize position of slider's labels

Any idea what's wrong ? 

It's GIGO (Garbage in - Garbage out)
You don't do what you are shown.
What is this question "QImageSlider" and this new group "randpositioncurseur"?

As in my example, put the "randnum" into the first group (and hide it) and remove this "randpositioncurseur"?

Joffm

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

Please Log in to join the conversation.

  • LolaTx
  • LolaTx's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 10 months ago #242593 by LolaTx
Replied by LolaTx on topic Randomize position of slider's labels
Dear Joffm, 

My 'QImageSlider' was your 'Qimage' in the last ISS export you sent (now I have removed it). I have now also removed "randpositioncurseur" and added 'randnum' in my first group. Now it displays on the screen but the slider's labels are not randomized. 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 10 months ago #242594 by Joffm
Replied by Joffm on topic Randomize position of slider's labels
In my opinion, it does.

If you display the "randnum" while testing, you see
 
randnum is equal 2, so the scale should be changed

You see, it is.

This is not, because in this question you still didn't add the second subquestion. You only did it in ATT1 - ATT6


And what is the reason to set "Inverser la direction du curseur" in some questions?

In my opinion you have everything you need to display this question (and the equation to recalculate the values of the reversed scales).

Good luck

Joffm




 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose