- Posts: 7
- Thank you received: 0
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
- Topic Author
- Offline
- New Member
How can I do this?
- holch
- Offline
- LimeSurvey Community Team
- Posts: 11637
- Thank you received: 2737
Two ideas that come to my mind:
- Hide equation type question in each question group and write the current time into it.
- 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.
- k_gemenis
- Topic Author
- Offline
- New Member
- Posts: 7
- Thank you received: 0
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?
- holch
- Offline
- LimeSurvey Community Team
- Posts: 11637
- Thank you received: 2737
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.
- k_gemenis
- Topic Author
- Offline
- New Member
- Posts: 7
- Thank you received: 0
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!
- Joffm
- Offline
- LimeSurvey Community Team
- Posts: 12881
- Thank you received: 3965
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
Volunteers are not paid.
Not because they are worthless, but because they are priceless
- holch
- Offline
- LimeSurvey Community Team
- Posts: 11637
- Thank you received: 2737
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.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.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
- DenisChenu
- Offline
- LimeSurvey Community Team
- Posts: 13597
- Thank you received: 2487
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.
- k_gemenis
- Topic Author
- Offline
- New Member
- Posts: 7
- Thank you received: 0
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.
- Joffm
- Offline
- LimeSurvey Community Team
- Posts: 12881
- Thank you received: 3965
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
- k_gemenis
- Topic Author
- Offline
- New Member
- Posts: 7
- Thank you received: 0
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.
- Joffm
- Offline
- LimeSurvey Community Team
- Posts: 12881
- Thank you received: 3965
Please attach this.
Joffm
By the way:
But I wroteA1 and A2 (as in the default)
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