Hello AFNI experts,
I would like to construct task-stimulus related regressors in the GLM design matrix and input them via -regress_stim_files
. Specifically, I aim to convolve an HRF with the task events to allow flexibility in HRF selection and in the way of normalizing the regressor (mimicing dmUBLOCK). I have read the documentation and could you please help me to understand better the following questions:
The manual says the following, does this mean that one has to include -regress_use_stim_files
whenever -regress_stim_files
is given? What if I only give -regress_stim_files
and no -regress_stim_times
, do I still need to include -regress_use_stim_files
?
Without the -regress_use_stim_files option, 3dDeconvolve will be run using '-stim_times', not '-stim_file'. The user can still specify the 3dDeconvolve -stim_file files here, but they would then be converted to -stim_times files using the script, make_stim_times.py .
I have multiple runs and multiple events. Do you think the following steps are correct to prepare the stim_file, or do you have better suggestions?
- For each event per run, prepare the regressor (convolve HRF with event), ensuring it is synced to each data point in each run. Make sure the data points in each run is same as the regressor, especially if triming the n first TRs are applied.
- Concatenate the regressors of all runs following the run order to form a single long column for each event and save it as
event*.1D
. - Repeat the process for other events.
- Provide the list of
event*.1D
files to-regress_stim_files
and set the corresponding event name list using-regress_stim_labels
I assume I do not need -regress_stim_types
in this case, right?
Can I still do per run nuisance regressors such as motion, PCs of WM and CSF, etc?
The above process estimates the fixed effect of each event type across runs. Is there a way to implement a mixed-effects model that accounts for both within-run and between-run variability? If so, how can I inform AFNI which data corresponds to which run within the long regressor column? It seems that afni_proc.py does not support mixed-effects modeling. Would the correct approach be to first conduct a run-wise GLM and then use 3dLME for the second-level analysis?
Thank you very much.