Welcome to the LimeSurvey Community Forum

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

Extract randomization information from text items

  • Lowhy22
  • Lowhy22's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 9 months ago #185034 by Lowhy22
Dear Community,
I am a Tutor for a psychology course and this semester we conducted several online studies using LS. One of the groups was using the rand(1,4) command in an equotation item to randomize between different text items, which were displayed to the participant (1 out of 4).
So the problem now is the already recognized issue that the rand() command without additional commands does not always match the number with the selected item as described here www.limesurvey.org/forum/design-issues/8...y-using-rand?start=0 .
The additional problem is now, that the group used text items which require no input from the participant and thus we can not see which item was selected for the participant.
Do you know any way how we can extract what text item the participants have seen? Because otherwise the whole study is kind of garbage :(.
We already looked at the times recorded, but they were only times for the question groups, not the questions itself.
I attached the survey structure if this is of any help. We are using Version 3.16.1+190314.

Thank you so much for any help!
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 9 months ago #185053 by holch
You posted a survey with 29 questions...

We are doing this in our spare time and it would take quite some time to go through the whole survey to find where your problem lies. Which are the relevant questions?

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 9 months ago #185054 by holch
I think I found where your problem is. "Kommentar".

But I don't see where your problem is. The random number is saved in "zufall1". Depending on what is written there (can only be 1,2, 3 or 4) the respective text is shown. So if in your table the value of "zufall1" is 3, you know which text they should have seen.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • Lowhy22
  • Lowhy22's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 9 months ago #185057 by Lowhy22
Dear Holch,
thank you so much for getting back to me so quickly and I apologize for not being precise.
As you rightly guessed it is about the Kommentar question group.

The problem is that the randomly generated number from the equotation does NOT match with the selected text file.
So for example if the rand () command generates the number 3, it happens that the selected comment is NOT the comment which has zufall1 == 3 in the relevance equotation.

As I said before the problem is known and it has delt with before www.limesurvey.org/forum/design-issues/8...y-using-rand?start=0 by adding some expressions to the command in the equotation variable.

But the Problem we have now is that we already have gathered our data with the existing survey structure. And that leads me to my question if there is any other way to check which comment was selected and shown to the each participant? (since the output of the zufall1 equotation variable is not reliable)

Thank you again for you help I hope I made my problem understandable?
Best regards
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 9 months ago - 4 years 9 months ago #185058 by Joffm
Hi,

IMO this is normal behaviour.
The rand-function is always rendered when the page loads. (and when it is called)
Therefore we use this construct "if randomnumber still is empty, create a new one, else keep the old value".

So for example if the rand () command generates the number 3, it happens that the selected comment is NOT the comment which has zufall1 == 3 in the relevance equotation.

Where did you check the random number? Did you display this question? Or in the dataset?
If you compare with the displayed one, sure it will be different. As I said, it is always recalculated when called.

I made a few tests (10) and compared the displayed message with the stored random number.
It always was the correct one.
So you have to do, what was missed at the beginning - testing.
And not only that the survey works, but that the stored results match the entered values.
If none of the tests fails you are lucky; otherwise ...

BTW:
Why are there values in the "randomization group name"? This is used for something different (when you want to display questions in randomized order)
I removed them.

Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 4 years 9 months ago by Joffm.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 9 months ago #185065 by holch
I actually think the problems they have in their study does not come from the random generation, because from what I see (they don't allow to go back), the problem of rand(1,4) doesn't really apply here. Chances that the random number is triggered a second time after showing the comment should be close to zero.

The bigger problem is that comment 1 and 4 seem to be in the same randomization group, which can cause weird behavior. Overall, I think the survey is so messed up, because of this randomization group error, not because of the equation with the random number generation.

As Joffm said, this should come up during testing before field start.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • Lowhy22
  • Lowhy22's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 9 months ago #185073 by Lowhy22
Thank you very much for your quick reply. As I tested again the created rand number does not correspond with the selected comment, also in the data file.

Is there any other possibility to trace back the selected comments?

Best regards!
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 9 months ago #185093 by holch
If this is the case, there is no way to know which text has been displayed. However, the questions about the comments (at least for the first 2, the other two didn't have any text) are so basic, you should be able to know from the responses to the answers which text has been shown.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 9 months ago #185095 by Joffm
Just to add:
The random number changes if it is in the same group and displayed "group by group".
A month ago there was this same problem that I had to split my "beautiful" function into three parts.
www.limesurvey.org/forum/can-i-do-this-w...ildren-randomization

See here:
Above the random number that is generated by the equation question
Below the random number that is generated again because of the call in the relevance equation.
This one is used to display the message.
Example 1:


Example 2:

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: holch
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose