___________________________________________________________________________________________________________________ LETTER FLUENCY ___________________________________________________________________________________________________________________ Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC Date: 1-29-2015 last updated: 12-16-2019 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC Script Copyright © 12-16-2019 Millisecond Software ___________________________________________________________________________________________________________________ BACKGROUND INFO ___________________________________________________________________________________________________________________ This script runs a simple Letter Fluency Test with phonetic categories (letters A, F, S) similar to the Controlled Oral Word Association Test (COWAT). This test collects written input. ___________________________________________________________________________________________________________________ TASK DESCRIPTION ___________________________________________________________________________________________________________________ Participants are asked to type as many words as they can that begin with letters A, F, S (tested in blocked-design). They have 2 min for each letter (default). ___________________________________________________________________________________________________________________ DURATION ___________________________________________________________________________________________________________________ the default set-up of the script takes appr. 7 minutes to complete ___________________________________________________________________________________________________________________ DATA FILE INFORMATION ___________________________________________________________________________________________________________________ The default data stored in the data files are: (1) Raw data file: 'letterfluency_raw*.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 script.sessionid: 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 such as feedback trials. Thus, trialnum may not reflect the number of main trials run per block. stimulusitem: the presented stimuli in order of trial presentation response: the participant's response latency: the response latency (in ms) /targetletter: stores the currently run targetletter /response: stores the string response for a given targetletter /response_nospaces: stores the string response for a given targetletter minus spaces /estimate_wordcount: estimates word count by comparing the length of the response with and without spaces (2) Summary data file: 'letterfluency_summary*.iqdat' (a separate file for each participant) computer.platform: the platform the script was run on (win/mac/ios/android) script.startdate: date script was run script.starttime: time script was started script.subjectid: assigned subject id number script.groupid: assigned group id number script.sessionid: assigned session id number script.elapsedtime: time it took to run script (in ms); measured from onset to offset of script script.completed: 0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run) /estimatetotal: sum of the estimated wordcounts for the 3 letters /targetletter1: stores the first targetletter (default: "A") ('first' does not refer to order in which letters were run in) /targetletter2: stores the second targetletter (default: "F") /targetletter3: stores the third targetletter (default: "S") /estimate_wordcount1- /estimate_wordcount3: estimates word count by comparing the length of the response with and without spaces for a given target letter ___________________________________________________________________________________________________________________ EXPERIMENTAL SET-UP ___________________________________________________________________________________________________________________ 3 blocks: one block per targetletter each block has a timelimit of 2min (editable parameter) Word Count-Estimate: Algorithm Inquisit attempts to estimate the number of words for each letter by - replacing all spaces up to 5 with a single space - replacing all line breaks with a single space - comparing the response string that contains only single spaces with a response strings that contains no spaces at all => the estimated word count is the differences in string length plus 1 (e.g. "slug snail snake" vs. "slugsnailsnake" => 2 spaces + 1 = 3 words) Note: the algorithm only provides a rough estimate of the word count (and it does NOT check whether the words are correct) ___________________________________________________________________________________________________________________ STIMULI ___________________________________________________________________________________________________________________ This script test letters A, F, S because of their frequency in English Different letters can be substituted under EDITABLE CODE -> Editable Values ___________________________________________________________________________________________________________________ INSTRUCTIONS ___________________________________________________________________________________________________________________ provide by Millisecond Software - instructions can be edited under EDITABLE CODE -> 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: /targetletter1: stores the first targetletter (default: "A") /targetletter2: stores the second targetletter (default: "F") /targetletter3: stores the third targetletter (default: "S") /timelimit: stores the number of ms that participants have to come up with the words (default: 120000ms => 2min) /warningduration: stores the duration in ms of the warning signal to prepare participants to get ready for next round (default: 1000ms) ************************************************************************************************************** ************************************************************************************************************** EDITABLE PARAMETERS: change editable parameters here ************************************************************************************************************** ************************************************************************************************************** /targetletter1 = "A" /targetletter2 = "F" /targetletter3 = "S" /timelimit = 120000 /warningduration = 1000 ************************************************************************************************************** ************************************************************************************************************** EDITABLE INSTRUCTIONS: change instructions here ************************************************************************************************************** ************************************************************************************************************** / fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1) /1 = "Name all the words that you can think of that begin with" /2 = "Get ready" ^^Please type in all the words you can think of that begin with a certain letter into the provided textbox. ^^You will be asked to do this task for 3 different letters. ^^Proper Nouns and Plural words do NOT count as words. ^^^You will have <%parameters.timelimit/1000/60%> min per letter. You have reached the end of the task. ^^Thank you! ************************************************************************************************************** !!!REMAINING CODE: Customize after careful consideration only!!! ************************************************************************************************************** ************************************************************************************************************** ************************************************************************************************************** DEFAULTS ************************************************************************************************************** ************************************************************************************************************** script requires Inquisit 6.0.0.0 or higher /canvasaspectratio = (4,3) /minimumversion = "6.0.0.0" / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /txbgcolor = white / txcolor = (0, 0, 0) ************************************************************************************************************** ************************************************************************************************************** DATA ************************************************************************************************************** ************************************************************************************************************** Note: data file explanations under User Manual Information at the top ******************** raw data ******************** / columns = (build, computer.platform, date, time, subject, group, script.sessionid, blockcode, blocknum, trialcode, trialnum, stimulusitem, response, latency, values.targetletter, values.estimate_wordcount1, values.estimate_wordcount2, values.estimate_wordcount3) ******************** summary data ******************** / columns = (computer.platform, script.startdate, script.starttime, script.subjectid, script.groupid, script.sessionid, script.elapsedtime, script.completed, parameters.timelimit, expressions.estimatetotal, parameters.targetletter1, values.estimate_wordcount1, parameters.targetletter2, values.estimate_wordcount2, parameters.targetletter3, values.estimate_wordcount3) ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically updated ************************************************************************************************************** ************************************************************************************************************** /targetletter: stores the currently run targetletter /response: stores the string response for a given targetletter /response_nospaces: stores the string response for a given targetletter minus spaces /estimate_wordcount1- /estimate_wordcount3: estimates word count by comparing the length of the response with and without spaces for a given letter /targetletter = 0 /response = "" /response_singlespaces = 0 /response_nospaces = "" /estimate_wordcount1 = 0 /estimate_wordcount2 = 0 /estimate_wordcount3 = 0 ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** /estimatetotal: sum of the estimated wordcounts for the 3 letters /estimatetotal = values.estimate_wordcount1 + values.estimate_wordcount2 + values.estimate_wordcount3 ************************************************************************************************************** ************************************************************************************************************** STIMULI ************************************************************************************************************** ************************************************************************************************************** /items = instructions /select = 1 / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /size = (80%, 20%) /position = (50%, 20%) /vjustify = center /erase = false /items = ("<%values.targetletter%>") / fontstyle = ("Arial", 8%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /size = (10%, 10%) /position = (50%, 30%) /vjustify = center /erase = false /items = instructions /select = 2 / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /size = (60%, 30%) /position = (50%, 50%) /vjustify = center /erase = false ************************************************************************************************************** ************************************************************************************************************** LISTS ************************************************************************************************************** ************************************************************************************************************** ******************************************************************************************************************* Note: list.targetletters samples the 3 targetletters randomly without replacement /items = (parameters.targetletter1, parameters.targetletter2, parameters.targetletter3) /replace = false ************************************************************************************************************** ************************************************************************************************************** TRIALS ************************************************************************************************************** ************************************************************************************************************** Note: trial.warning provides a signal to get ready for the next round /stimulusframes = [1 = clearscreen, warning] /trialduration = (parameters.warningduration) /recorddata = false Note: trial.naming_written * provides a textbox * at the end, a rough estimate of the word count is calculated /buttonlabel = "" /ontrialbegin = [ values.response = ""; values.targetletter = list.targetletters.nextvalue; ] /stimulusframes = [1 = instructions, targetletter] /isvalidresponse = [return (openended.naming_written.latency == parameters.timelimit);] /multiline = true /charlimit = 20000 / linelength = 80 /numlines = 15 /position = (50%, 80%) / size = (80%, 40%) /ontrialend = [ values.response = openended.naming_written.response; values.response_singlespaces = values.response; values.response_singlespaces = replaceall(values.response_singlespaces, " ", " "); values.response_singlespaces = replaceall(values.response_singlespaces, " ", " "); values.response_singlespaces = replaceall(values.response_singlespaces, " ", " "); values.response_singlespaces = replaceall(values.response_singlespaces, " ", " "); values.response_singlespaces = replaceall(values.response_singlespaces, "/n", " "); values.response_singlespaces = replaceall(values.response_singlespaces, ",", " "); values.response_singlespaces = replaceall(values.response_singlespaces, ";", " "); values.response_singlespaces = replaceall(values.response_singlespaces, "|", " "); values.response_singlespaces = replaceall(values.response_singlespaces, ":", " "); values.response_nospaces = replaceall(values.response_singlespaces, " ", ""); if (values.targetletter == parameters.targetletter1) { values.estimate_wordcount1 = (length(values.response_singlespaces) - length(values.response_nospaces)) + 1; } else if (values.targetletter == parameters.targetletter2) { values.estimate_wordcount2 = (length(values.response_singlespaces) - length(values.response_nospaces)) + 1; } else if (values.targetletter == parameters.targetletter3) { values.estimate_wordcount3 = (length(values.response_singlespaces) - length(values.response_nospaces)) + 1; }; ] /timeout = parameters.timelimit ************************************************************************************************************** ************************************************************************************************************** BLOCKS ************************************************************************************************************** ************************************************************************************************************** Note: block.naming calls the naming trials for each letter The letters are randomly sampled without replacement. /trials = [1-3 = sequence(warning,naming_written)] ************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** /preinstructions = (intro) /blocks = [1 = naming_written] ************************************************************************************************************** End of File **************************************************************************************************************