This article applies to:
This sample illustrates using a Summation object to measure accuracy over trials and provide overall accuracy at the end of the block.
A Summation object is declared within the User Script (ALT+7) to enable the collection of a number of data entries. The InLine object, 'InitiateVar', initiates the Summation object, 'OverallAcc', for use.
Instructions are given, followed by a List object, 'TrialList'. The List runs the 'TrialProc' procedure four times by manipulating the value of the 'Weight' attribute. Each level is run twice.
Participants see a brief fixation cross, followed by a stimulus of the letter 'X' or 'Y'. Participants are asked to respond by pressing a corresponding number.
Following the 'StimulusPresentation' object, the InLine object, Summation, adds the accuracy of the participant's response to the Summation object. In addition, a Debug.Print command is used to print the participant's running accuracy in the 'Output' window. The mean value of the Summation object is then placed in the Trial Level attribute of the same name.
SCRIPTING: User Script Window