KBB MMN (In depth) - LeoLedesma237/LeoWebsite GitHub Wiki
Our MMN task was created using PsycoPy-2023.2.3. This program is commonly used in psychological related research. It provides a graphical user interface to make programming tasks easier than writing code in Python. It is also designed to work well with Excel. Thus, researchers that have very low familiarity with Python code (including myself) can create columns (variables) in Excel with different values that can be used for trial manipulation in PsychoPy. This is exactly the approach we took.
However, instead of manually creating variables and their respective values in Excel, R scripts were used to create data frames that were saved as separate Excel files. Not only does this approach save time and allow for easy modifications to these variables in the future, but it also mitigates potential errors from manually entering values. Additionally, to verify that the R scripts and PsychoPy are producing the trials that we intended, a separate R script was created to report on the data quality of pilot data collection.
Initial R scripts
The R scripts create a data frame with 5 variables and saves them as an excel file. The variables are as follows:
file_name
Stimuli_duration
SOA
ISI_start
ISI
Trial_Type
Each MMN version was created by their respective R script. The file_name
variable has two functions. It tells PsychoPy which stimulus to present and in which order, and it tells the program where to find the audio files in the local directory. The Stimuli_duration
variable indicates the duration in milliseconds (ms) for the auditory stimulus. Each MMN version has a different stimulus duration, but the duration for all trial types within an MMN version are the same. The SOA
is an abbreviation for stimulus onset asynchrony. This is a commonly used term in MMN research that means the time between the start of a stimulus presentation and the start of the next stimulus presentation. When writing a paper that describes the methodology of the MMN, we must mention the SOA and not the interstimulus interval ISI
, which is the time between the end of the first stimulus and the start of the next stimulus. However, it is difficult to manually set an SOA in PsychoPy. Thus, another solution is to take our desired SOA, subtract the stimulus duration from it, giving us the ISI, and programming that variable into PsychoPy (SOA = stimulus_duration + ISI). The ISI_start
variable will be set to 2 ms (.002 seconds); this is because there is a delay between when the trial starts and when the auditory sound is presented by 2 ms that has to be controlled for or else the ISI and SOA will be shorter than expected (This is more severe when presenting images). Lastly the Trial_Type
variable will indicate whether the stimulus for a given trial is a Standard (shown 90% of the time) or a Deviant (presented 10% of the time). Each MMN version has 550 trials, with 500 standard stimuli and 50 deviant stimuli.
Three versions of the MMN were created.
- Tones
- Phonemes
- Words
1) Tones
The Stimuli_duration
for the MMN Tone version was set for 75 ms (.075 seconds) based on a similar study in adults (Näätänen et al., 2004). Additionally, the creation for the standard (1000 Hz) and deviant (1200 Hz) tones in MATLAB can be found here.
We set the SOA
for Tones to 500 ms (.500 seconds) based on findings from two studies. The first was mentioned in the introduction of Cheour and colleagues (2000) study. That study reported MMN's for a tone paradigm (1000 Hz vs 1100 Hz) that used SOAs of 450 and 800 ms in 11-year-old children. Additionally, a highly cited study in adults by Näätänen and colleagues (2004) created two MMN tasks, one with a SOA of 500 ms and the other with a SOA of 300 ms. Thus, since a SOA of 500 ms is in between the ranges used by Cheor and colleagues (2000) in their children's sample and a SOA of 500 ms was directly used by Näätänen and colleagues (2004) in their adult sample, then we figured it was an appropriate SOA for this condition.
To produce an SOA of 500 ms, we programmed PsychoPy to have an ISI
of 425 ms (.425 seconds). This is because our standard and deviant stimuli are both 75 ms. Thus, a trial with a 75 ms stimulus and an ISI of 425 ms produces a SOA of 500 ms.
2) Phonemes
The Stimuli_duration
for vowels was set to 350 milliseconds (.350 seconds). Both speech stimuli (/ba/ and /da/) were created using Pratt and have a similar duration of less than 350 ms. Thus, we will set the variable of Stimuli_duration
to 350 to help calculate the desired SOA.
We set the SOA
of speech to 900 ms (.900 seconds) based on findings from three studies. For a study that investigated different tone sounds of the vowel 'o,' they used an SOA of 700 ms (Čeponien et al., 2002). A study by Pettigrew and colleagues (2004) showed that using an SOA of 610 ms or 900 ms had no effect on the ability to obtain MMN responses to speech stimuli (/de/ vs /ge/). Another study by Pettigrew and colleagues (2005) also used an SOA of 900 ms for speech stimuli (/de/ vs /deI/). These speech sounds were created using the 'semisynthesised speech generation technique.' Since two of these studies (disclaimer: by the same researcher) used 900 ms and the one by Čeponien et al. (2002) used an SOA of 700 ms, then it would be inappropriate to use the SOA for tones of 500. It was decided to go with 900 ms since that seemed like the safe choice.
To produce an SOA of 900 ms, we programmed PsychoPy to have an ISI
of 425 ms (.425 seconds). This is because our standard and deviant stimuli are both 350 ms. Thus, a trial with a 350 ms stimulus and an ISI of 550 ms produces a SOA of 900 ms.
3) Words (Incomplete)
The words task is comprised of 25 unique two syllable real words (Standard) and 5 unique two syllable pseudo words (Deviant). Each standard word was presented 20 times (25 * 20 = 500) and each deviant word was presented 10 times (5*10 = 50) thus presenting 550 trials. A set seed was used to present each word without deviants following each other sequentially.
The Stimuli_duration
for vowels was set to 800 milliseconds (.800 seconds). This will LATER BE CHANGED TO BE SPECIFIC FOR EACH STIMULI SINCE THEY ALL DIFFER IN DURATION. This number was chosen for convenience to obtain our desired SOA.
We set the SOA
to 1000 ms (1 second) based on the findings of a few studies. First, Pettigrew and colleagues (2005) were interested in investigating MMN differences between the word Day (/deI/) and a similar sounding pseudoword (/de/). The SOA they chose was 900 ms. A very recent study by Jacobsen and colleagues (2021) used several real one syllable words and displayed their frequency and duration in a table. They used an SOA (called onset-to-onset interval) of 750 ms. Lastly, an interesting study by Partanen and colleagues (2011) were investigating differences between standard and deviant three syllable pseudowords. They used an SOA of 1 second. Therefore, the SOA we need to chose is one that is long enough to capture the longest duration auditory stimuli we have present.
To produce an SOA of 1000 ms, we programmed PsychoPy to have an ISI
of 200 ms (.100 seconds). This is the max duration of our standard or deviant stimulus is 800 ms (HOWEVER I HAVENT CHECKED TO CONFIRM). Thus, a trial with a 800 ms stimulus and an ISI of 200 ms produces a SOA of 1000 ms.
I WILL NEED TO IDENTIFY THE LENGTH OF EACH STIMULI WE HAVE AND THEN USE THAT WITH A CHANGING ISI TO PRODUCE A SOA OF 1000 MS THAT IS CONSISTENT ACROSS TRIALS.
Post R script (Quality Control) - Tone
Below are the first 19 trials to the Tone version of the MMN. Calculating the variables for this PsychoPy task was a bit different than the calculations used for the KBB CPT counterpart. Unlike the CPT task, this task is presenting audio files instead of images. Thus, when comparing how long it took for a stimulus to be presented after the trial started, the delay was a miniscule 2 ms. However, we still controlled for it by adding it to the start of the ISI ISI.start
. Overall, the programmed duration of the stimuli was meant to be 75 ms, however, it seems that PsychoPy presented the stimuli for 80 ms instead. There might be two reasons for this: 1) PsychoPy cannot go below 80 ms for an audio task (which is unlikely since it was able to do so for the first trial) or 2) PsychoPy did present it for 75 ms but there was a few ms delay in adding the time stamp for the end of the duration. Regardless, we will keep these data as is instead of changing the variable in the initial script to 70 ms in an attempt to result a 75 ms duration in the output. The next thing to note is that the stop of the ISI stimulus goes over what we wanted by 15 ms. This is evident in the ISI.stop
variable. However, when we look at the duration of the whole trial (trial.duration
), all of the trials are 500 ms as intended. On closer inspection of the ISI.stop
column in the Excel file created by PsychoPy, it seems that the trial does end before the time stamp for the ISI stops. However, when manually checking the time stamps for the end of a trial to the start of the next trial, it is 0 ms, meaning that every trial is 500 ms and there is no delay between the end and start of upcoming trials. Thus, we can conclude that our task is performing as intended and that there is a minor bug for some reason with the time stamp of the ISI stop variable but in no way does it diminish the task.
References
Cheour, M., Leppänen, P. H., & Kraus, N. (2000). Mismatch negativity (MMN) as a tool for investigating auditory discrimination and sensory memory in infants and children. Clinical neurophysiology, 111(1), 4-16.
Čeponien, R., Yaguchi, K., Shestakova, A., Alku, P., Suominen, K., & Näätänen, R. (2002). Sound complexity and ‘speechness’ effects on pre-attentive auditory discrimination in children. International Journal of Psychophysiology, 43(3), 199-211.
Jacobsen, T., Bäß, P., Roye, A., Winkler, I., Schröger, E., & Horváth, J. (2021). Word class and word frequency in the MMN looking glass. Brain and Language, 218, 104964. Näätänen, R., Pakarinen, S., Rinne, T., & Takegata, R. (2004). The mismatch negativity (MMN): towards the optimal paradigm. Clinical neurophysiology, 115(1), 140-144.
Näätänen, R., Pakarinen, S., Rinne, T., & Takegata, R. (2004). The mismatch negativity (MMN): towards the optimal paradigm. Clinical neurophysiology, 115(1), 140-144.
Partanen, E., Vainio, M., Kujala, T., & Huotilainen, M. (2011). Linguistic multifeature MMN paradigm for extensive recording of auditory discrimination profiles. Psychophysiology, 48(10), 1372-1380.
Pettigrew, C. M., Murdoch, B. M., Kei, J., Chenery, H. J., Sockalingam, R., Ponton, C. W., ... & Alku, P. (2004). Processing of English words with fine acoustic contrasts and simple tones: a mismatch negativity study. Journal of the American Academy of Audiology, 15(01), 047-066.
Pettigrew, C., Murdoch, B., Kei, J., Ponton, C., Alku, P., & Chenery, H. (2005). The mismatch negativity (MMN) response to complex tones and spoken words in individuals with aphasia. Aphasiology, 19(2), 131-163.