Dear Matt,
Alexa has probably found the culprit: When you specify your job with a
script, make sure that all vectors are in the order SPM expects them to
be. The easiest way to do so is to set up a model with the GUI once and
then inspect the resulting job .mat- or .m-file.
Volkmar
On Thu, 7 Jun 2007, Alexa Morcom wrote:
> Dear Matt
>
> Your SPM.xY.P doesn't look as it should to me, it's usually a vertical list
> of scan specifications (size nscan,1), but you have a cell array of 8 x 10.
>
> In each cell of the job file there is a similar anomaly (to my eye):
>
> jobs{1}.stats{1}.factorial_design.des.fd.icell(1).scans has size 1,10 and I
> think it should have 10,1
>
> I think transposed arrays like this in the job file could cause the problem
> - concatenating 1 x 10 8 times vertically would give 8 x 10 instead of your
> nscan,1 list
>
> Hope this helps
>
> Alexa
>
>
>
> Quoting Matt Johnson <[log in to unmask]>:
>
>> Dear SPMers:
>>
>> Long time listener, first time caller. I am having some issues with a
>> repeated-measures ANOVA design in SPM5 and was hoping someone could point
>> out where things are going awry.
>>
>> Basically, I have a 2x4 design (so, all subjects perform the same 8
>> conditions). In my design files the factors are called "RefRep" and
> "Delay"
>> but for the rest of this email let's just call them factor A (2 levels)
> and
>> factor B (4 levels). Right now I have 10 subjects and would like to assess
>> the A-by-B interaction in a repeated-measures analysis.
>>
>> I am using SPM5's "Full Factorial" design option, specifying both factors
> to
>> be dependent with unequal variance in both cases. No other special stuff
>> going on. Each of the 8 conditions has an associated contrast file from
>> first-level analyses that is numbered the same for each subject (e.g.,
>> condition A1B1 = con 2, condition A1B2 = con 3, ..., condition A2B4 = con
>> 9). So in the job file, the cells are specified such that cell [1 1] has
>> each sub's con_0002 file, cell [1 2] has each sub's con_0003 file, ...,
> cell
>> [2 4] has each sub's con_0009 file. Thus in the job file structure there
> are
>> 8 cells with 10 identically numbered contrast files in each cell, one for
>> each subject, which as far as I can tell is how it should be.
>>
>> When I run the job file, the design matrix looks mostly as it should
> except
>> for one small (read: big) problem. The matrix itself appears to be
> basically
>> OK -- 8 columns for the cells/conditions, 80 rows for the files, with the
>> cells labeled correctly at the top. However, the filenames along the right
>> appear to be in the wrong order. I believe they should go:
>>
>> sub01_con2
>> sub02_con2
>> sub03_con2
>> ...
>> sub10_con2
>> sub01_con3
>> sub02_con3
>> ...etc
>>
>> However, it looks like they actually go:
>>
>> sub01_con2
>> sub01_con3
>> sub01_con4
>> ...
>> sub01_con9
>> sub02_con2
>> sub02_con3
>> ...etc
>>
>> So it looks to me like somewhere in the bowels of SPM, there is a matrix
> of
>> filenames that looks like:
>>
>> sub01_con2 sub01_con3 sub01_con4 ...
>> sub02_con2 sub02_con3 sub02_con4 ...
>> ...
>> sub10_con2 sub10_con3 sub10_con4 ...
>>
>> and when it is converted to a vector, it is getting read across-then-down
>> instead of down-then-across. Or vice versa. I have extracted single voxel
>> data and run the stats in SPSS, and it jibes with this idea (i.e., I get
>> similar p values to SPM's output when I reshape the matrix incorrectly by
> hand).
>>
>> Where am I going wrong? If I were sure this is the only place, I could
> just
>> figure out the correct transformation to put in the filenames initially
> that
>> makes them come out right in the end, but I figure something else must be
> afoot.
>>
>> My job and SPM files are located here:
>>
>> http://pantheon.yale.edu/~mrj9/spm/stats_refvd_anova_job.mat
>> http://pantheon.yale.edu/~mrj9/spm/SPM.mat
>>
>> N.b.: the job file was created with a script, but as far as I can tell the
>> job files generated by the script are substantively the same as when I try
>> to do the same thing by hand, and SPM throws no errors at any point.
>>
>> Thanks so much for any help... I think this is a great feature of SPM5
> (much
>> as I loved poring over Rik and Will's tech note to do this in SPM2), if
> only
>> I could get it to work.
>>
>> Cheers,
>> Matt Johnson
>>
>> PS: Just as I reached the end of this email, I had the bright idea to
> check
>> a simpler one-way repeated-measures design I have run (using just the four
>> conditions within level 1 of factor A), and it appears to be experiencing
>> the same problem. Forgive my not rewriting the whole thing for the
> simpler case.
>>
>> PPS: Just updated to the latest-and-greatest SPM5 to make sure I hadn't
>> missed a key update... problem still there.
>>
>>
>
--
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 http://fbi.uniklinik-freiburg.de/
|