Dear Ying,
On 08/01/2019 07:10, Liuying L. wrote:
>
> Hi Guillaume,
> Thanks a lot!
>
> But I have two new questions about your answer:
This could quickly get out of control ;-)
https://en.wikipedia.org/wiki/Wheat_and_chessboard_problem
> 1. What do you mean by /subjects effects/?
> Are the /subjects/ you mentioned here /participants of an experiment/?
> The concatenated GLM analysis I said in the last Email is the 1st level
> analysis which was done separately for each participant. The four head
> motion files concatenated all comes from a single participant. So there
> are no multi-participants here and I think there are no /subjects effects/.
You are right, I answered too quickly and I meant session instead of
subject. Sorry. What I was suggesting was to allow for
movement-by-session interactions.
> 2. There is an undefined variable "/i/" (Or the unit of the complex
> number? ) in your code.
> I think what you wanted to express is:
>
> cont = cell(1,4);
> for session=1:4
> cont{session} = load(['Session' num2str(session) '/rp-0001.txt']);
> end
> motion = blkdiag(cont{:});
> save('rp-allmotion.txt','motion','-ascii');
>
> Is that right?
Yes, my mistake once again.
Best wishes,
Guillaume.
> Best wishes,
> Ying
>
> *Sent:* Tuesday, January 08, 2019 at 12:05 AM
> *From:* "Flandin, Guillaume" <[log in to unmask]>
> *To:* "Liuying L." <[log in to unmask]>, "[log in to unmask]"
> <[log in to unmask]>
> *Subject:* Re: [SPM] How to combine the realignment parameters when
> concatenating sessions in GLM?
> Dear Ying,
>
> It would probably be better to allow for subjects effects, e.g.:
>
> cont = cell(1,4);
> for session=1:4
> cont{i} = load(['Session' num2str(session) '/rp-0001.txt']);
> end
> motion = blkdiag(cont{:});
> save('rp-allmotion.txt','motion','-ascii');
>
> Best regards,
> Guillaume.
>
>
> On 02/01/2019 00:42, Liuying L. wrote:
>> Hi SPM experts,
>> I need to concatenate 4 sessions in GLM stage using
>> /spm_fmri_concatenate.m/. But a problem comes out when adding head
>> motion regressors in the concatenated GLM.
>> Four /rp*.text/ files were outputted in the realigning stage. I have to
>> combine these four files into a single file as head motion regressors. I
>> think I can combine them through the simplest way:
>> /motion=[];
>> for session=1:4
>> cont=load(['Session' num2str(session) '/rp-0001.txt']);
>> motion=[motion;cont];
>> end/
>> / h=fopen('rp-allmotion.txt','a')/
>> /for tr=1:size(motion,2)/
>> /fprintf(h,'%f',motion(tr,:));/
>> /fprintf(h,'\n');/
>> /end/
>> /fclose(h);/
>> Then the rp-allmotion.txt file is added to the concatenated GLM through
>> multi-regressors option.
>> Do you think I am right?
>> Best regards,
>> Ying
>
> --
> Guillaume Flandin, PhD
> Wellcome Centre for Human Neuroimaging
> UCL Queen Square Institute of Neurology
> London WC1N 3BG
--
Guillaume Flandin, PhD
Wellcome Centre for Human Neuroimaging
UCL Queen Square Institute of Neurology
London WC1N 3BG
|