Estimate a single beta per condition instead of one beta per stimulus presentation #134
-
Hello I am using Python and want to use GLMsingle for my experiment. I aim to estimate a single beta for each condition in my experiment instead of one beta per stimulus presentation, as GLMsingle does. Since I have multiple instances of the same condition in my experiment, I believe the matrix with multiple observations per column is better conditioned than the matrix with only one observation per column. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
I understand your point. The architecture of GLMsingle is not easily adaptable to "forcing" it to estimate one beta per condition. The easiest thing to do is to just post-hoc average the trials corresponding to your condition of interest. |
Beta Was this translation helpful? Give feedback.
-
I was wondering how I can modify GLMsingle to estimate a single beta for each condition instead of one beta per stimulus presentation. In 'glmsingle.py', I found a variable called 'designSINGLE', which I believe is the single-trial version of the design matrix. Would it be possible to achieve the desired output by simply setting 'designSINGLE = design' in 'glmsingle.py'? |
Beta Was this translation helpful? Give feedback.
-
No, it is not as simple as that... The algorithm is more involved/complicated. In order to perform cross-validation, the architecture is currently designed to cross-validate beta estimates across runs (and these beta estimates are fundamentally single-trial-oriented). |
Beta Was this translation helpful? Give feedback.
-
Also, to add to what Kendrick mentioned, there are several benefits in GLMsingle that may outweigh our previous GLMdenoise. For example, beta weights are optimised with a family of HRFs. Have you tried running GLMsingle, and averaging across repetitions? |
Beta Was this translation helpful? Give feedback.
-
Thank you for your answers. I am trying to average across repetitions. I haven't compared the results with GLMdenoise or first-level analysis in Nilearn yet, but I noticed a discussion by Aakash where he compared results from GLMsingle with GLMdenoise and SPM. |
Beta Was this translation helpful? Give feedback.
I understand your point. The architecture of GLMsingle is not easily adaptable to "forcing" it to estimate one beta per condition. The easiest thing to do is to just post-hoc average the trials corresponding to your condition of interest.