Dear Volkmar,
Thank you for your reply and scripts.
Using your scripts, I tried to create the design matrix that I had encountered troubles.
As far as the typical type of Multi-subject condition and covariates design,
the problems with both re-ordering of covariates and mis-specification of error covariance were solved.
Now, I can use Flexible Factorial design truly flexibly.
I would like to learn your modification in these scripts.
Could you please distribute your scripts over SPM maillist or add them to spm's updates if you wouldn't mind
because some SPMers encounter the same problem
and probably desire to correct the function spm_config_factorial_design.m and spm_eeg_get_vc.m.
Anyway, thank you again for your kind and pertinent advice.
Takanori.
>Dear Takanori,
>
>the attached files should at least solve the problem with re-ordering of
>covariates. If you still have problems with error covariance
>specifications using these files instead of the original SPM5 ones, please
>send me an batch file example and I will have a look into this.
>
>Volkmar
>
>On Fri, 23 Jun 2006, Takanori Kochiyama wrote:
>
>> Dear Volkmar,
>>
>> Thank you for your reply.
>> I attach spm job file to this e-mail.
>>
>> I'll have a short seminar on SPM analysis in this summer, and now
>> I am making materials for lecture and examining SPM operation over various designs.
>>
>> I would like to briefly explain what I am doing.
>> The design I have encountered trouble simulates "Multi-subject condition & covariates" of SPM2.
>> There are two task conditions and one covariate of time effect.
>>
>> First, I tried to setup a flexible factorial design with 2 factors,
>> the first factor is 'subject', the second one is 'Task'.
>> And then I specified two main effects, 'Task' and 'subject'.
>> Covariate which arranged in 'scan' order was also modeled.
>> After running the design configuration,
>> SPM5 automatically reordered scans in condition order,
>> however the order of the values of the covariate remained original,
>> which resulted in the wrong design matrix..
>>
>> Second, I tried to setup a flexible factorial design with 3 factors as mentioned in my previous E-mail.
>> I got the design matrix as I wished, however, the covariance component of this design was wrong.
>>
>> Of course, I think there's a simple solution, e.g.
>> reorder covariates in condition order or assign zeros(20,20) to SPM.xVi.Vi{1} on matlab console.
>> However, I want simple way so that participants in the seminar could easily learn the procedures.
>>
>> For now, I'm not sure whether this problem is due to bug in SPM or my failure.
>>
>> Would you please give me some advice?
>>
>> Many thanks in advance for you help,
>> Takanori.
>>
>> >Dear Takanori Kochiyama,
>> >
>> >this is probably a bug - can you send me your batch file, I would then
>> >have a look into it.
>> >
>> >Yours,
>> >
>> >Volkmar
>> >
>> >On Fri, 23 Jun 2006, Takanori Kochiyama wrote:
>> >
>> >> Dear SPMers,
>> >>
>> >> I try to setup a flexible factorial design with a single factor
>> >> and one covariate for e.g. two subject.
>> >>
>> >> Since the values of the covariate arrange in 'scan' order,
>> >> I implicitly model the factor of replication
>> >> (Without replication, spm automatically rearrange the images in condition order.)
>> >>
>> >> There are three factors, the first factor is 'subject', the second
>> >> one is 'repl', and the third one is 'Task'.
>> >> All measurements are assumed to be independent between levels which have equal variance.
>> >> The first main effect is 'Task' and the second one is 'subject'.
>> >>
>> >> I also model a covariate whose values arrange in scan order.
>> >> There are assumed to be the interaction between the covariate and the subject.
>> >>
>> >> When the spm_config_factorial_design was run,
>> >> I got the design matrix as I wished.
>> >> However, the covariance component of this design was wrong as shown below,
>> >> and hence, my design couldn't be estimated.
>> >> The problem is that the length of Vi matrix is doubled.
>> >> I guess that there's something wrong with spm_eeg_get_vc.m, where
>> >> the extra iteration occurs in VC setup when the factor of 'repl' is in the design matrix.
>> >>
>> >> Is this bug, or is there somthing wrong with my procedures?
>> >>
>> >> SPM.xX.X =
>> >> Task, Subject, Cov#1, Cov#2
>> >> 10 10 4.5 0
>> >> 01 10 3.5 0
>> >> 10 10 2.5 0
>> >> 01 10 1.5 0
>> >> 10 10 0.5 0
>> >> 01 10-0.5 0
>> >> 10 10-1.5 0
>> >> 01 10-2.5 0
>> >> 10 10-3.5 0
>> >> 01 10-4.5 0
>> >> 10 01 0 4.5
>> >> 01 01 0 3.5
>> >> 10 01 0 2.5
>> >> 01 01 0 1.5
>> >> 10 01 0 0.5
>> >> 01 01 0-0.5
>> >> 10 01 0-1.5
>> >> 01 01 0-2.5
>> >> 10 01 0-3.5
>> >> 01 01 0-4.5
>> >>
>> >> SPM.xVi =
>> >> Qidentical: {[1] [1] [1]}
>> >> Qindependent: {[1] [1] [1]}
>> >> Vi: {[40x40 double]}<-Error!
>> >> I: [20x4 double]
>> >>
>> >> Many thanks in advance for you help,
>> >> Takanori Kochiyama.
>> >>
>> >> -------------------------------------------------------------
>> >> Takanori Kochiyama, Ph.D., Research Associates
>> >> Faculty of Engineering, Kagawa University
>> >> Hayashi-cho 2217-20,Takamatsu 761-0396, JAPAN
>> >> Phone: +81-87-864-2337,Fax: +81-87-864-2369
>> >> e-mail: [log in to unmask]
>> >> -------------------------------------------------------------
>> >>
>> >>
>> >
>> >--
>> >Volkmar Glauche
>> >-
>> >Department of Neurology [log in to unmask]
>> >Universitaetsklinikum Freiburg Phone 49(0)761-270-5331
>> >Breisacher Str. 64 Fax 49(0)761-270-5416
>> >79106 Freiburg
>> >
-------------------------------------------------------------
Takanori Kochiyama, Ph.D., Research Associates
Faculty of Engineering, Kagawa University
Hayashi-cho 2217-20,Takamatsu 761-0396, JAPAN
Phone: +81-87-864-2337,Fax: +81-87-864-2369
e-mail: [log in to unmask]
-------------------------------------------------------------
|