Questions about event onsets not aligned to TR & design matrix construction #201
-
|
Dear Kendrick, Experimental design:
A practical issue I am facing is that many stimulus onsets are not aligned to the beginning of a TR, as you can see in the events.tsv file I uploaded. So far, I have tried two approaches:
Under these two settings, if my codes are right, the overall results are very similar. For example:
My questions: How should stimulus onsets that are not aligned to TR boundaries be handled in this kind of design? Is temporal resampling (e.g., from 1 s to 0.5 s) a reasonable or recommended solution here? If possible, could someone help check whether my code logic is reasonable, or point out any obvious conceptual mistakes? I have attached:
Any advice, references, or corrections would be extremely helpful. Thank you very much for your time and for maintaining this project. Best regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
"the overall results are very similar" ==> This is not surprising, and it's a good outcome. In general, upsampling the time-series should only improve things (although the improvement may be modest). The rationale is as follows: If your specification of the design matrix is inaccurate, this is expected to lead to sub-optimal outcomes. If, by upsampling, you can specify a design matrix that is more accurate, this should lead to improvements. "I do have a 2s TR and want to convert the onsets in seconds into the design (matlab code). Which rounding do you recommend to apply? e.g., floor(onsets/tr) +1 ? Or just round(onsets/tr)?" Assuming that onsets are decimal times in seconds where 0 s corresponds to the first row of the design matrix (and the first fMRI volume), then round(onsets/tr)+1 is the correct thing to do. Consider a simple example. If an onset is at 1.9 s and the TR is 0.5 s, the closest volume to the onset is the fifth fMRI volume. round(1.9/.5)+1 = 5. floor(1.9/.5)+1 = 4 and that is incorrect. "The stimulus duration is 0.5s, so should I resample the files?" ==> The issue isn't really about the duration of your stimulus, but it's more about the onsets of the events and whether they land on the onsets of the fMRI volumes. |
Beta Was this translation helpful? Give feedback.
"the overall results are very similar" ==> This is not surprising, and it's a good outcome.
In general, upsampling the time-series should only improve things (although the improvement may be modest). The rationale is as follows: If your specification of the design matrix is inaccurate, this is expected to lead to sub-optimal outcomes. If, by upsampling, you can specify a design matrix that is more accurate, this should lead to improvements.
"I do have a 2s TR and want to convert the onsets in seconds into the design (matlab code). Which rounding do you recommend to apply? e.g., floor(onsets/tr) +1 ? Or just round(onsets/tr)?"
Assuming that onsets are decimal times in seconds where 0 s cor…