Welcome to the LimeSurvey Community Forum

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

Capturing the randomization order of question groups

  • k_gemenis
  • k_gemenis's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 2 weeks ago #196055 by k_gemenis
I have two question groups that I put in the same randomization group so they appear to respondents in a random order. However, because this is treated as an experiment, I want to capture a variable which will show me which question group the respondent saw first.

How can I do this?
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 2 weeks ago #196064 by holch
I don't think that you can do this as something out of the box.

Two ideas that come to my mind:
  1. Hide equation type question in each question group and write the current time into it.
  2. As it is only two question groups, you could could create group 1 in double and put it after group 2. Then create a random number which will determine which of the two group 1s will be shown.

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: ThibautLab
The topic has been locked.
  • k_gemenis
  • k_gemenis's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 2 weeks ago #196069 by k_gemenis

holch wrote: I don't think that you can do this as something out of the box.
Hide equation type question in each question group and write the current time into it.[/li]


I think that this must be the easiest option. Is there a quick way to record the submission timestamp of each group?
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 2 weeks ago #196071 by holch
I actually think option 2 is the easiest.

1. Random number (1, 2)
2. Group A1
3. Group B
4. Group A2

If random number == 1, show Group A1 and hide A2, if random number == 2 hide A1 and show A2.

Now how to write the time into the equation I am not quite sure, probably you need some Javascript, not sure if there is a way to do this with EM code, I doubt it. But then later for analysis you will have to compare the time stamps, which is an additional step, while with the other approach you already know that if the answer is in A1 that it has been seen first, if it is in A2 it has been seen second.

Also, which I haven't thought of, you can also get timings from within Limesurvey (just pick it when activating the survey), in a group by group display it will show you when a certain question group has been shown and in a question by question approach it will show you when a certain question has been shown. But still, you need to compare the timestamps to see which one was first.

For option one you could probably use time() for the current time to write it into the equation. It is not in the list of implemented functions ( manual.limesurvey.org/Expression_Manager#Implemented_Functions ), but according to survey-consulting.com/how-to-calculate-t...nd-the-current-date/ it should work.

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: k_gemenis
The topic has been locked.
  • k_gemenis
  • k_gemenis's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 2 weeks ago #196074 by k_gemenis

holch wrote: Also, which I haven't thought of, you can also get timings from within Limesurvey (just pick it when activating the survey), in a group by group display it will show you when a certain question group has been shown and in a question by question approach it will show you when a certain question has been shown. But still, you need to compare the timestamps to see which one was first.


I thought about this as well but it's not possible. As far as I know from using Limesurvey before, activating the timings through Limesurvey will record the time (in seconds) but not the time stamp. Knowing that respondents took X seconds for one group by Y seconds for the other is not useful for what I am looking for unfortunately.

I have to go with either of the other options, but as I lack knowledge in Java and programming I am not sure whether I will be able to implement this properly. I thought that it was straightforward to run randomized experiments with Limesurvey, but apparently it is not!
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 2 weeks ago - 4 years 2 weeks ago #196075 by Joffm
Hi
no, the timestamp is not saved, only the duration

If you want to store the order,

1. Create a hidden question of type "List(Radio)" (let's call it "order") with answer options
1="Group 1 first"
2="Group 2 first"

2. Create a hidden question of type "equation" in the first group, only with this question text {order=2}

3. Create a hidden question of type "equation" in the second group, only with this question text {order=1}

So the order of your two groups is saved in question "order"
Logic: In the group that is displayed last, the value of "order" is set to the other group (because this was displayed first)

Joffm

File Attachment:

File Name: limesurvey...1829.lss
File Size:20 KB

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 4 years 2 weeks ago by Joffm. Reason: Translation
The following user(s) said Thank You: k_gemenis
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 2 weeks ago #196079 by holch

As far as I know from using Limesurvey before, activating the timings through Limesurvey will record the time (in seconds) but not the time stamp.

Oh, I see, have never really used this feature and had thought it would record a timestamp. But Joffm confirmed that it is only the time in seconds, so no, this is not an option.

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.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 2 weeks ago #196085 by DenisChenu
Arg ...

Maybe to late

gitlab.com/SondagesPro/getQuestionOrder
Must be adapted for 3.X and 4.X

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.
  • k_gemenis
  • k_gemenis's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 2 weeks ago #196089 by k_gemenis
Thanks!

I did this but not entirely sure what exactly I am doing. In the hidden radio question within a group that comes before the two that I randomized, I changed the code of the answer options to 1 and 2 (from the default A1 and A2) and then created the hidden equation type questions in the two groups. I am not sure about the following though:

1. Why did I assign in the first group {order=2} and in the second group {order=1} and not vice versa?
2. More importantly, I am not sure what the hidden radio question is doing. Since it's hidden and no one is supposed to see it, how does it pick up the order of the following two groups?

Excuse the noob question, but it's the first time that I am getting into this beyond the standard features.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 2 weeks ago - 4 years 2 weeks ago #196094 by Joffm
1.

In the group that is displayed last, the value of "order" is set to the other group (because this was displayed first)


You see that the value of "order" is overwritten.
So when the second group is "Group 2" the value is set to "1", that you know that "Group 1" was the first.
So when the second group is "Group 1" the value is set to "2", that you know that "Group 2" was the first.

2. You want to store the value.
Therefore you need a question, to have a column in the answer table.

But - as usual - the best is to try it yourself. Activate the survey, write down the order of the groups and compare with the data in the answer table.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 4 years 2 weeks ago by Joffm.
The topic has been locked.
  • k_gemenis
  • k_gemenis's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 2 weeks ago - 4 years 2 weeks ago #196125 by k_gemenis

But - as usual - the best is to try it yourself. Activate the survey, write down the order of the groups and compare with the data in the answer table.




I tried a couple of times (using multiple devices) but unfortunately the variable that is supposed to capture the order of the question groups remains completely empty.

I tried both answer options 1 and 2, and answer options A1 and A2 (as in the default), and also changing the text of the answer options to "X first" and "Y first" instead of "Group 1 first" "Group 2 first". None of this worked.
Last edit: 4 years 2 weeks ago by k_gemenis. Reason: quote
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 2 weeks ago - 4 years 2 weeks ago #196126 by Joffm
Where is your lss export.
Please attach this.

Joffm

By the way:

A1 and A2 (as in the default)

But I wrote

1. Create a hidden question of type "List(Radio)" (let's call it "order") with answer options
1="Group 1 first"
2="Group 2 first"


If you use "A1" and "A2" you also have to change the equation to {order="A1"},...

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 4 years 2 weeks ago by Joffm.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose