0 votes
in SoSci Survey (English) by s091065 (210 points)

Hi,

I would like to implement feedback about the mean reaction times after each block of an assignment question (8 Blocks/Questions, each has 56 items).
I see that all the reaction times are saved under the name of the item + "a", but I can't seem to find a name for a question that corresponds to these items (e.g. the reaction times for the single items of the question PR02 are named PR02_01a, PR02_02a, ..., in the data sheet. But there does not seem to be a question like e.g. 'PR02a').

What I have tried so far is this:

   $itemlist = array(); // create an empty list
   $number_items = 56; // check 56 items
 
   for ($i=1; $i<=$number_items; $i++) { // enumerate from 1 to 56
   $id = 'PR02'.'_'.$i.a; // how does this give me PR02_*ITEM*a? I think this is where my   
    problem is, I have tried different things, but none of them seemed to work

    $itemlist[] = $i;
    }

   $mean = valueMean($itemlist);
   put('IV06_01', $mean); //IV06_01 is the internal varible where the mean should be saved

   html('
   <p>Your mean reaction time in the last block was '.sprintf('%1.1f', $mean).'     
    milliseconds.</p>
     ');

Does that lead me into the right direction? Or should this be done in a completly different way?
Any tip would be appreciated!

1 Answer

+1 vote
by SoSci Survey (328k points)
selected by s091065
 
Best answer

The FOR loop looks good, so far. Just give the $id line a little midification (that takes care about the leading zero in the item part of the ID):

$id = id('PR02', $i).'a';

As methodological remark: You may consider removing outliers from the calculation. However, if you like to do that, you'll need valueList() instead valueMean() to retrieve the values, and then you'll need calcMean() and calcSD() to get the margins as of which to remove outliers (e.g., 3 SD from the mean). Then you'll need another FOR loop to filter the values, before calculating the mean.

by s091065 (210 points)
Thanks a lot! This helped.
Also it should have been  
$itemlist[] = $id;
of course.

Thank you also for you methodological tip, I will reconsider what makes more sense in our case!

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

...