Hello, I am new to fMRI data analysis and following standard tutorials for data processing. But since the
I have two fmriprep preprocessed fMRI in two separate files: fmri1 and fmri2. fmri1 is for condition 1, fmri2 is for condition 2. Using nilearn, I can compute z-map contrasts where condition 1 is active and condition 2 is active, i.e. “condition 1 is 1, and others are 0”, and “condition 2 is 1, and others are 0”
If I want to compute contrasts where “condition 1 is 1, condition 2 is -1, and others are 0”, does it make sense to subtract the z-map where condition 2 is active from the z-map where condition 1 is active?
You typically do not want this, where you two condition of interests come from different runs, since there may be differences in scanner signal between acquisitions due to low-frequency drift and scanner heat. Usually, all conditions you want to compare against each other are in a run (in some block-related or event-related design).
Due to the limitations stated before, if you do want to make a comparison like this, you would want to do everything in a single model while controlling for scanner differences (and not due this subtraction post-hoc as you propose). So, one option is to concatenate your timeseries and design matrices, and include a column in the design matrices for acqusition_1 and acquisition_2, that contain 1s in rows that belong to their respective acquisitions, and 0 otherwise.
You have cosine and drift terms. Both should act as a high pass filter - so you do not need both. Since you are using a_comp_cor terms, you should use cosine terms.
It looks like your task runs the entire session, which is not good for running GLMs. You usually want some kind of block of event-related design.
You have two constant terms (it should just be one column with all 1s)