Welcome to the LimeSurvey Community Forum

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

Obtaining the order of a random question within a random group

  • midnightking
  • midnightking's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 6 months ago #222835 by midnightking
I have a survey where I record the order of randomly appearing trials in my tasks with hidden questions (UGorder and FaceOrder), thanks to the advice I have received on this forum. The hidden questions and the equations set in the default response work well when the groups for my tasks (UG and  Faces) appear at set times and aren't random. They display the order of the questions within the group starting from 1 and ending at 66 (or 30 in the second ask).

However, when I randomize group order, I no longer get values between 1 and 66 or 1 and 30, as the expression .qseq used in my equation gives a question's order in the overall survey.

I was wondering if there was a way to only obtain the question's order within the group and not the overall survey. 

File Attachment:

File Name: limesurvey... (1).lss
File Size:974 KB

 
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago - 3 years 6 months ago #222853 by Joffm
You can calculate an offset for both groups, like

OffsetUG: {sum(if(INS.gseq lt Q00.gseq,70,0),if(pnifirst.gseq lt Q00.gseq,3,0),if(BSLFIRST.gseq lt Q00.gseq,3,0),if(ACME0.gseq lt Q00.gseq,5,0),2)}
OffsetFO: {sum(if(Q00.gseq lt INS.gseq,215,0),if(pnifirst.gseq lt INS.gseq,3,0),if(BSLFIRST.gseq lt INS.gseq,3,0),if(ACME0.gseq lt INS.gseq,5,0),2)}
Here you count how many questions were before the start of the group.

If you subtract this from each value in "UGOrder" and "Faceorder" in an equation, the values of each group start with 1.
Like equation "eqFO":
{Faceorder_A1F=Faceorder_A1F-OffsetFO}
{Faceorder_H1F=Faceorder_H1F-OffsetFO}
{Faceorder_N1F=Faceorder_N1F-OffsetFO}
{Faceorder_A2F=Faceorder_A2F-OffsetFO}
{Faceorder_H2F=Faceorder_H2F-OffsetFO}
{Faceorder_N2F=Faceorder_N2F-OffsetFO}
{Faceorder_A3F=Faceorder_A3F-OffsetFO}
{Faceorder_H3F=Faceorder_H3F-OffsetFO}
{Faceorder_N3F=Faceorder_N3F-OffsetFO}
{Faceorder_A4F=Faceorder_A4F-OffsetFO}
{Faceorder_H4F=Faceorder_H4F-OffsetFO}
{Faceorder_N4F=Faceorder_N4F-OffsetFO}
{Faceorder_A5F=Faceorder_A5F-OffsetFO}
{Faceorder_H5F=Faceorder_H5F-OffsetFO}
{Faceorder_N5F=Faceorder_N5F-OffsetFO}
...


This you do in hidden equations at the end of the survey.
And you have to adapt the default values of these questions.

On the other side there is still this timestamp in your survey. What for?
Either you use this or remove it and change this question to "list(radio)" with bootstrap-button layout. 

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 6 months ago by Joffm.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • midnightking
  • midnightking's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 6 months ago #222864 by midnightking
Thank you for your help

I have set up 2 short text questions in the final group of the survey for OffsetUG and OffsetFO

I then set up a question called eqFO where I set up default answers with {Faceorder_A1F=Faceorder_A1F-OffsetFO} and so on...


I am still not getting a ranking that starts at 1 and ends at 30. I did not test UGOrder with OffsetUG yet.

I had simply forgotten to remove the time in the list comment questions, I kept it since I didn't think it would do harm. 

File Attachment:

File Name: limesurvey... (2).lss
File Size:1,000 KB
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #222866 by Joffm
Yes, that was my first rough idea.

Now the correction.

1. Put both qestions "Faceorder" and "UGorder" into the last group, behing the calculation of the offsets
2. OffsetFO: {sum(if(Q00.gseq lt INS.gseq,214,0),if(pnifirst.gseq lt INS.gseq,3,0),if(BSLFIRST.gseq lt INS.gseq,3,0),if(ACME0.gseq lt INS.gseq,5,0),8)}
3. Set the default values of Faceorder_H1F to {(H1F.qseq-OffsetFO)/2}, and so on

UG analog.
I did not check that. To be honest, I am not masochistic.
OffsetUG should be
{sum(if(INS.gseq lt Q00.gseq,69,0),if(pnifirst.gseq lt Q00.gseq,3,0),if(BSLFIRST.gseq lt Q00.gseq,3,0),if(ACME0.gseq lt Q00.gseq,5,0),17)}
But check for the last term (17). These are the two initial questions and the practice questions of this group.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 6 months ago #222918 by DenisChenu

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose