﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Millisecond Forums » Millisecond Forums » Inquisit 4  » feedback for multiple blocks and subsequent branching</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Mon, 14 Sep 2026 01:04:50 GMT</lastBuildDate><ttl>20</ttl><item><title>feedback for multiple blocks and subsequent branching</title><link>https://forums.millisecond.com/Topic19463.aspx</link><description>Hello,&lt;br/&gt;&lt;br/&gt;I currently have four practice blocks and I would like to show feedback for response latency and % accuracy at the end of these blocks. I know that I can use the /blockfeedback for each block individually, but is there a way for me to show the total response latency and accuracy for all the practice blocks together?&lt;br/&gt;&lt;br/&gt;Following on from that, in order to proceed to the test blocks, participants need to reach 70% accuracy and have a maximum latency of 2000ms. How can I force repeat the practice blocks if participants fail to meet this requirement?&lt;br/&gt;&lt;br/&gt;Thank you for your time.&lt;br/&gt;&lt;br/&gt;</description><pubDate>Wed, 03 Aug 2016 00:05:48 GMT</pubDate><dc:creator>ememem</dc:creator></item><item><title>RE: feedback for multiple blocks and subsequent branching</title><link>https://forums.millisecond.com/Topic19471.aspx</link><description>Thank you so much Dave! &lt;br/&gt;That was really helpful. Your example was really easy to follow along and understand! Thank you!&lt;br/&gt;</description><pubDate>Wed, 03 Aug 2016 00:05:48 GMT</pubDate><dc:creator>ememem</dc:creator></item><item><title>RE: feedback for multiple blocks and subsequent branching</title><link>https://forums.millisecond.com/Topic19468.aspx</link><description>You sum up the number of trials, the number of correct responses and the trials' latency via /ontrialend. You store the results in global variables (i.e. &amp;lt;values&amp;gt;). You use expressions to calculate the percentage correct and mean latency based on those values.&lt;br/&gt;&lt;br/&gt;The below, very simple example with 3 "practice blocks" p1 to p3 should clarify:&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ n_trials = 0&lt;br/&gt;/ n_correct = 0&lt;br/&gt;/ sum_latency = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expressions&amp;gt;&lt;br/&gt;/ pct_correct = (values.n_correct/values.n_trials)*100&lt;br/&gt;/ mean_rt = (values.sum_latency/values.n_trials)&lt;br/&gt;&amp;lt;/expressions&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;/ blocks = [1=p1; 2=test]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block p1&amp;gt;&lt;br/&gt;/ onblockbegin = [values.n_trials = 0; values.n_correct = 0; values.sum_latency = 0; ]&lt;br/&gt;/ preinstructions = (practiceintro)&lt;br/&gt;/ trials = [1-10 = a]&lt;br/&gt;/ branch = [block.p2]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block p2&amp;gt;&lt;br/&gt;/ trials = [1-10 = b]&lt;br/&gt;/ branch = [block.p3]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block p3&amp;gt;&lt;br/&gt;/ postinstructions = (practicefeedback)&lt;br/&gt;/ trials = [1-10 = noreplace(a,b)]&lt;br/&gt;/ branch = [if (expressions.pct_correct &amp;lt; 70 || expressions.mean_rt &amp;gt; 2000) block.p1]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial a&amp;gt;&lt;br/&gt;/ ontrialend = [values.n_trials += 1; values.n_correct += trial.a.correct; values.sum_latency += trial.a.latency; ]&lt;br/&gt;/ stimulusframes = [1=a_stim, debug]&lt;br/&gt;/ validresponse = ("a", "b")&lt;br/&gt;/ correctresponse = ("a")&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial b&amp;gt;&lt;br/&gt;/ ontrialend = [values.n_trials += 1; values.n_correct += trial.b.correct; values.sum_latency += trial.b.latency; ]&lt;br/&gt;/ stimulusframes = [1=b_stim, debug]&lt;br/&gt;/ validresponse = ("a", "b")&lt;br/&gt;/ correctresponse = ("b")&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text a_stim&amp;gt;&lt;br/&gt;/ items = ("Press 'A'")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text b_stim&amp;gt;&lt;br/&gt;/ items = ("Press 'B'")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block test&amp;gt;&lt;br/&gt;/ preinstructions = (testintro)&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;page practiceintro&amp;gt;&lt;br/&gt;^This is practice.&lt;br/&gt;&amp;lt;/page&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;page practicefeedback&amp;gt;&lt;br/&gt;^You completed &amp;lt;%values.n_trials%&amp;gt; practice trials.&lt;br/&gt;^You responded correctly in &amp;lt;%values.n_correct%&amp;gt; trials, that is &amp;lt;%expressions.pct_correct%&amp;gt; %.&lt;br/&gt;^Your mean response latency was &amp;lt;%expressions.mean_rt%&amp;gt;.&lt;br/&gt;&amp;lt;/page&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;page testintro&amp;gt;&lt;br/&gt;^This is where the actual test phase would start.&lt;br/&gt;&amp;lt;/page&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text debug&amp;gt;&lt;br/&gt;/ items = ("Trials completed: &amp;lt;%values.n_trials%&amp;gt; | Correct responses: &amp;lt;%values.n_correct%&amp;gt; | Percentage correct: &amp;lt;%expressions.pct_correct%&amp;gt; | Mean latency: &amp;lt;%expressions.mean_rt%&amp;gt;")&lt;br/&gt;/ position = (50%, 10%)&lt;br/&gt;/ size = (90%, 10%)&lt;br/&gt;/ erase = false&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Tue, 02 Aug 2016 07:00:33 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: feedback for multiple blocks and subsequent branching</title><link>https://forums.millisecond.com/Topic19467.aspx</link><description>Hi Dave,&amp;nbsp;&lt;br/&gt;&lt;br/&gt;I'm sorry, but I don't understand how to use values and expressions. I have no experience with coding language or scripting so this is very difficult to understand.&amp;nbsp;Following on from&amp;nbsp;&lt;a href="http://www.millisecond.com/support/docs/v4/html/language/express.htm"&gt;http://www.millisecond.com/support/docs/v4/html/language/express.htm&lt;/a&gt; and &lt;a href="http://www.millisecond.com/support/docs/v4/html/language/expressions/functions.htm"&gt;http://www.millisecond.com/support/docs/v4/html/language/expressions/functions.htm&lt;/a&gt; I ended up with something like this, but it doesn't work.&lt;br/&gt;&lt;br/&gt;practice block with true keyed to left&lt;br/&gt;&amp;lt;block compatiblepractice&amp;gt;&lt;br/&gt;/ bgstim = (trueleft, falseright)&lt;br/&gt;/ trials = [1 = instructions; 2 = practice; 3 =instructions1; 4 =instructionsleft; 5-24 = noreplace(aaleft, aaleft2, bbleft, bbleft2)]&lt;br/&gt;/ errormessage = true(error,200)&lt;br/&gt;/ responsemode = correct&lt;br/&gt;/ recorddata = false&lt;br/&gt;/ onblockend = [meanlatency(block.compatiblepractice);percentcorrect(block.compatiblepractice)]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;practice block with true keyed to right&lt;br/&gt;&lt;br/&gt;&amp;lt;block compatiblepracticeswitch&amp;gt;&lt;br/&gt;/ bgstim = (trueright, falseleft)&lt;br/&gt;/ trials = [1 = instructionsright; 2-41 = noreplace(aaright, aaright2, bbright, bbright2)]&lt;br/&gt;/ errormessage = true(error,200)&lt;br/&gt;/ responsemode = correct&lt;br/&gt;/ recorddata = false&lt;br/&gt;/ onblockend = [meanlatency(block.compatiblepracticeswitch);percentcorrect(block.compatiblepracticeswitch)]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;INCOMPATIBLE PRACTICE&lt;br/&gt;&lt;br/&gt;practice block with true keyed to left&lt;br/&gt;&amp;lt;block incompatiblepractice&amp;gt;&lt;br/&gt;/ bgstim = (trueleft, falseright)&lt;br/&gt;/ trials = [1 = instructions2; 2 = instructionsleft; 3-22 = noreplace(ableft, ableft2, baleft, baleft2)]&lt;br/&gt;/ errormessage = true(error,200)&lt;br/&gt;/ responsemode = correct&lt;br/&gt;/ recorddata = false&lt;br/&gt;/ onblockend = [meanlatency(block.incompatiblepractice); percentcorrect(block.incompatiblepractice)]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;practice block with true keyed to right&lt;br/&gt;&amp;lt;block incompatiblepracticeswitch&amp;gt;&lt;br/&gt;/ bgstim = (trueright, falseleft)&lt;br/&gt;/ trials = [1 = instructionsright; 2-41 = noreplace(abright, abright2, baright, baright2)]&lt;br/&gt;/ errormessage = true(error,200)&lt;br/&gt;/ responsemode = correct&lt;br/&gt;/ recorddata = false&lt;br/&gt;/ onblockend = [meanlatency(block.incompatiblepracticeswitch);percentcorrect(block.incompatiblepracticeswitch)]&lt;br/&gt;/ postinstructions = (feedback)&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;values practice&amp;gt;&lt;br/&gt;/ totalmeanlatency = totalmeanlatency(block.compatiblepractice, block.compatiblepracticeswitch, block.incompatiblepractice, block.incompatiblepracticeswitch)&lt;br/&gt;/ totalpercentcorrect = totalpercentcorrect(block.compatiblepractice, block.compatiblepracticeswitch, block.incompatiblepractice, block.incompatiblepracticeswitch)&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;instruct&amp;gt;&lt;br/&gt; / txcolor = (0, 0, 0)&lt;br/&gt; / screencolor = (255, 255, 255)&lt;br/&gt; / nextkey = (" ")&lt;br/&gt; / nextlabel = "Press space bar to continue"&lt;br/&gt; &amp;lt;/instruct&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;page feedback&amp;gt;&lt;br/&gt;Your average response time was &amp;lt;%round(values.totalmeanlatency)%&amp;gt;&lt;br/&gt;^^Your average accuracy rate was &amp;lt;%round(values.totalpercentcorrect)%&amp;gt;&lt;br/&gt;&amp;lt;/page&amp;gt;&lt;br/&gt;&lt;br/&gt;Could you please explain how to use values and expressions?&amp;nbsp;&lt;br/&gt;Thank you.&lt;br/&gt;&lt;br/&gt;</description><pubDate>Mon, 01 Aug 2016 22:25:12 GMT</pubDate><dc:creator>ememem</dc:creator></item><item><title>RE: feedback for multiple blocks and subsequent branching</title><link>https://forums.millisecond.com/Topic19464.aspx</link><description>You cannot use the simple /blockfeedback. You'll want to set up a bunch of &amp;lt;values&amp;gt; (global variables) and &amp;lt;expressions&amp;gt; to calculate and track the performance. You can report those via standard &amp;lt;page&amp;gt; elements in /postinstructions at the end of your practice block(s).&lt;br/&gt;&lt;br/&gt;You then can /branch from your final practice block back to the 1st practice block and so forth if the participant has not met the performance criteria you set.&lt;br/&gt;</description><pubDate>Mon, 01 Aug 2016 10:49:54 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>