Group: Forum Members
Posts: 69,
Visits: 85
|
Hi not sure what I am doing wrong but I have some values=0 defined at the start of my experiment and I have some empty lists. On each trial accuracy and RT data are appended to the relevant lists. Half way through I wish to take the means of the lists, assign them to the values and then reset the lists to be empty before continuing with the second half of the experiment. At the end I use expressions to calculate means from the lists again and save both the final expression output and the half way values into the summary data file. But the values are never updating. Something like this:
<values> / overallpropcorrect_Before = 0 / meanRT_correct_Before = 0 </values>
<expressions> / overallpropcorrect_After = list.ACC.mean / meanRT_correct_After = list.RT.mean </expressions>
<list ACC> </list>
<list RT> </list>
<trial cond1> .... / ontrialend = [ list.ACC.appenditem(values.correct); if (values.correct == 1) { list.RT.appenditem(values.rt);}] </trial>
<block trialBlock> / trials = [1 = blockinfo; 2-8 = noreplace(cond1, cond2, cond3)] </block>
<block halfway> /onblockbegin = [ values.overallpropcorrect_Before = list.ACC.mean values.meanRT_correct_Before = list.RT.mean] /trials = [instr1, instr2] /onblockend = [ list.ACC.reset(); list.RT.reset()] </block>
<summarydata> / columns = (...... values.overallpropcorrect_Before, values.meanRT_correct_Before, expressions.overallpropcorrect_After, expressions.meanRT_correct_After) </summarydata>
<expt > / blocks = [ 1-2 = trialBlock; 5 = halfway; 6-7 = trialBlock] </expt>
The documentation makes it sound like anytime list.x.mean is called that it should calculate the mean so I don't understand why it is not assigning it to the value at the halfway. I added the values to the regular datafile but they remain at 0 on every trial, even during the halfway blocks. I realise that I could just duplicate all the lists and all the expressions but there are a lot of them so I would rather just assign the means of the lists to the values half way through and then reset them...
Any thoughts appreciated!
Thank you
|