Dear Elias,
On 24/04/15 17:47, Mouchlianitis, Elias wrote:
> 2)This is what I tried to use initially but I might be missing something
> obvious. I cannot seem how to define different values for the same
> condition across sessions.
>
> for example my design is has a single experimental condition across
> sessions, i.e. :
>
> Ses1Cond1 Ses2Cond1 Ses3Cond1 Ses4Cond1
>
> To do a main effect of drug I would need the contrast:
>
> 1 1 -1 -1
>
> As I can see it now I cannot find a way to define different weight for
> Cond1 across sessions. Any suggestions?
I can't either so, if you don't like option 1, let's focus on option 3:
> 3) The look of the design matrix here actually more what I had in mind!
>
> One clarification please: in the line *SPM.xX.K(s).X0 = [SPM.xX.K(s).X0
> detrend(mvt_sess_s)]*;
>
> I assume the input of detrend should be the motion and outlier
> regressors iterated for each session, read from the rp_.txt and confound
> matrix files?
yes, it should be a matrix where the number of rows is the number of
scans in a given session and each column being one of your covariates of
no interest. Double-check on one subject you get the same results with
the two approaches (you might see small differences due to the way SPM
performs non-sphericity correction; temporarily setting 'Serial
Correlation' to 'None' instead of 'AR(1)' just for the validation of the
approach should reduce these differences).
Best regards,
Guillaume.
>> Dear Elias,
>>
>> I can think of three ways to generate the contrast weights in your
>> situation:
>>
>> 1/ write a script that will take care of the different number of
>> regressors per session
>>
>> 2/ use an option of the batch interface, thanks to Volkmar:
>> SPM > Stats > Contrast Manager
>> Contrast Sessions > T-contrasts (con/sess based)
>>
>> 3/ regress out covariates without including them explicitly in the
>> design matrix, as you hinted. To do so, specify your GLM in the usual
>> way without the movement regressors, then:
>> load SPM.mat
>> for s=1:numel(SPM.xX.K)
>> SPM.xX.K(s).X0 = [SPM.xX.K(s).X0 detrend(mvt_sess_s)];
>> end
>> save SPM.mat SPM
>> and specify your contrasts without having to worry about the number of
>> covariates you included per session (and double check I don't overlook
>> anything).
>>
>> Best regards,
>> Guillaume.
>>
>>
>> On 23/04/15 12:55, Elias Mouchlianitis wrote:
>>> Dear SPM experts,
>>>
>>> I have a phMRI with 6 sessions for each subject, within a 3x2 design
>>> (3 drugs x 2 task levels), with each session representing a factorial
>>> level. As you might understand the 1st-level design matrix becomes
>>> quite complicated when including regressors for the motion parameters
>>> and columns from a confound matrix that regresses out outlying
>>> volumes as computed with DVARS. The issue is that since each subject
>>> has different number of outlier volumes, there is no consistency
>>> across subjects when defining contrasts and zero padding for the
>>> outlier columns differs both across sessions and subjects This is
>>> doable with a bit of matlab but i was hoping there is a simpler way
>>> (or maybe I am missing something obvious...)
>>>
>>> I was wondering whether there is a way to implicitly model movement
>>> regressors, outlier scans (or other regressors) without actually
>>> including them in the design matrix, similar with how FSL for example
>>> outputs the design matrix only for EVs.
>>>
>>> It would be great if anyone can point to a way to do this either
>>> within SPM or with a utility/toolbox.
>>>
>>> If not, maybe it is something that SPM developers should think
>>> including in future releases? with phMRI and other similar
>>> experimental and methodological advances, designs can become quite
>>> intricate, at least in my mind it would be most beneficial if one was
>>> given the option to model regressors explicitly or implicitly in the
>>> design matrix.
>>>
>>> Many thanks,
>>>
>>> Elias
>>>
>>>
>>>
>>> .
>>>
>>
>> --
>> Guillaume Flandin, PhD
>> Wellcome Trust Centre for Neuroimaging
>> University College London
>> 12 Queen Square
>> London WC1N 3BG
>
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|