Welcome to the LimeSurvey Community Forum

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

Search Results (Searched for: random)

  • u0125497
  • u0125497's Avatar
07 Apr 2024 12:42
Hello Joffm,

Thanks a lot for your reply!

So, if I understand well:
1. For each question of the 2 groups, I need to set each question type as "equation".
2. As condition set this: {if(is_empty(randnbr),rand(1,2),randnbr)}
3. In "Equation" set  randnbr==1 or randnbr==2

Is that correct? I just tried and unfortunately nothing has changed, still both groups of questions are displayed.

Any advice? Big thanks in advance!
  • Joffm
  • Joffm's Avatar
05 Apr 2024 16:38

I tried via "Randomization group"

Yes, this is the wrong approach.
You use "randomization group " to display ALL questions/groups in randomized order.
You have to use a random number. (1-2) to display ONE randomly selected question/group out of n.

So, create a random number in a question of type "equation"
Like {if(is_empty(randnbr),rand(1,2),randnbr)}
and set the condition of your groups.
Either randnbr==1
or randnbr==2

Joffm

 
  • u0125497
  • u0125497's Avatar
05 Apr 2024 16:08 - 05 Apr 2024 16:09
Hello,
I am currently creating my first survey in LimeSurvey, and I have one problem.

My survey has 4 groups of questions: 1st and 4th group will be standard & displayed to all participants, while 2nd and 3rd group should be randomized in a way that some participants should see only 2nd group of questions (without 3rd group of questions), and the other random participants should have displayed only 3rd group of questions (without 2nd). 

Is it possible to arrange it in LimeSurvey? I tried via "Randomization group", but it only changes that group 2nd and 3rd are both displayed in a random order, while I wish to have randomly displayed either group 2nd either group 3rd.

Thank you in advance for any suggestions!
  • pflanzenkatze
  • pflanzenkatze's Avatar
05 Apr 2024 15:05
Hallo Joffm,

Danke erstmal für deine super schnelle Antwort!

Ja, ich denke du hast mein Settup richtig verstanden.
Zwei Personen kommen rein, machen zuerst jeweils alleine die Aufgaben (1. Block) und bekommen dann Aufgaben im gleichen Stil, bearbeiten diese nun aber zusammen - sie sprechen also gemeinsam über Lösungsansätze und jede Person vermerkt die eigenen Ideen (2. Block). Ich habe von Blöcken geschrieben, weil ich diese beiden idealerweise auch randomisieren wollen würde, dass also die einen Hälfte mit Einzel beginnt und dann gemeinsam arbeitet und die andere Hälfte der Teilnehmenden zuerst gemeinsam arbeitet und dann alleine - um Reihenfolgeneffekte im Sinne von Lerneffekten auszuschließen. (Es gibt dann noch einen 3. Block mit Fragebögen, dieser tut hier aber eigentlich nichts zur Sache, weil er in jedem Fall am Schluss passiert und nur zum Teil in sich randomisiert sein wird.)

Innerhalb eines Blocks wird es 3 Szenarios geben, die bearbeitet werden, also 3 Items. Nach jedem wird eine kurze Reflexion stattfinden. Diese 3 Items hätte ich gerne über alle Teilnehmenden gesehen randomisiert, damit es auch hier keine Reihenfolgeeffekte geben kann. Gleichzeitig müssen aber ja auf jeden Fall im gemeinsamen Block beide Teilnehmenden die Aufgaben in der gleichen Reihenfolge bekommen, um sie überhaupt zusammen bearbeiten zu können. Damit beide am Ende die gleiche Situation hatten, erschien es mir dann nur schlüssig, auch die Aufgaben im Alleine-Block in der gleichen Reihenfolge zu haben.

Gibt es also deiner Meinung nach keine Möglichkeit, sozusagen den "Seed" der Umfrage abzurufen und diesen bei den zwei Teilnehmenden anzugleichen?

Wenn ich mich jetzt auf deinen Vorschlag beziehe mit den selber fest vorgegebenen Varianten und berücksichtige, dass es 3 Items wären, wäre es selbst mit allen möglichen Kombinationen "nur" eine Anzahl von 6 Varianten (? 3! sofern ich mich gerade nicht verdenke^^).
Ist das nun so zu verstehen, dass jede dieser 6 Varianten eine Zahl hätte und ich am Anfang der Umfrage die Personen einfach die gleiche Zahl eingeben lasse und dann bekommen sie die gleiche Variante angezeigt?
Wo würde ich das in Limesurvey konkret umsetzen? Mittels "Logik"?
Mit dieser Variante wäre das Grundproblem auf jeden Fall gelöst - nur könnte man dann die Items des Einzelsettings nicht genauso umsetzen - entweder man würde diese dann "normal" randomisieren und darauf verzichten, dass die beiden Personen die gleiche Reihenfolge hatten (hier bin ich mir nicht sicher, ob das für den Vergleich problematisch ist, oder vielmehr die typische Randomisierungssituation) oder aber man müsste es so lösen, wie du meines Verständnisses nach vorgeschlagen hattest und im Einzelsetting-Block die Items vorgefertigt durchmischen - hier bin ich mir allerdings unsicher, ob das zulässig ist, da es de facto keine Randomisierung ist und dennoch Biases und Reihenfolgeneffekte auftreten könnten.

Bezüglich der Infos zu meiner Version und dem Host (etc.): Da ich Limesurvey über meine Uni nutzen kann, habe ich das schon etwas länger nicht mehr benutzt und habe auch auf die schnelle keinen Zugriff das nachzuschauen - wenn es aber entscheidend ist für den Input, kann ich das natürlich nachschauen.

Danke nochmal vielmals für die Unterstützung bisher und weiterhin - mir ist schon viel geholfen, wenn ich weiß, dass es dafür eine Umsetzungsmöglichkeit gibt, oder unter welchem Begriff ich das möglicherweise weiter recherchieren könnte?

Liebe Grüße
pflanzenkatze
  • keithgoldstein
  • keithgoldstein's Avatar
04 Apr 2024 15:57
Replied by keithgoldstein on topic Create random token for anonymous panel
The "Participant may save and resume later" function solves this problem!
Thank you.
  • Joffm
  • Joffm's Avatar
04 Apr 2024 14:56 - 04 Apr 2024 16:32
Hallo,
zunächst einmal die Verständnisfragen.
Ich verstehe Dein Setup so, dass zwei Personen bei Dir erscheinen.
Sie setzen sich an zwei Computer (mit einer Wand dazwischen) und bearbeiten den "Einzel"-Teil.
Danach wird die Wand entfernt und sie arbeiten zusammen am "Gemeinsam"-Teil, d.h. sie sprechen sich über die Antwort ab und tragen sie ein.

Ich verstehe es zwar so, kann mir aber nicht ganz glauben.
Meine Frau hatte nämlich eine andere Idee, was "zeitgleich zusammen bearbeiten" bedeutet. 

Daher wäre es gut, Du würdest noch einmal beschreiben, wie der Ablauf sien soll.

Und was ist mit

die Items innerhalb des Einzelsetting-Blocks

Was verstehst Du unter "Items" und "Blocks"?
Sollen die "Items" die verschiedenen Fragen sein, oder eben Items in einer Itembatterie (in LimeSurvey-Sprache "Matrix")?


Ich fange einmal an zu denken:
Ich bezweifle, dass Du mit einer Randomisierung über "Zufall" nicht zum Ziel kommst.
M.E. ist dies auch nicht notwendig. 
Wenn Du drei oder vier fest vorgibst, sollte dies genügen, um den Bias bzgl. Anordnung auszuschließen.
Also:
1. "AUDI", "FIAT", "BMW", "VOLVO", "KIA", "HONDA"
2. "HONDA", "KIA", "VOLVO","BMW", "FIAT", "AUDI"
3. "VOLVO", "KIA", "HONDA", "AUDI", "FIAT", "BMW"
4. "BMW", "FIAT", "AUDI", "HONDA", "KIA", "VOLVO"

Dann kannst Du wirklich am Anfang Zahl von 1-4 vorgeben, und dann die Umfrage anzeigen.
Hierbei würde sehr stark mit "tayloring" gearbeitet, d.h. die Texte werden dynamisch aufgrund dieser Zahl (zf) eingeblendet.
Z.B.
{if(zf==1,"AUDI",if(zf==2,"HONDA",if(zf==3,"VOLVO","BMW")))}

Aber dies ist sehr ins Blaue geschrieben, da - wie gesagt - ich über den Ablauf noch im Unklaren bin.

Es wäre sehr gut, Du würdest den lss Export eines Prototypen schicken.

Bis dann
Joffm

Und bitte, beantworte die Fragen vom Beginn, bezüglich Deiner LimeSurvey-Version, dem Ort des Hostings.

P.S.
Ich habe gerade gesehen, dass in meinem "Tutorial 2: Mehrfachnennungen,...", Kap. 1.5. eine feste umfrageweite Randomisierung gezeigt wird.
Ich denke, dies könnte man sehr gut für Deine Zwecke verwenden.
Dann wäre die oben beschriebene "dynamische" Anzeige nicht notwendig.

Das Tutorial findest Du hier im deutschen Teil auf einer der folgenden Seiten (6 ff. oder so)
  • DenisChenu
  • DenisChenu's Avatar
04 Apr 2024 10:55
Replied by DenisChenu on topic Create random token for anonymous panel
Why don't give advice to use Save at 1st page ?
Then : they can reload their survey at the last step.
  • pflanzenkatze
  • pflanzenkatze's Avatar
04 Apr 2024 10:29
Bitte helfen Sie uns, Ihnen zu helfen und füllen Sie folgende Felder aus:
Ihre LimeSurvey-Version: [siehe rechts unten auf Ihrem LimeSurvey-Verwaltungsbildschirm]
Eigener Server oder LimeSurvey-Cloud:
Genutzte Designvorlage:
==================
Huhu,
Ich habe eine Frage dazu, ob man folgende Situation mit Limesurvey umsetzen kann:

In meiner Laborstudie möchte ich gern Limesurvey nutzen, um alle Daten direkt digital zu haben, damit das mit der Randomisierung alles richtig läuft und auch die zeitbegrenzten Abschnitte rund laufen und so wenig Fehler meinerseits wie möglich passieren können.
Die Situation ist nun jene, dass ich immer zwei Personen zusammen teste. Dabei gibt es einen Teil, den sie jeweils alleine bearbeiten, und einen, den sie zeitgleich zusammen bearbeiten. Ohne jegliche Art von Randomisierung wäre dies ja auch absolut kein Problem, denn dann wäre der Fragebogen ja einfach ident aufgebaut. 
Nun möchte ich aber die Items innerhalb des Einzelsetting-Blocks und innerhalb des Dyaden-Blocks randomisieren. Im besten Fall würde ich auch noch gerne randomisieren, ob Einzel oder Dyade zuerst bzw. als zweites bearbeitet wird (dies könnte man aber wohl zur Not mit zwei verschiedenen Umfragen lösen und dann manuell abwechselnd den einen oder den anderen nutzen?). Gibt es nun eine Möglichkeit, z.B. über irgendeinen Code, den Teilnehmende am Anfang eingeben, um dafür zu sorgen, dass die beiden, die aktuell zusammen getestet werden, immer den identen Fragebogen kriegen? 
Ich weiß leider nicht genau, nach was ich da googlen oder suchen soll, weshalb ich das mal an euch herantrage.
Ich würde mich sehr über Unterstützung freuen!
Liebe Grüße,
pflanzenkatze
  • keithgoldstein
  • keithgoldstein's Avatar
04 Apr 2024 10:27
Create random token for anonymous panel was created by keithgoldstein
This is hopefully an easy question, and I apologize if the answer is obvious. I am a sociologist and not a programmer. I have a particularly long survey and pilot testers commented that while they took a break their browser reset, and they were not able to access their prior responses. I have been experimenting and reviewing prior forum posts that appear to be similar but did not locate a solution. I would like users to be given a random token that will appear in their url or in the survey, which they can use to access their prior responses. I don't want to allow public registration to a panel, as it is important to maintain anonymity.

I want to write at the top of the survey: If you would like more time, please click the save button at the top. You can resume the survey again by entering the current url for your survey: {URL.shown}.

The following forum posts seem to discuss similar concepts, but I did not yet succeed in implementing them:

forums.limesurvey.org/forum/can-i-do-thi...-unique-pin-for-user

forums.limesurvey.org/forum/design-issue...tion-using-chance-js

forums.limesurvey.org/forum/can-i-do-thi...-button-in-my-survey

Thank you so much in advance if you can provide assistance. I really appreciate this forum.
  • Joffm
  • Joffm's Avatar
03 Apr 2024 21:12
S'il vous plaît, pas de questions en double.Vous avez déjà posé cette question dans la partie anglaise.
  • holch
  • holch's Avatar
03 Apr 2024 18:28

I would therefore like to know if I can find a way of retrieving the order: e.g. instead of retrieving my results via csv in this predetermined order S1, S14, S25, S65 etc, i want the real order of presentation of the questions eg:S1, S2,S3,S4 etc.


As the order will be different for every respondent, how do you imagine this would work?

So the order in the CSV will always be the initial order, without randomization. Then use tpartners solution to record the position the image was shown for a specific respondent.

Version 3.23.6+200929


This is not only a version of LS that is EOL (End of Live - not actively supported anymore), but it also hasn't been updated for about 3,5 years. You really should consider a update to the latest LS 3, or even an upgrade to LS 5 or LS6.
  • tpartner
  • tpartner's Avatar
03 Apr 2024 17:01
In each group, you can insert a hidden equation type question to record the group sequence.

Qcode.gseq - manual.limesurvey.org/ExpressionScript_-...#Access_to_variables
  • tpartner
  • tpartner's Avatar
03 Apr 2024 16:43 - 03 Apr 2024 16:51
Replied by tpartner on topic Choice Based Max-Diff Design
If using LS 6.x and you want to disable the stacked table view of the array-by-column on mobile devices...

 

1) Place this in your custom.js file.

Code:
function maxDiff(qID, randomize, disableMobileView) {
 
        // Identify some elements
        var thisQuestion = $('#question'+qID);
        var thisTable = $('table.subquestion-list:eq(0)', thisQuestion);
 
        // Assign a new question class
        $(thisQuestion).addClass('max-diff-array');
 
        // Disable the mobile table view
        if(disableMobileView) {
            $(thisTable).removeClass('ls-answers').addClass('disable-mobile-view');
        }
 
        // Move the columns
        $('thead tr:eq(0)', thisTable).prepend($('thead tr:eq(0) th:eq(1)', thisTable));
        $('tr.answers-list', thisTable).each(function(i){
            $('td.answer-item:eq(0)', this).prependTo(this);
        });
 
        // Random rows
        if(randomize) {
            var rowsArr = [];
            $('tr.answers-list', thisTable).each(function(i){
                $(this).attr('data-index', i);
                rowsArr.push(i);
            });
            shuffleArray(rowsArr);
            $(rowsArr).each(function(i){
                $('tbody', thisTable).append($('tr[data-index="'+this+'"]', thisTable));
            });
        }
 
        // Prevent clicking twice in the same row
        $('input:radio', thisQuestion).on('click', function () {
 
            $('input:radio', thisQuestion).prop('disabled', false);
            $('input:radio:checked', thisQuestion).each(function(i) {
                var thisRow = $(this).closest('tr.answers-list');
                $('input:radio', thisRow).not(this).prop('disabled', true);
            });
        });    
 
        // Fix up the row classes
        var rowClass = 1;
        $('tr.answers-list', thisTable).each(function(i) {
            $(this).addClass('array'+(2-(i%2)));
        });
    }
 
    function shuffleArray(array) {
        for (var i = array.length - 1; i > 0; i--) {
            var j = Math.floor(Math.random() * (i + 1));
            var temp = array[i];
            array[i] = array[j];
            array[j] = temp;
        }
        return array;
    }

2) Place this in your custom.css file.

Code:
.max-diff-array tbody th.answertext { 
    text-align: center;
    font-weight: normal;
}
 
.max-diff-array table.disable-mobile-view > tbody > tr > td {
    vertical-align: middle;
}
 
.max-diff-array table.disable-mobile-view tbody td {
    text-align: center;
}

3) Place this in the question source. Note the third parameter set to true.

Code:
<script type="text/javascript" data-author="Tony Partner">
 
    $(document).on('ready pjax:scriptcomplete',function(){
        // Call the maxDiff() function
        // Set the second parameter to true for randomized rows
        // Set the third parameter to true to disable the LS mobile table view
        maxDiff({QID}, true, true);
    });
</script>

 
  • Joffm
  • Joffm's Avatar
03 Apr 2024 16:37
Hi, here is a working example
calculating ten scores
and displaying the four highest scores with the verbatim description.
 

File Attachment:

File Name: limesurvey...1292.lss
File Size:97 KB


Please, read trhe manual to get familiar with the basics of access to variables, the "self" and "that" variable, ExpressionScript in general.
You may import the sample surveys in the manual
[url] manual.limesurvey.org/ExpressionScript_sample_surveys [/url]

Some short explanations:
You did not use all items of the array to calculate the score.
Therefore I used a better way of coding.
"Scored" items have codes like "S01", "S02"..., memorizable as "Score"
The other items - not used for the score - have codes like "N01", "N02", memorizable as "No score"
And of course nuzmerical codes of answer options

Now the "sum" function is only
sum(that.Q1.sq_S.NAOK)

You will see that I added a very small number randomly. This to avoid ties.

Now the group "GCalc"
Here the work is done.
"M" is a "container", a question of type "array(numbers)" to store some interim data
Important: The first coulmn with the scores, the fourth column with the ranks.

And your results.
It is not necessary to use three separate displays for just one score. Use a nested IF, and everything is file.

To be honest: You could use just one question to display all results.
Again with a nested IF. But depends a bit on the length of your texts.

As said: The four highest out of ten.

So you only have to extend the "container" M to your amont of scores and the equation "eqScore"

Joffm
  • lelehd
  • lelehd's Avatar
03 Apr 2024 15:33
Hello,

I am using limesurvey to evaluate the characteristics of my images (72 images presented randomly). Each image has to be presented once for x amount of time (via the stopwatch), then scored using a multiple numerical entry question.
Overall, to randomise my stimuli more easily, I created a group for each image (e.g. S1) consisting of a text display type question allowing me to display the image, followed by a multiple numerical entry question. Each group was then defined by rand1 to randomise the groups:

S01 (18631)
Description: None
Random group name :rand1

However, when I retrieve my results and try the questionnaire, I noticed that the groups randomised, since the pictures do not appear in the order in which they were created, but I do not have access to this (randomised) order when I retrieve the results.
I would therefore like to know if I can find a way of retrieving the order: e.g. instead of retrieving my results via csv in this predetermined order S1, S14, S25, S65 etc, i want the real order of presentation of the questions eg:S1, S2,S3,S4 etc.



Thank you,Version 3.23.6+200929
Displaying 61 - 75 out of 653 results.

Lime-years ahead

Online-surveys for every purse and purpose