__________________________________________________________________________________________________________________ * Complex Reaction Time Task (Touchscreen)* ___________________________________________________________________________________________________________________ Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC Date: 08-17-2018 last updated: 10-05-2023 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC Script Copyright ©10-05-2023 Millisecond Software ___________________________________________________________________________________________________________________ BACKGROUND INFO ___________________________________________________________________________________________________________________ This script implements a Complex Reaction Time Task for the touchscreen. A similar task was used by Kochan et al (2013) to study reaction times in dementia patients. Reference: Kochan, N., Bunce, D., Pont, S., Slavin, M., Reppermund, S., Brodaty, H., Crawford, J., Mather, K., Kang, K., & Sachdev, P. (2013). Reaction-time measures predict incident dementia over 4 years: The Sydney Memory and Ageing Study. Alzheimer’s & Dementia, 9(4), P536–P536. https://doi.org/10.1016/j.jalz.2013.04.287 ___________________________________________________________________________________________________________________ TASK DESCRIPTION ___________________________________________________________________________________________________________________ Complex Reaction Time Task: press a home button until a top and a bottom stimulus appears. Then either click the top stimulus if top and bottom are the same color or click the bottom stimulus if they are not the same color. The Complex Reaction Time Task tracks the durations participants spent on various subtasks: 1. time spent on HomeButton 2. time between onset of target stimulus and lifting finger off HomeButton (A) 3. time between lifting finger off HomeButton and pressing down on target stimulus (B) 4. time spent on target stimulus (C) 5. time between lifting finger off target stimulus and pressing down on HomeButton (D) Note: The stimuli in this script can be sized absolutely so that distances btw. buttons are the same on each monitor. To do so, go to section Editable Parameters and check out parameters.runAbsoluteSizes and parameters.canvasHeightMM. By default, this script uses proportional sizing; using 100% of the available screen height and screen width = 4/3 * screen height (width:height: 4:3) ___________________________________________________________________________________________________________________ DURATION ___________________________________________________________________________________________________________________ the default set-up of the script takes appr. 5 minutes to complete ___________________________________________________________________________________________________________________ DATA OUTPUT DICTIONARY ___________________________________________________________________________________________________________________ The fields in the data files are: (1) Raw data file: 'complexreactiontimetaskTouchscreenRaw*.iqdat' (a separate file for each participant) build: The specific Inquisit version used (the 'build') that was run computer.platform: the platform the script was run on (win/mac/ios/android) date, time: date and time script was run subject, group: with the current subject/groupnumber session: with the current session id blockCode, blockNum: the name and number of the current block (built-in Inquisit variable) trialCode, trialNum: the name and number of the currently recorded trial (built-in Inquisit variable) Note: trialNum is a built-in Inquisit variable; it counts all trials run; even those that do not store data to the data file. (parameter) runAbsoluteSizes: true (1) = runs absolutely sized canvas (see (parameter) canvasHeightMM) false (0) = uses proportionally sized canvas (uses width = 4/3*screenHeight) (default) (parameter) canvasHeightMM: !!!only relevant if (parameter) runAbsoluteSizes = true (1) The height of the active canvas in mm (default: 140mm ~ ipad screen height) => the width of the active canvas size is automatically set at 4/3*canvasHeight => all other stimuli are sized proportionally for the active canvas size => Result: you achieve the same sized stimuli on all screens => IF the screen is not sufficient to allow for the canvassize the script will terminate prematurely. (parameter) versionRTComplex: 1 = same colors, press top square (different colors, press bottom square) 2 = same colors, press bottom square (different colors, press top square) list.practiceCorrect.mean: stores the proportion correct of the last 5 responses during the current practice session practicePass: 0 = participant did not pass practice criteria; 1 = participant passed practice criteria trialCount: counts all trials (trial = current trial sequence) in a block currentTrial: "RR", "YY", "RY", "YR" targetPosition: 1 = RR (red on top, red on bottom) 2 = YY (yellow on top, yellow on bottom) 3 = RY (red on top, yellow on bottom) 4 = YR (yellow on top, red on bottom) isi: current interstimulus interval in ms responseArea: stores the response area clicked complex Reaction Time Task: top or bottom vs. elsewhere vs. " " (did not respond during response window) acc: 0 = incorrect: wrong stimulus pressed, 1 = correct stimulus pressed, 2 = "elsewhere" i.e. outside the stimulus 3 = no response; finalAcc: stores final correctness of response (1 = correct; 0 = incorrect) complex Reaction Time Task: correct = selected correct square; 0 = everything else rt: response time (in ms) from onset of Stim until the stim is pressed (rt is empty if the stim is not pressed) rtDown1: script.elapsedTime (in ms) of clicking home-button (measured relative to start of script in ms) !Note: if finger lifts off home button prior to Stim appearance, rtDown1 resets to the moment the finger returns to the home button and isi is restarted from that moment. rtUp1: script.elapsedTime (in ms) of lifting finger off home-button (measured relative to start of script in ms) Note: rtUp1 is measured AFTER Stim appearance rtDown2: script.elapsedTime (in ms) of clicking stim-button or 'elsewhere' (measured relative to start of script in ms) rtUp2: script.elapsedTime (in ms) of lifting finger off stim-button or 'elsewhere' (measured relative to start of script in ms) rtDown3: script.elapsedTime (in ms) of clicking home-button after lifting finger off stim-button (measured relative to start of script in ms) Note: if participants stays on home button until stim appears rtDown3 is assigned rtDown1 of the next trial stimPresentTime: timestamp of target square (measured relative to start of script in ms): the time (in ms) measured from start of script until the targets appeared on screen a: time (in ms) btw. onset of target button (stimPresentTime) and lifting finger off home button (rtUp1) b: time (in ms) btw taking finger off Home Button and pressing down on Stim Button c: time (in ms) finger spends on Stim Button (pressing down on stimulus to lifting off stimulus) d: time (in ms) btw taking finger off Stim Button and pressing down again on Home Button durationHomeButton: time (in ms) finger spent on HomeButton countEarlyResponses: counts premature lift-offs (off homebutton) during the current trial totalEarlyResponses: counts premature lift-offs (off homebutton) across all test trials (2) Summary data file: 'complexreactiontimetaskTouchscreenSummary*.iqdat' (a separate file for each participant) inquisit.version: Inquisit version run computer.platform: the platform the script was run on (win/mac/ios/android) startDate: date script was run startTime: time script was started subjectId: assigned subject id number groupId: assigned group id number sessionId: assigned session id number elapsedTime: time it took to run script (in ms); measured from onset to offset of script completed: 0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run) (parameter) runAbsoluteSizes: true (1) = runs absolutely sized canvas (see (parameter) canvasHeightMM) false (0) = uses proportionally sized canvas (uses width = 4/3*screenHeight) (default) (parameter) canvasHeightMM: !!!only relevant if (parameter) runAbsoluteSizes = true (1) The height of the active canvas in mm (default: 140mm ~ ipad screen height) => the width of the active canvas size is automatically set at 4/3*canvasHeight => all other stimuli are sized proportionally for the active canvas size => Result: you achieve the same sized stimuli on all screens => IF the screen is not sufficient to allow for the canvassize the script will terminate prematurely. (parameter) versionRTComplex: 1 = same colors, press top square (different colors, press bottom square) 2 = same colors, press bottom square (different colors, press top square) complexRTDuration: stores the duration (in ms) of the complex RT task (only test session; excludes demo & practice) practicePassComplexRT: 0 = participant did not pass practice criteria for complexRT; 1 = participant passed practice criteria for complexRT meanRTComplexRT: mean latency (in ms) of pressing down on stim (latency measured from onset of target to pressing down on it); only correct responses accComplexRT: mean proportion correct (correct = correct square was hit) totalEarlyResponsesComplexRT: counts premature lift-offs (off homebutton) across all test trials in the complexRT task only for responses with finalACC = 1: meanDurationA: mean duration (in ms) btw. onset of target button (stimPresentTime) and lifting finger off home button meanDurationB: mean duration (in ms) btw taking finger off Home Button and pressing down on Stim Button meanDurationC: mean duration (in ms) finger spent on Stim Button meanDurationD: mean duration (in ms) btw taking finger off Stim Button and pressing down again on Home Button meanDurationHomeButton: mean duration (in ms) finger spent on HomeButton ___________________________________________________________________________________________________________________ EXPERIMENTAL SET-UP ___________________________________________________________________________________________________________________ 1. Demo: 2 demo trials (same trials for everyone: RR, RY) 2. Practice: - max. 20 trials - Pass Criteria: 5 correct trials in a row (correct = finger lifts off home button after square appears and presses down on square within 5000ms) 3. Test: 20 trials (default) - by default the same isi of 3000ms is used (see list.isiComplexRT) - each trialtype (RR, YY, RY, YR) is run equally often ___________________________________________________________________________________________________________________ INSTRUCTIONS ___________________________________________________________________________________________________________________ provided under section Editable Instructions __________________________________________________________________________________________________________________ EDITABLE CODE ___________________________________________________________________________________________________________________ check below for (relatively) easily editable parameters, stimuli, instructions etc. Keep in mind that you can use this script as a template and therefore always "mess" with the entire code to further customize your experiment. The parameters you can change are: User Interface: /runAbsoluteSizes: true = runs absolutely sized canvas (see parameters.canvasHeightMM) false = uses proportionally sized canvas (uses width = 4/3*screenHeight) (default) /canvasHeightMM: !!!only relevant if parameters.runAbsoluteSizes = true (1) the height of the active canvas in mm (default: 140mm ~ ipad screen height) => the width of the active canvas size is automatically set at 4/3*canvasHeight => all other stimuli are sized proportionally for the active canvas size => you can further customize the size of the homeButton/squareSize/position of stim button (see parameters.homeButtonSize/parameters.squareSize/parameters.HomeButtonSimpleRTY/parameters.StimButtonSimpleRTY) => Result: you achieve the same sized stimuli on all screens => IF the screen is not sufficient to allow for the canvassize the script will terminate prematurely. /homeButtonSize: the proportional size of the Home Button (relative to canvas) (default: 15%) /squareSize: the proportional size of the square (relative to canvas) (default: 15%) /topStimButtonComplexRTY: the vertical position of the top Stim Button in the complex Reaction Time Task in canvas height% (default: 20%) /bottomStimButtonComplexRTY: the vertical position of the top Stim Button in the complex Reaction Time Task in canvas height% (default: 80%) Note: for the complext Reaction Time Task, the Home Button is located at the center of the screen /versionRTComplex: 1 = same colors, press top square (different colors, press bottom square) 2 = same colors, press bottom square (different colors, press top square) /numberTestTrials: the number of test trials run (default: 20) Note: needs to be divisible by 4 /presentFinalRTFeedback: true (1): participants receive feedback about their average (correct) reaction time at test termination (default) false (0): no reaction time feedback is provided at the end /feedback: presents feedback (default: 3000ms) /homeButtonRW: home button response window until a reminder is flashed onto the screen (default: 6000ms) Note: the trial continues until the home button is pressed /stimRW: response window after stim is presented (default: 5000ms)