technical components of an undergrad cognitive psychology study on the inner voice (study completed, plenty of room for follow-up)
Technical elements of a cognitive psychology thesis work submitted to the faculty of the Departments of Psychology and Linguistics at Swarthmore College in May 2019 in partial fulfillment for the degree of Bachelor of Arts.
Occupation of Inner Speech in the Working Memory During Silent Reading:
Effects of Articulatory Suppression on Anticipated Lexical Stress
As we silently read words on a page, we use an “inner speech” that includes rhythm and inflections as if we are reading aloud. We also use an inner speech when performing non-reading tasks such as remembering verbal materials, problem solving, mental calculation, and decision making. Present research has not yet determined whether these two uses of inner speech occupy the same cognitive resources. This paper presents findings from an eye-tracking study designed to explore whether the inner speech of silent reading occupies the same resources in working memory as other mental tasks. In the first part of the experiment, participants read stress-alternating homographs (e.g., PREsent, preSENT) embedded in limericks, which compelled them to initially expect the incorrect prosody of the homograph and thus encounter a reading cost. As they read, participants also performed articulatory suppression by repeating the word this aloud. The goal of this was to use the outer voice to occupy the relevant resources in working memory, thus rendering them unavailable to be used during silent reading—this allows us to see if those resources pertain to the inner voice of silent reading. Participants also completed the 18-item Varieties of Inner Speech Questionnaire (VISQ; McCarthy-Jones & Fernyhough, 2011), a self-assessment survey that assesses one’s relationship with inner speech. The goal of this was to see if participants who reported experiencing higher levels of inner speech in their everyday lives would be more susceptible to the reading costs prompted by articulatory suppression during rhythm-mismatching limericks. If the differences in reading costs between reading rhythm-matching and -mismatching limericks vanish while repeating this, and if participants who experience higher levels of inner speech are more affected by articulatory suppression, then this would show that these two inner voices occupy the same working memory resources. The study found some preliminary evidence that articulatory suppression can diminish the effect of stress clash on silent reading, as well as some preliminary indication that inner speech occupies working memory and that this machinery overlaps with the inner voice of the rehearsal component of the phonological loop.
Key words: inner speech, silent reading, working memory, phonological loop, articulatory suppression, eye movements
awk_scripts/
- awk scripts for data wranglingdata/
- collected datasrc/
- source code for data processingtest/
- testing stuff; everything in here is an archive of things that can be ignored.gitignore
- specifiles which files and folders to ignore when pushing codeInnerSpeechWorkingMemory.pdf
- copy of paperLICENSE
- copyright termsREADME.md
- (this page) contains information about the contents and usage of this repositorySee project wiki for more details about contents.
This package works with Mac and Linux terminals.
It works with Windows, too, but this is difficult for a variety of reasons: Command Prompt uses different commands than the ones described in the instructions below, when you do something wrong whilst running eyedry it crashes without showing you the error message, and retrieving files from Bash is difficult. If necessary, however, a workaround can be arranged by using the VisualStudio Code IDE and GitHub Desktop bash shell.
TL;DR: Best to use macOS or Linux.
EyeTrackingLabAdmin/Limerick1/
shared Drive folder.Desktop/Exeriments/LimerickProsodyDeployed/LimerickProsodyA/results/subject0/
subject0.edf
. Double-click on that .edf file to generate an .asc file.data/original_asc/
folder.data/original_asc/
folder, so that it contains A_aoi/
, B_aoi/
, C_aoi/
, D_aoi/
, RevA_aoi/
, RevB_aoi/
, RevC_aoi/
, RevD_aoi/
.src/reformat_asc/lists.py
is a dictionary mapping lists to participants who saw that list. The eight lists are A, B, C, D, RevA, RevB, RevC, RevD.From within the /src
directory, run:
python3 runall.py
All input variables are already written into the respective scripts (but see the wiki for where to modify things during future adaptations). This single script executes the following consecutively:
NOTE: It is crucial to only run this once, unless you go back and gather the original_asc files again. This is because remove_participants_question_acc.py excludes participants based on their relative performance on the ‘is this limerick dirty’ questions.
data/eyedry_output/
. In the end, we created five folders:data/eyedry_output/graphs1/
data/eyedry_output/graphs2/
data/eyedry_output/graphs3/
data/eyedry_output/graphs4/
data/eyedry_output/graphs5/
From within src/eyedry/
, compile eyedry: (ignore any warnings)
gcc eyedry.c -o eyedry
NOTE: compiling only needs to be done once, ever, unless for some reason you make changes to eyedry.c (which you probably shouldn’t do)
From within src/
, run the executable that we just created: (ignore any warnings)
./eyedry/eyedry
Eyedry will ask a series of questions. For details of what each question is asking, see the eyelab manual
—a copy of this manual is located in EyeTrackingLabAdmin/UMassEyetrack/eyelabmanual.pdf
. We answered as follows:
Question | Answer | Explanation and Comments |
---|---|---|
What is the output trace file name? | ../data/eyedry_output/graphs1/trace_graphs1.txt |
This does not affect functionality. Beware that this will overwrite the trace_graphs1.txt file if it already exists. |
Type an identifying string to print out | trying to get data on [date and time] | Include any notes or identifying information that you wish to include at the top of the output file. This does not affect functionality. |
What is the maximum number of fixations on an item | [press return] | Use default 60 |
Type name of file containing control info (CR if none) | eyedry/limerick1.ctl or [press return] and re-generate it as follows |
This .ctl file can be saved and re-used. If re-using the existing limerick1.ctl, then skip down to below where it asks to confirm the values. |
Debug level | 0 | |
Does the question after a sentence have the same COND and ITEM number as the sentences and fall on the next line? | n | |
Do you want to eliminate trials on the basis of errors to questions? | n | |
What is the smallest numbered experimental item? | 1 | |
What is the largest numbered experimental item? | 40 | |
How many regions maximum? | 7 | |
What is the smallest condition number (after any exception adjustment)? | 1 | |
What is the largest condition number (after any exception adjustment)? | 4 | |
How many subconditions maximum for any one item? | 4 | We didn’t exactly have subconditions, but it breaks otherwise. |
What field is the condition number in? | 2 | According to HowToReadRoboDocOutput.txt |
What field is the item number in? | 3 | According to HowToReadRoboDocOutput.txt |
What field is the number-of-fixations number in? | 6 | According to HowToReadRoboDocOutput.txt (note that this is different from what’s suggested in the aged eyetrackingmanual.pdf ) |
What field do the data start in? | 7 | According to HowToReadRoboDocOutput.txt (note that this is different from what’s suggested in the aged eyetrackingmanual.pdf ) |
Longest fixation time, msec (truncate if above) | 800 | Same as Breen and Clifton (2011) |
Shortest fixation time, msec (discard if below) | 80 | Same as Breen and Clifton (2011) |
What is the screen width in characters? | 160 | Approximately but we didn’t use fix-width font |
What is the maximum number of lines of text? | 5 | |
Do you want to permit regions to wrap around end of a line? | n | |
Did your .sen/.stm file have blank lines between lines of text? | y | No idea, we don’t even have .sen/.stm files |
Do you want to analyze just some of your trials (eg 1st half)? | n | |
Do you want to analyze just the first N trials in each condition? | n | |
Following the questions, it will ask to confirm the values that were just entered. | Double-check them and correct errors if necessary by entering the number of the value to change (instructions are on the screen). Then [press return] to continue. | |
What file name do you want to save these values as (CR if none)? | eyedry/limerick1.ctl or [press return] |
This will only be asked if you did not enter a .ctl file above or if you changed one of its values. This does not affect functionality. |
What is the name of file that lists data files? | ../data/robodoc_output/files_processed.lst |
|
Any exceptions file? | n | |
../data/scripter_output/output_from_scripter.cnt |
Typo, it’s supposed to say “count file” not “control file.” |
After answering these questions, the next that should appear is a “Which analysis?” list of possible analyses that can be performed. Continue to the next step.
Prior to analysis: (following Breen and Clifton, 2011)
remove_participants_question_acc.py
as part of runall.py
Analysis of standard eyetracking measures: (following Breen and Clifton, 2011; see also Rayner, 1998; Rayner et al.,1989)
Each of the following measures will be obtained within the terminal starting from the “Which analysis?” prompt. Completion of each measure will return you to this prompt. Answer the questions as follows.
WARNING: Sometimes the program segfaults and crashes for various unknown reasons.
Shortcuts:
Question | Answer | Explanation and Comments |
---|---|---|
Which analysis? | 2 | |
Type an identifying string to print out | First pass time | This doesn’t affect functionality. |
Throw away zero fixation values? | n | We will take care of zero-fixations later through the awk script |
Do you want to CULMINATE or AVERAGE multiple fixations in a region? | c | |
RAW times, MS/char, or DEVIATION from regression | r | |
Conditionalize on presence/absence of regression in critical region? | n | |
Conditionalize on presence/absence of fixation in critical region? | n | |
What is the upper summed cutoff for first pass time? | [press return] | Use default 2000 |
Conditionalize on position of last fixation before each region? | n | |
File of item X subject combinations | firstPassIXS |
We will base our analysis on this file. |
Do you want ALL trials written, or just trials with Observations? | a | |
Do you want Wide output (all regions in one row) or Narrow (one row per region)? | w | |
Subject by subject file, one condition per line (not systat) | firstPassSXS |
We won’t base our analysis on this file, but might as well save it. |
Subject by subject file, formatted for Systat | [press return] | We don’t want this file. |
Item by item file, one condition per line (not systat) | firstPassIXI |
We won’t base our analysis on this file, but might as well save it. |
Item by item file, formatted for Systat | [press return] | We don’t want this file. |
Do you want information about long and short times printed? | n | WARNING: “y” is a possible source of segfault. |
Do you want a typeout of the item-by-item data? | n | WARNING: “y” is a possible source of segfault. |
Question | Answer | Explanation and Comments |
---|---|---|
Which analysis? | 13 | |
Type an identifying string to print out | Go-past time | This doesn’t affect functionality. |
Throw away zero fixation values? | n | |
Do you want to CULMINATE or AVERAGE multiple fixations in a region? | c | |
Do you want to keep RAW times or convert to MSEC/CHAR? | r | |
Which analysis | 1 | There are three options here. We want sum of all time from first entering region to first going past. |
File of item X subject combinations | goPastIXS |
We will base our analysis on this file. |
Do you want ALL trials written, or just trials with Observations? | a | |
Do you want Wide output (all regions in one row) or Narrow (one row per region)? | w | |
Subject by subject file, one condition per line (not systat) | goPastSXS |
We won’t base our analysis on this file, but might as well save it. |
Subject by subject file, formatted for Systat | [press return] | We don’t want this file. |
Item by item file, one condition per line (not systat) | goPastIXI |
We won’t base our analysis on this file, but might as well save it. |
Item by item file, formatted for Systat | [press return] | We don’t want this file. |
Do you want information about long and short times printed? | n | WARNING: “y” is a possible source of segfault. |
Do you want a typeout of the item-by-item data? | n | WARNING: “y” is a possible source of segfault. |
Question | Answer | Explanation and Comments |
---|---|---|
Which analysis? | 6 | |
Type an identifying string to print out | Probability of fixating in a region | This doesn’t affect functionality. |
Which analysis: | 1 | Probability of one or more fixations |
Conditionalize on position of last fixation before each region? | n | |
File of item X subject combinations | probFixationIXS |
We will base our analysis on this file. |
Do you want ALL trials written, or just trials with Observations? | a | |
Do you want Wide output (all regions in one row) or Narrow (one row per region)? | w | |
Subject by subject file, one condition per line (not systat) | probFixationSXS |
We won’t base our analysis on this file, but might as well save it. |
Subject by subject file, formatted for Systat | [press return] | We don’t want this file. |
Item by item file, one condition per line (not systat) | probFixationIXI |
We won’t base our analysis on this file, but might as well save it. |
Item by item file, formatted for Systat | [press return] | We don’t want this file. |
Do you want information about long and short times printed? | n | WARNING: “y” is a possible source of segfault. |
Do you want a typeout of the item-by-item data? | n | WARNING: “y” is a possible source of segfault. |
Question | Answer | Explanation and Comments |
---|---|---|
Which analysis? | 4 | |
Type an identifying string to print out | Probability of regresing out of a region | This doesn’t affect functionality. |
File of item X subject combinations | probRegressionIXS |
We will base our analysis on this file. |
Do you want ALL trials written, or just trials with Observations? | a | |
Do you want Wide output (all regions in one row) or Narrow (one row per region)? | w | |
Subject by subject file, one condition per line (not systat) | probRegressionSXS |
We won’t base our analysis on this file, but might as well save it. |
Subject by subject file, formatted for Systat | [press return] | We don’t want this file. |
Item by item file, one condition per line (not systat) | probRegressionIXI |
We won’t base our analysis on this file, but might as well save it. |
Item by item file, formatted for Systat | [press return] | We don’t want this file. |
Do you want information about long and short times printed? | n | WARNING: “y” is a possible source of segfault. |
Do you want a typeout of the item-by-item data? | n | WARNING: “y” is a possible source of segfault. |
Question | Answer | Explanation and Comments |
---|---|---|
Which analysis? | 1 | |
Type an identifying string to print out | First fixation duration | This doesn’t affect functionality. |
Which analysis: | 3 | Initial one of multiple fixations |
Do you want to keep RAW times or convert to MSEC/CHAR? | r | |
Conditionalize on presence/absense of regression in critical region? | n | |
Conditionalize on presence/absense of fixation in critical region? | n | |
Conditionalize on position of last fixation before each region? | n | |
File of item X subject combinations | firstFixationIXS |
We will base our analysis on this file. |
Do you want ALL trials written, or just trials with Observations? | a | |
Do you want Wide output (all regions in one row) or Narrow (one row per region)? | w | |
Subject by subject file, one condition per line (not systat) | firstFixationSXS |
We won’t base our analysis on this file, but might as well save it. |
Subject by subject file, formatted for Systat | [press return] | We don’t want this file |
Item by item file, one condition per line (not systat) | firstFixationIXI |
We won’t base our analysis on this file, but might as well save it. |
Item by item file, formatted for Systat | [press return] | We don’t want this file |
Do you want information about long and short times printed? | n | WARNING: “y” is a possible source of segfault. |
Do you want a typeout of the item-by-item data? | n | WARNING: “y” is a possible source of segfault. |
Press 0 to Quit.
Notice that all of these generated files got saved into src/
. Create a new folder located at ../data/eyedry_output/graphs_1/original_eyedry_output_1
and move them all into there.
NOTE: the trace file (e.g. ../data/eyedry_output/graphs1/trace_graphs11.txt
) contains a record of everything that was performed with EyeDry just now.
Sample a few trials from the analyses files to compare “by hand” with the video viewer in ExperimentBuilder.
To match the participants’ measures in the analyses files back together with their eye-movement videos in ExperimenterBuilder, consider the following:
firstPassIXS
) respectively correspond to participants in the data/robodoc_output/files_processed.lst
file.The sequence number (first column) in each of the IXS measures files (e.g. firstPassIXS
) correspond with the DataViewer TrialID according to this relationship:
dataviewer_trialid = (sequence_number + 1) / 2 + 1
Double-check: The item number (third column) in each of the IXS measures files (e.g. firstPassIXS
should correspond exactly with the TRIALID number in the original .asc file. Check the limerick from the .asc for that trial against the one for that sequence in src/scripter/input_to_scripter
; they should be the same limerick.
RPlots.pdf
From within /src
, run:
python3 edit_cond.py [INPUT_FOLDER] [OUTPUT_FOLDER]
The INPUT_FOLDER is the data/eyedry_output/graphs1/original_eyedry_output_1
folder, and the OUTPUT_FOLDER is the data/eyedry_output/graphs1/edited_eyedry_output_1
folder.
This script replaces missing values with 0 and replaces condition numbers with their word descriptions (e.g. 1 => match_tap) for each of five IXS measures files.
It also repairs the unexplainable error where some random lines in the measures files contained a zero condition value but a non-zero sequence value; for these, it replaces the sequence value wtih 0.
The edited files become automagically stored into data/eyedry_output/graphs1/edited_eyedry_output_1/
per the script (or whichever graphs folder was designated).
This section provides a brief overview of the analysis that we performed. For more information regarding the various attempts at analysis that we made, please reference the manuscript or the aptly-named data/eyedry_output/grafts.txt
From within data/eyedry_output/graphs1/edited_eyedry_output_1/
, run:
FOR REGION 2
awk -F"," '$4~/_/{print $2,$4,$6}' firstPassIXS_edited | tr "_" " "| ../../anova subj clashtype secondtask time
FOR REGION 3
awk -F"," '$4~/_/{print $2,$4,$7}' firstPassIXS_edited | tr "_" " "| ../../anova subj clashtype secondtask time
for each of the measures:
FOR REGION 2
awk -F"," '$4~/_/ && $7!=0{print $2,$4,$6}' firstPassIXS_edited | tr "_" " "| ../../anova subj clashtype secondtask time
FOR REGION 3
awk -F"," '$4~/_/ && $7!=0{print $2,$4,$7}' firstPassIXS_edited | tr "_" " "| ../../anova subj clashtype secondtask time
For the firstPast and goPast measures, we removed the participant(s) who was making the R3 grid unbalanced.
Copy the measures outputted from the Terminal into Excel (perhaps with the aid of a text-to-TSV converter such as https://www.browserling.com/tools/text-to-tsv)
Make graphs
fixAlign.R
on the ascii files.Thanks to Professor Dan Grodner for enormous guidance and so much invested time over the years; to Professors Dan Grodner and Nathan Sanders for giving birth to the experiment; to Drs. Mara Breen and Charles Clifton for providing the stimuli and research on which this study was based; to Drs. Charles Clifton, Adrian Staub, Andrew Cohen, Jesse Harris, and colleagues for creating and maintaining the eyetracking analysis software that we relied on; to the alumni and current students practicing research in the Swarthmore Psycholinguistics Lab; to the Swarthmore Department of Psychology for sponsoring the experiment; and to the undergraduate students at Swarthmore College who participated in the study.
(c) Copyright 2019 Swarthmore Psycholinguistics Lab etc.
This project was created for non-monetary educational purposes only (please don’t sue me)