- Posts: 5
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Question with combinations of 2 or more variable
- voriksu
- Topic Author
- Offline
- New Member
Less
More
5 years 9 months ago - 5 years 9 months ago #170415
by voriksu
Question with combinations of 2 or more variable was created by voriksu
Hi, I want to ask a question in a questionnaire, e.g. "Do you like X cooked using Y?" and the respondent simply answer Yes or No. X and Y are variable, and each of them has five options, e.g. X has {Poultry, Beef, Lamb, Fish, Vegetable} and Y has {Fry, Soup, Bake, Marinate, Sauce}. Participants will be shown a random combination of X and Y, e.g. "Do you like 'Poultry' cooked using 'Soup'?"
I'm aware of the following options 1 , 2 , 3 . But in this case, there are 25 possible combinations.
How do I display a random combination of X and Y variables?
I'm aware of the following options 1 , 2 , 3 . But in this case, there are 25 possible combinations.
How do I display a random combination of X and Y variables?
Last edit: 5 years 9 months ago by voriksu.
The topic has been locked.
- urbana
- Offline
- Premium Member
Less
More
- Posts: 88
- Thank you received: 17
5 years 9 months ago #170422
by urbana
Replied by urbana on topic Question with combinations of 2 or more variable
If you only have 25 possible combinations you should consider just adding these 25 questions. That's not much and it makes your life very much easier when it comes to analyzing the results.
And then display the questions randomly or what every logic applies.
And then display the questions randomly or what every logic applies.
The topic has been locked.
- voriksu
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
5 years 9 months ago #170463
by voriksu
Replied by voriksu on topic Question with combinations of 2 or more variable
Thanks. What if I have 5 variables and there are >100 possible combinations? How should I approach that?
The topic has been locked.
- urbana
- Offline
- Premium Member
Less
More
- Posts: 88
- Thank you received: 17
5 years 9 months ago #170469
by urbana
Replied by urbana on topic Question with combinations of 2 or more variable
If it has to be dynamically than I would suggest a logic based on JavaScript:
- the question which is displayed to the users
- before the question a hidden question with two short text fields
Via JavaScript you choose from an array two variables randomly and write them I to the hidden text Fields.
In the actual question you use insertans to show the randomly chosen variables in the question.
With this way you have in the CSV file two columns in front of you question which show you what the user has answered
- the question which is displayed to the users
- before the question a hidden question with two short text fields
Via JavaScript you choose from an array two variables randomly and write them I to the hidden text Fields.
In the actual question you use insertans to show the randomly chosen variables in the question.
With this way you have in the CSV file two columns in front of you question which show you what the user has answered
The topic has been locked.