How to write the design matrix when stimulus onsets are not aligned with TRs? #61
-
|
Hi I'm new in using GLMsingle. In the example, every single trial is aligned with TR so the design matrix is filled with 1 and 0. In my data, the TR is 2s, and my stimulus onsets are not aligned with the data acquisition time points. I wonder if I can still use GLMsingle in this case and if so how I should write the design matrix. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
|
Yes, you can use it, if you can prepare alternative versions of your data and/or design matrix. See below (this will be inserted on https://glmsingle.readthedocs.io/ soon). We hope to have some code examples of how one might do that (e.g. interpolating your fMRI time series data) soon. Stay tuned. |
Beta Was this translation helpful? Give feedback.
-
|
Hi! I'd like to follow up on this discussion-- Additionally, my stimuli durations are based on RT and are thus different for each trial, even within conditions. I'm not sure how to deal with this since it seems like glmsingle needs stimuli of the same condition to have the same duration? Thank you for any advice! |
Beta Was this translation helpful? Give feedback.
-
|
Yes - in general, you have to work in "nearest TR" times, since the input format of the design matrix is just a matrix of onsets. Regarding your specific case, it sounds like there may be relatively small differences in durations (contingent on RT)? If so, it may be likely fine to just assume a fixed duration (if the RT variations are small, like up +/- 500 ms). Ultimately, the idea is that BOLD response differences can be ultimately traced to the amplitude (and not the shape). For small-ish time differences, this is essentially true. For very large differences (e.g. 8-s vs 4-s neural activity durations), this will start to be false, in which case one has to re-design one's approach to the GLM strategy. These issues are discussed a bit on the GLMsingle FAQ. |
Beta Was this translation helpful? Give feedback.

Yes, you can use it, if you can prepare alternative versions of your data and/or design matrix. See below (this will be inserted on https://glmsingle.readthedocs.io/ soon).
We hope to have some code examples of how one might do that (e.g. interpolating your fMRI time series data) soon. Stay tuned.