Capturing the randomization order of question groups

More
1 month 3 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?

Please Log in to join the conversation.

LimeSurvey Partners
More
1 month 3 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'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
1 month 3 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?

Please Log in to join the conversation.

More
1 month 3 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'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
The following user(s) said Thank You: k_gemenis

Please Log in to join the conversation.

More
1 month 3 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!

Please Log in to join the conversation.

More
1 month 3 weeks ago - 1 month 3 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
Attachments:
Last edit: 1 month 3 weeks ago by Joffm. Reason: Translation
The following user(s) said Thank You: k_gemenis

Please Log in to join the conversation.

More
1 month 3 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'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
1 month 3 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 .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
1 month 3 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.

Please Log in to join the conversation.

More
1 month 3 weeks ago - 1 month 3 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: 1 month 3 weeks ago by Joffm.

Please Log in to join the conversation.

More
1 month 3 weeks ago - 1 month 3 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: 1 month 3 weeks ago by k_gemenis. Reason: quote

Please Log in to join the conversation.

More
1 month 3 weeks ago - 1 month 3 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: 1 month 3 weeks ago by Joffm.

Please Log in to join the conversation.

More
1 month 3 weeks ago #196128 by k_gemenis
Thanks for the quick response! This is exactly what I tried, but didn't work. LSS attached.
Attachments:

Please Log in to join the conversation.

More
1 month 3 weeks ago #196140 by Joffm
Well,
I can count in greek up to 69,
I can buy fuel,
I can order some drinks, but that's all,
I can read (mostly without understand it).
But that's nearly all.
So, please, only include in your lss export the relevant questions (not 26 groups with 42 questions), and - if possible - in a language that most of us can read.
Therefore you should use your prototype where you test small pieces of code to see whether it works, before you include it in your real survey.


What I see, is:
In BB2 and BB3 you have an equation to set "order".
But where is the question "order"? Your question has the Code "BB1".
How can you imagine that "BB1" is set by an equation, that says "order=1"

So obviously you have to say {BB1=1}

You really should read the manual about equations and Expression Manager/script.

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: k_gemenis

Please Log in to join the conversation.

More
1 month 3 weeks ago #196153 by k_gemenis
That worked. Thanks!

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now