Welcome to the LimeSurvey Community Forum

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

Randomisation of conditions : a question group at the beginning or at the end

  • Hollowqueen8
  • Hollowqueen8's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 8 months ago #203306 by Hollowqueen8
Hi everyone !

I'm new to LimeSurvey, this is only my second study using it, so I'm looking for help :)

I have 15 question groups, my survey needs to have two conditions : in one, two question groups are at the beginning (2nd and 3rd place), but in the other condition, these same two question groups need to be at the 10th and 11th place.

I read here that I can do a hidden question to set randomly the participants between two conditions, but I'm not sure how and I don't know how to use this question to then set the different paths of the study so that the question groups are either at the beginning or at the end.

Any help is welcomed !
Thanks a lot !
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 8 months ago #203308 by Joffm
If you have either:
G1,G2,G3,G4,G5,G6,G7,G8,G9,G10,G11,G12,G13,G14,G15
or
G1,G4,G5,G6,G7,G8,G9,G10,G11,G2,G3,G12,G13,G14,G15

you should copy the two groups and you have
G1,G2a,G3a,G4,G5,G6,G7,G8,G9,G10,G11,G2b,G3b,G12,G13,G14,G15


In G1 you create a question of type equation (call it "random") where you generate a random number (1-2) with
{if(is_empty(random,rand(1,2),random)}
You find the explanation otf this construct more than hundred times here in the forum.

Now you set the relevance equation of the groups to
G2a and G3a: random==1
G2b and G3b: random==2

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: Hollowqueen8
The topic has been locked.
  • Hollowqueen8
  • Hollowqueen8's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 8 months ago #203309 by Hollowqueen8
Thank you so much, I'll try it !
The topic has been locked.
  • Hollowqueen8
  • Hollowqueen8's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 8 months ago #203313 by Hollowqueen8
Hi !
I tried your code and it didn't work (the groups with the relevance equation didn't show on the survey), so I looked and tried the one presented here : survey-consulting.com/how-to-randomly-sh...a-limesurvey-survey/ ; but same thing. So then I tried writing the relevance equation condition in all the questions and not only in the group. Still nothing, neither at the beginning nor at the end. I looked at the survey logic file and it says everything is good. Any idea what's wrong ?

I created a survey with a reduced number of questions to try it, I'm putting the ISS file in the attachments if you want to take a look.

File Attachment:

File Name: limesurvey...9617.lss
File Size:102 KB
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 8 months ago #203317 by tpartner
As explained by Joffm, randnumber needs to be an equation type question. Also, it must have a relevance of 1. A relevance of 0 renders the question disabled.

You will probably need to switch to group-by-group mode.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: Hollowqueen8
The topic has been locked.
  • Hollowqueen8
  • Hollowqueen8's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 8 months ago #203318 by Hollowqueen8
Thank you so much !

In question by question it's blocked on random==2 but by switching to group by group it works !
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 8 months ago - 3 years 8 months ago #203319 by Joffm
Trying your survey after having changed the question type to "equation" it works fine in "question by question".
By the way, there is no reason why it should not.

But what is the randomization group name in "Dilemmes classiques" for?

And the repetition (18x) in "Need for cognition" is very boring. Maybe you find a better way, (array?).

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 8 months ago by Joffm.
The following user(s) said Thank You: Hollowqueen8
The topic has been locked.
  • Hollowqueen8
  • Hollowqueen8's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 8 months ago #203321 by Hollowqueen8
You're right it works ! I was just really unlucky to try it 8 times and have the same random number...

In the whole study there are 3 "Dilemmes classiques" and I want them presented in a random order across participants in order to avoid some kind of follow effect in which one would impact the answer to the next.

For the Need for Cognition scale, I can see why... we did it like that in the first study but I'll ask my advisor ! Thanks for your input !

And really thank you both a lot for helping me !
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose