Welcome to the LimeSurvey Community Forum

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

Design a questionnaire with random allocation of study objects

  • lmcunha
  • lmcunha's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 11 months ago #230206 by lmcunha
Please help us help you and fill where relevant:
Your LimeSurvey version: LimeSurvey Community Edition
Version 3.28.18+220706
Own server or LimeSurvey hosting:
Survey theme/template:
==================
(Write here your question/remark) 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:
==================
Dear all,

How can I design a questionnaire with several groups of questions being presented in different screens, were I have a random allocation of the study object. That is, imagine I want to evaluate how participants perceive different quality characterisitcs of different fruits (e.g., apples, strawberries and melons). The questionnaire is the same, but each participant will only evaluate one fruit, meaning that I am looking to randomise the fruit under evaluation. As questions will be similar, I would like to know how can I assign the fruit name within each question:
"For me apples/stawberries/melons are ...";
"Apples/Stawberries/Melons are quite ..."

I want just one fruit to appear to each participant and the same fruit throughout the questionnaire. How may I do this?

Thank you,
Luís C

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 11 months ago #230207 by Joffm
Hi, Luis,
for a random allocation you need a "random number".
So create one in a question of type "equation". Let's call it "random".

As you will have seen in the thousands of examples here in the forum, we use the save way to do this.
{if(is_empty(random),rand(1,NumberOfFruits),random)}

Now you have different options to show the random fruit.
1. Either by tayloring in each question as shown here
[url] www.limesurvey.org/manual/ExpressionScri...7BMrs.7D_Smith....22 [/url]

In your case:
For me {if(random==1,"apples",if(random==2,"strawberries",if(random==3,"melons",....)))...}  are quite ...

2. By defining the selected fruit in a second equation and using this.
So create a second question of type equation. Let's call it "selFruit".
{if(random==1,"apples",if(random==2,"strawberries",if(random==3,"melons",....)))...}
Now you can use the reference to this question, like
For me {selFruit}  are quite ...

Joffm

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