Random subset of matrix questions

More
6 months 2 weeks ago #176049 by lipflip
Is it (and how) possible to randomly draw a subset of 10 questions from a matrix question with 20 questions for each participant and have only these questions presented/answered?

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
6 months 2 weeks ago - 6 months 2 weeks ago #176073 by tpartner
You can randomize the sub-question order and then use relevanceStatus in the sub-question relevance equations.

- manual.limesurvey.org/Expression_Manager#Access_to_Variables

So if, for example, you have a question code "Q1" and ten sub-questions with codes "SQ001, SQ002..." and you wanted to show 5 random sub-questions, the relevance equations would be as follows.

SQ001:
sum(Q1_SQ002.relevanceStatus, Q1_SQ003.relevanceStatus, Q1_SQ004.relevanceStatus, Q1_SQ005.relevanceStatus, Q1_SQ006.relevanceStatus, Q1_SQ007.relevanceStatus, Q1_SQ008.relevanceStatus, Q1_SQ009.relevanceStatus, Q1_SQ010.relevanceStatus) LT 5

SQ002:
sum(Q1_SQ001.relevanceStatus, Q1_SQ003.relevanceStatus, Q1_SQ004.relevanceStatus, Q1_SQ005.relevanceStatus, Q1_SQ006.relevanceStatus, Q1_SQ007.relevanceStatus, Q1_SQ008.relevanceStatus, Q1_SQ009.relevanceStatus, Q1_SQ010.relevanceStatus) LT 5

SQ003:
sum(Q1_SQ001.relevanceStatus, Q1_SQ002.relevanceStatus, Q1_SQ004.relevanceStatus, Q1_SQ005.relevanceStatus, Q1_SQ006.relevanceStatus, Q1_SQ007.relevanceStatus, Q1_SQ008.relevanceStatus, Q1_SQ009.relevanceStatus, Q1_SQ010.relevanceStatus) LT 5

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Last edit: 6 months 2 weeks ago by tpartner.
The following user(s) said Thank You: DenisChenu

Please Log in or Create an account to join the conversation.

More
6 months 2 weeks ago #176109 by tpartner
Correction, after further testing, it seems that this method does not work within arrays - only the first 5 subquestions are shown.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Please Log in or Create an account to join the conversation.

More
6 months 2 weeks ago #176110 by DenisChenu

tpartner wrote: Correction, after further testing, it seems that this method does not work within arrays - only the first 5 subquestions are shown.

Maybe in 3.X only ? I think it work in 2.73 ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
6 months 2 weeks ago #176113 by jelo
I wasn't aware that relevanceStatus is working with subquestions at all ;-)
Was that available in old LTS as well? Or introduced later?

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in or Create an account to join the conversation.

More
6 months 2 weeks ago #176125 by DenisChenu

jelo wrote: I wasn't aware that relevanceStatus is working with subquestions at all ;-)
Was that available in old LTS as well? Or introduced later?

I think relevanceStatus is related to EM know value : EM know only subquestion for array (for example : Q01.question didn't work and Q1_SQ1.question show the subquestion of SQ1 in question Q1).

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago #177585 by limeluis99
Hi,
in 3.15.5 I get only the last five subquestions. Is there any other possibility to randomly select a subset of subquestions from an array question?

Best, Luis

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!