-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add steady-state response statistical tests #9045
Comments
To start how about (can be in one PR):
This would help us understand if functions like |
I'd guess that #7671 won't happen for several months at least. I'd be OK with adding this functionality now and refactoring later once the spectum class exists. |
@rob-luke that sounds fine rob, perhaps worth adding phase-locking value (PLV) too. |
Hi @larsoner, Jaime and I just spoke on the phone and we are unable to understand what you mean by this. Could you please elaborate? |
I'm just suggesting that we implement the parametric tests Then if it's clear that we can make a useful API for people from that code we can add the steady-state-specific ones like |
Ah I get you now, that makes sense. |
hi @rob-luke @jundurraga , sorry somehow i have missed this! i agree that having these tests easily at hand in MNE might be practical and facilitate work with steady state data.
just a comment on the proposed API so far: as you have already realized when reviewing our tutorial there is a broad range of names and keywords for different research that applies more or less identical analyses pipelines (assr, ssvep, vssp, fvps, freqeuncy-tagging, some people talk about entrainment and so on) steady state [responses] is a term that's often used regardless of the sensory modality (audio/visual) but it's loaded with quite some assumptions about the investigated neural processes. f-test and hotelling t^2 might be more common in the assr literature than in e.g. vssr, but if this commit is the initialization of a broader MNE API for these types of analyses we might want to be more general purpose: using frequency-tagging in the API would be one option (e.g. just a suggestion, open for discussion :) |
Thanks for the input @dominikwelke.
It means the response is continuous and does not vary over time (see 1). As such, you can use methods with these assumptions to estimate the neural response, such as averaging and FFTs. As you say, the term is widely used across both auditory and visual fields. There are many publications that use this term and books on the topic (see 2,3). Whereas your suggestion of frequency tagging is newer and less widely used (I checked that on google scholar).
I disagree with this. Tagging somewhat vaguely describes a method (can you please point me to a concise definition of the term?). Whereas the traditional term describes the neural response, which is what we actually want to analyse and quantify (irrespective of the methodology used to evoke it). I guess the terms are complimentary, you use a frequency tagging methodology to analyse a steady-state neural response. However, could you have a steady state response without the use of a frequency tagging methodology? I guess you could, and then you would still wish to analyse it with these methods. Obviously there are arguments for and against each terminology. However, I don’t think that this is the place to try and change the accepted terminology that is widely used in both visual and auditory fields. So we should stick with steady state as that’s most common and widely accepted in the field. Van Eeckhoutte, Maaike, Robert Luke, Jan Wouters, and Tom Francart. "Stability of auditory steady state responses over time." Ear and Hearing 39, no. 2 (2018): 260-268. Rance, G (2008). The auditory steady state response. Plural Publishing Picton, T. W. (2010). Human auditory evoked potentials. Plural Publishing. |
as i said, just wanted to throw an alternative into the discussion :) no intention to rant about any of the used terminology, they were all coined with good reasons.
yes, we need to assume the response steady or stationary such that we can do an fft over 30 s or more and interpret the result, but this does not necessarily mean that what the brain does is something steady (this is what i meant with the quotation marks).. it dynamically tracks a dynamic stimulus stream, and given a specific structure/design of the stimulusstream the response can be analysed with the tools we discuss steady state is most broadly used and everybody will know what it means and what to do with it. |
Is there a journal article primer on frequency tagging that you can recommend that discusses all this? But as you say, SSR is “most broadly used and everybody will know what it means and what to do with it”. We will put in the docs all the alternative names, but to allow the greatest number of users to easily find and understand the code then the most widely known terminology should be used. As a use case: I’ve been doing these analyses for many years across several labs and I wouldn’t have understood what freqtag is. |
(I'm on a road trip, so too much time to think about this 😃) So I think my problem with frequency tagging is the word "tagging" and the explicit implication of a stimulus. Whereas, I want to be able to study any neural signal that is constant in frequency, not necessarily locked to a tagging stimulus. For example, I have tinnitus that is a constant tone, I would like to examine if that is reflected in the eeg signal, here the measured signal may follow a perceived sound but there is no tagging occurring. Further, we often analyse resting state data with these analysis techniques, which makes even less sense if the word tagging is used. Hence why I vote for terminology that is about the neural signal and not about the stimulus/methodology. Another terminology that is used (less so than steady state response, but more so than frequency tagging) is frequency following response. If I was making up my own terms I might use fixed frequency signal, but then absolutely no one would find our code 😉. |
Describe the new feature or enhancement
@jundurraga and I would like to add two different statistical tests which are used to determine the presence of steady-state evoked potentials. An F-test (Dobie 1996) and a two-sample Hotelling T2 (Hofmann 2012).
Recently in #8867 an example of analysis of visual steady state responses was added. But this is a largely qualitative analysis, we wish to add quantitative statistical measures which are widely used in the analysis of auditory steady state responses (ASSRs). These responses are useful for objectively evaluating auditory thresholds, assessing suprathreshold hearing, and monitoring the state of arousal during anesthesia (Picton 2003).
Describe your proposed implementation
In ASSRs, sounds are presented which are modulated at a known rate (e.g. 40 Hz). When analysing the M/EEG signal we wish to determine if the measured signal contains a consistent component at the frequency of interest, or if the signal at the frequency of interest is random. This is typically done using an F-test which looks at the power in the FFT bin of interest (signal) relative to a sample of neighbouring FFT bins (noise). So in the example above, you compare the power in the FFT bin corresponding to 40 Hz with, for example, the 30 bins above and below this bin (this may correspond to +- 1.5Hz, depends on the length of epochs and sample rate). Whereas in the HT2 test the noise estimate is based on the variation within the single FFT bin of interest across epochs (rather than the adjacent bins) and looks at both the consistency of both the real and imaginary component of the FFT. These tests have been widely validated and in our tutorial we can demonstrate that they give appropriate false positive rates.
Does this seem appropriate for adding to MNE? We will also create a new tutorial as the new tagging example is more about comparing two different conditions, whereas ASSRs are usually measured in continuous ~5 min blocks. We can easily contribute a small example data file too.
Describe possible alternatives
Jaime already has open source python code for these tests. I cant link to them now because gitlab is down. But we can do when its back up.
API: Function names
I was thinking to put the code in
mne/stats/steadystateresponses.py
I have looked at the parametric stats section and the names
f_...
are already used. So to differentiate from these existing stats methods I was thinking something likessr_f_test
: Steady-state response f-test.ssr_ht2_test
: Steady-state response two-sample hotelling T2 test.Or would it be better to be more explicit with something like
steadystateresponse_f_test()
.API: Function returns
This function will return lots of information including signal amplitude, signal phase, noise amplitude, noise phase, test statistic, p value, etc.
In my personal code I return a data frame. As its common to analyse many different frequencies you can easily then append the output of many functions. However, pandas is an optional dependency for MNE. Are there other statistical functions in MNE that return quite a bit of information and how do they do it? A dict? Then its easy to convert to a dataframe and loop.
Additional comments
Jaime have I missed anything?
If this work seems appropriate for MNE then we can open a pull request. The code here should be relatively easy as we both have several implementations of these tests already, I think the tricky part will be deciding a nice API that fits with existing MNE infrastructure.
The text was updated successfully, but these errors were encountered: