Single-trial dynamics, bstep error and differences between models B/C/D #160
Replies: 7 comments 1 reply
-
|
Hello - sorry for the delay. A few thoughts:
Kendrick |
Beta Was this translation helpful? Give feedback.
-
|
Hello
Thank you for your reply.
I am very sorry for the delay of response; in the end we solved the problem and the toolbox works well for us
I have one question however: are the single trial beta values z-scored at some point ? (If using all models together) it indeed seems like they are when looking at the final data, but I haven’t found an obvious part of script where it happens
Thank you
Best regards,
Julie
… Le 14 nov. 2024 à 02:43, Kendrick Kay ***@***.***> a écrit :
Hello - sorry for the delay.
A few thoughts:
To understand better, it would be helpful to see the design matrix you are giving to GLMsingle, as well as any options/flags that you are using.
Regarding the bstep issue, I am not sure which line of code you are referring to (line 1423 does not correspond to my version). Can you show the error message and/or provide some way to reproduce the error?
Voxels clearly outside the brain can be ignored, for sure. But, I still want to know why the code is failing (it should not fail, in theory). Can you see what the data are like for those voxels? Are they all 0 in the time series?
Regarding the results changing across the versions, it is good that you are carefully inspecting the results. However, based on what I see, the amount of change isn't that much (like it's not crazy). Furthermore, the whole point of GLMsingle is to produce better quality beta estimates...
You mention nuisance regressors --- can I ask how exactly you are using them / including them in your data processing pipeline?
If you could provide the full workspace (data and design matrix, the call the GLMsingle) that can help diagnose what is going on.
Kendrick
—
Reply to this email directly, view it on GitHub <#160 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AX2ZYYUJRV7EMBJ7B4DM5WT2AP54PAVCNFSM6AAAAABRTQJNB2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCMRUHAYTSMQ>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
|
Great. GLMsingle does not itself perform z-scoring of the final single trial beta weights. The final weights are provided in units of percent BOLD signal change. However, we suggest that users may want to perform z-scoring of the single trial beta weights for each voxel across each scan session. The primary motivation would be to reduce nonstationarities across different scan sessions. This is discussed to some degree in the NSD paper. So, if you are combining data across multiple scan sessions, this may be something to consider. When you say "seems like they are when looking at the final data", what in particular are you referring to? |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for your answer
I have been studying single-trial betas distribution for different conditions (different levels of stim intensity from snr1 to 5) and comparing the GLMsingle model (B+C+D) with a simple single-trial design matrix run in SPM so a classic OLS
And the beta values differ, cf. figures to illustrate it in a given ROI: 1st one is with GLMsingle (plots purple), 2nd one with spm (plots dark blue and thicker) for both ROI shown here
Also, how would you interpret the negative value for the second ROI ?



… Le 14 mars 2025 à 15:03, Kendrick Kay ***@***.***> a écrit :
Great. GLMsingle does not itself perform z-scoring of the final single trial beta weights. The final weights are provided in units of percent BOLD signal change. However, we suggest that users may want to perform z-scoring of the single trial beta weights for each voxel across each scan session. The primary motivation would be to reduce nonstationarities across different scan sessions. This is discussed to some degree in the NSD paper. So, if you are combining data across multiple scan sessions, this may be something to consider.
When you say "seems like they are when looking at the final data", what in particular are you referring to?
—
Reply to this email directly, view it on GitHub <#160 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AX2ZYYWT3SEAGBBHG3NCYCD2ULORZAVCNFSM6AAAAABRTQJNB2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTENJQGE2DSNI>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
|
The images didn't come through; can you edit/modify? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Okay I’ll look into it
Thanks a lot for your help Kendrick!
… Le 14 mars 2025 à 16:27, Kendrick Kay ***@***.***> a écrit :
A few comments:
Regarding the thick blue line results (SPM), I am not sure about the units of the betas that you are getting. In the first ROI, the values of around 6-10 are quite high --- are you trying to interpret those numbers as the amplitude of the BOLD response in units of percent signal change? That is what GLMsingle returns, but if it's not exactly what you are getting with SPM, then they won't be directly comparable.
Regarding the negative betas in the second ROI, it could be real. It is known that brain regions can show a decrease in the BOLD response when an experimental manipulation occurs. I guess it depends on what exactly your experiment is. Also, note that increases/decreases also depend on accurately estimating the baseline signal level, and therefore also depends on what is taken to be the baseline in your experiment. If there are difficulties or inaccuracies in estimating your baseline signal, that will influence the magnitudes/signs of your betas.
—
Reply to this email directly, view it on GitHub <#160 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AX2ZYYWNW5HGR5DBRQJT7B32ULYPNAVCNFSM6AAAAABRTQJNB2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTENJQGI2DSNQ>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.




Uh oh!
There was an error while loading. Please reload this page.
-
I am working on fMRI data on the topic of auditory perception around perception threshold in healthy volunteers. My experiment’s setting is an event-related one where participants are presented with an auditory stimulus which varies in intensity across trials (5 different levels, named « SNR1 » to « SNR5 », the « SNR1 » being actually no sound at all, and SNR3-SNR4 being intermediate intensities around the perceptual threshold for which the stimulus is sometimes perceived sometimes not).
I would like to investigate the single-trial dynamics of brain activation elicited by these stimuli. To do so I have used the GLMsingle toolbox on my design matrix (using Matlab and SPM12-based design matrices) and, for now at individual level only, I have plotted the single trial beta estimates as a function of stimulus intensity (ie, SNR-level) in pre defined regions of interest (I join an example -figure 1- of such figures where we plot: (1) scatter plot of the single-trial beta values for each SNR ; (2) probability density / distribution of single trial beta values for each SNR ; (3) mean of single-trial beta values for each SNR ; and (4) inter-trial variability measured by standard deviation of single trial beta values for each SNR).
I have a few questions regarding the results I got :
1/ during the C and D models (GLMdenoise and fracridge regression) I get an error during alpha grid specification in the fracridge function, telling me to decrease bstep because « mxgap<0.2 » but actually decreasing step didn’t solve it and I found out the problem of mxgap being too big is only the case for a few ii values that correspond to voxels outside of the brain ; furthermore, for some of these voxels (but not all), continuing into the GLMsetimatesingletrial.m function (after fracridge function ; line 1423, during olsmatrix function) I get a warning: "Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN. »
What do you think of these errors? Are they just outlier values outside of the brain that we should not take into account? How do you explain this doesn’t happen for all the « outside brain » voxels ?
2/ depending on the model used (B, B+C, or B+C+D) the results change pretty strongly, as you can see in figures 2 and 3 compared to figure 1 (all are for the same subject and region of interest, only the model changes) ; how would you explain it and how to choose the best model(s) for our data?
NB: we already have many nuisance regressors based on physiological recordings during scanning so maybe it is redundant with GLMdenoise?
If you could help me understand these points it would be very helpful,
Thank you for your time
Beta Was this translation helpful? Give feedback.
All reactions