Welcome to the LimeSurvey Community Forum

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

Random subset of matrix questions

  • lipflip
  • lipflip's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 5 months ago #176049 by lipflip
Random subset of matrix questions was created 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?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago - 5 years 5 months ago #176073 by tpartner
Replied by tpartner on topic Random subset of matrix questions
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:
Code:
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:
Code:
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:
Code:
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.
Last edit: 5 years 5 months ago by tpartner.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #176109 by tpartner
Replied by tpartner on topic Random subset of matrix questions
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.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #176110 by DenisChenu
Replied by DenisChenu on topic Random subset of matrix questions

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 , plugin development .
I don't answer to private message.
The topic has been locked.
More
5 years 5 months ago #176113 by jelo
Replied by jelo on topic Random subset of matrix questions
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
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #176125 by DenisChenu
Replied by DenisChenu on topic Random subset of matrix questions

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 , plugin development .
I don't answer to private message.
The topic has been locked.
More
5 years 4 months ago #177585 by limeluis99
Replied by limeluis99 on topic Random subset of matrix questions
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
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose