Welcome to the LimeSurvey Community Forum

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

Latin Square to display groups in specific order

  • nat-rose
  • nat-rose's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 2 months ago - 2 years 2 months ago #233841 by nat-rose
Please help us help you and fill where relevant:
Your LimeSurvey version: [5.4.9]
Own server or LimeSurvey hosting:
Survey theme/template:
==================

Hello friends!

I have 2 questions regarding my survey :

1. I have a survey with 7 groups of questions. We decided to implement a latin square to present 5 of the 7 groups in a specific order. So, when a participant arrives to the survey they would be assigned to 1 of 5 possible orders, like this :

either 1 G1 G2 G3 G4 G5
or       2 G2 G3 G4 G5 G1
or       3 G3 G4 G5 G1 G2
or       4 G4 G5 G1 G2 G3
or       5 G5 G1 G2 G3 G4


It doesn't matter which participant does which order first, meaning that if 2 participants do order 4 (in red) and the next order 3, it's fine as long as in the end my 5 conditions are balanced.
But I cant just present these groups randomly, like a participant going to answer groups 2 4 3 1 5.
I now that I can add an equation type question in the beginning of the survey with rand(1,5) but my problem is, How could I tell lime survey "if rand == 1 then show order 1" and so on...

Now my second question,
2. Is there a way of controlling the number of participants by condition (other than looking at responses and manually taking of 1 condition once we have reached the desired number. 

Any help would be greatly appreciated!

Attached there is an exemple of my survey




 
Last edit: 2 years 2 months ago by nat-rose.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 2 months ago #233845 by Joffm
Hi,
1. this is really difficult in LimeSurvey, as LS neither supports loops nor skips.
But your example does not give sufficient informations.

a. How different are these groups? Do they only differ in some kind of wording, display of text, display of images?
I think this is the usual case in latin squares.
In this case I'd recommend tayloring.

b. How many questions are in each group?
Is it possible to copy the questions and create the groups in the respective order, like
G1: Q1a, Q1b, Q1c, Q2a, Q2b, Q3a, Q3b, Q3c,..., Q5a, Q5b
G2: Q2a, Q2b, Q3a, Q3b,....
G3: Q3a, Q3b, Q3c, ...
Now you only need a random numner (1-5) to select the group.
This way you have to display the surbvey "question by question"

Please, a bit more information is appreciated.

2. Do you talk about quotas?

Joffm​​​​​​​

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

Please Log in to join the conversation.

  • nat-rose
  • nat-rose's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 2 months ago #233849 by nat-rose
Hi Joffm,

Thank you so much for you quick answer!

Below my reply to your questions :

a. Some of these questions are actually validated psychology questionnaires (that are usually displayed in an array, like a depression or anxiety inventory), other questions are open questions, and some of them are multiple choice. So they are all different.
I will look for information about tayloring.

b. I thought about this option, I was trying to avoid it though, because, it would mean later, that I would have to tweak the data file to match questions in each condition, and I woud have, lets say, 5 columns for Q1, 5 for Q2 and so on..

The other option I can think of is creating 5 different surveys and then match all the data files in the end, but I think it would be the same problem, I would have to combine different files and I'm trying to avoid this if possible. In the end it's a little like your idea of creating different groups and then choosing which one we are going to display.

2. Yes, I've used quotas in the past and it works, but I didn't know how to link it to the 5 conditions I need?

I hope this clarifies a little more.
Thanks again for taking the time!

Kind Regards,
Nathalie.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 2 months ago #233852 by Joffm

b. I thought about this option, I was trying to avoid it though, because, it would mean later, that I would have to tweak the data file to match questions in each condition, and I woud have, lets say, 5 columns for Q1, 5 for Q2 and so on..

Yes, indeed. But this is the meanest thing.
A real small macro in Excel will do the job.

but I didn't know how to link it to the 5 conditions I need?

Which five conditions?
As far as I see you have 5 quotas, one for each order.
And the condition is the value of the random number.

Joffm

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

Please Log in to join the conversation.

  • nat-rose
  • nat-rose's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 2 months ago #233863 by nat-rose
Thank you for your answer!

So before I go with the "b" option and create a macro, I have a last question.

Concerning the tailoring part, I saw this example in the forum, where someone wanted to show questions in a randomized order and you provided a javascript to do this. Here is the post :
[url] forums.limesurvey.org/forum/can-i-do-thi...tions-by-participant [/url]
I though maybe something like this could be done for groups ?

And I was also wondering if I choose to present question by question, if something similar to the post could be done for my survey. I mean that instead of
choosing from a pool and randomized order, just tell limesurvey something like, if my random number is 3,
you will display Q3, Q4, Q5, Q1, Q2.

I hope my question is clear enough. Thanks again for your help!

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 2 months ago #233873 by Joffm
Hi, this is something different.

In the post you mentioned there are 14 question groups (each  containing a pair of questions) which are displayed randomly (by the randomization group name)
Randomly, not in the well defined orders of your requirement

Now the requirement there was to show in 7 of these 14 groups the first element of the pair, and in the other 7 groups the second, again randomly selected.
Therefore is the script:
Select 7 letters randomly,
If the letter is in this selection, then show the firdst part of the pair, if not, show the second part.

So, if you insist in your well defined structure, you have to go 
If you can allow a randomized order, you only have to enter the same randomizatgion group name into your groups.
And you can store this order .
Unfortunately LimeSurvey only supports "Randomization", but not "Rotation" (what you would like to have.

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
2 years 2 months ago #233881 by Joffm
Hi,
thinking again about it I saw that the design is much easier:
1. generate a random number (1-5), let's call it RN
Then create 9 groups with these conditions
G1a (questions of G1); condition  RN<2
G2a (questions of G2); condition  RN<3
G3a (questions of G3); condition  RN<4
G4a (questions of G4); condition  RN<5
G5 (questions of G5); condition  no condition, displayed to all
G1b (questions of G1); condition  RN>1
G2b (questions of G2); condition  RN>2
G3b (questions of G3); condition  RN>3
G4b (questions of G4); condition  RN>4

As you see here this way your requirements are fulfilled.
 

Joffm

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

Please Log in to join the conversation.

  • nat-rose
  • nat-rose's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 2 months ago #233906 by nat-rose
Thank you for your help!

this is great!

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose