Email discussion lists for the UK Education and Research communities

## SPM@JISCMAIL.AC.UK

#### View:

 Message: [ First | Previous | Next | Last ] By Topic: [ First | Previous | Next | Last ] By Author: [ First | Previous | Next | Last ] Font: Proportional Font

#### Options

Subject:

Re: ReML slow

From:

Stephen J. Fromm

Date:

Tue, 11 Sep 2007 13:07:18 +0100

Content-Type:

text/plain

Parts/Attachments:

 text/plain (90 lines)
 ```On Tue, 11 Sep 2007 09:36:36 +0200, Volkmar Glauche <[log in to unmask]> wrote: Thanks for your kind and thoughtful reply. >Dear Stephen, > >a short answer is - yes, trying to estimate 225 components is crazy. OK, though is it possible that reasonable choices for nonuniform variance and dependence in a 5-by-9 model will lead to 225 components? I checked the components myself, directly, and they each seem to be what one would expect. It's a repeated-measures model. >A longer answer is: >There should be no "all-zero" Q{i}'s if you specified your design using >one of the factorial design options. If there are any, then something has >gone wrong. Right. But I don't actually have any all-zero Q{i}'s. I have Q{i}s which are _mostly_ zero. They are 990x990 (there are 110 subjects and 9 images per subject) in size, and the number of nonzero elements ranges from 18 (diagonal for the smallest group) to 2*29 (off-diagonal for the largest group). The reason why there are so many zeros is that the groups don't "interact". >However, with your design decision you miss one important goal >of specifying error covariance components: to pool over as many factors >and levels as possible. What you end up with is no pooling over your group >and condition factors at all (i.e. the main diagonal of your error >covariance matrix will be formed from 9*5=45 components, each holding only >a single 1). In my case each of the diagonal-only components has many 1s as there are subjects in the group. I assume that means I'm pooling over the "subjects (within group)" factor, as it's a repeated measures model. Best, S >Volkmar > >On Mon, 10 Sep 2007, Stephen J. Fromm wrote: > >> I'm running SPM5 under matlab 7.1 on a Solaris sparc machine. >> >> Right now I'm trying to estimate a statistical model at the second (group) >> level. It's taking a long time, and the slow step appears to be the ReML >> estimation. >> >> There are five groups and nine conditions (it's part of a repeated >> measures model). There are 225 covariance components, meaning that the >> cell array Q in spm_reml is indexed on i=1:225. >> >> I made fairly modest nonsphericity choices (groups: nonuniform variance, >> but independent; conditions, nonuniform variance, not independent). >> >> Is it crazy to attempt to do ReML with this many components? >> >> One thing I noticed was that because of the block structure of Q, most of >> the elements of Q are zero. So in principle, the code in spm_reml.m >> >> % Expected curvature E{dF/dhh} (second derivatives) >> %---------------------------------------------------------------------- >> for i = 1:m >> for j = i:m >> % dF/dhh = -trace{P*Q{i}*P*Q{j}} >> %-------------------------------------------------------------- >> dFdhh(i,j) = -trace(PQ{i}*PQ{j})*N/2; >> dFdhh(j,i) = dFdhh(i,j); >> >> end >> end >> >> could be speeded up, though I'm not sure how easy that would be to do. >> > >-- >Volkmar Glauche >- >Department of Neurology volkmar.glauche@uniklinik- freiburg.de >Universitaetsklinikum Freiburg Phone 49(0)761-270-5331 >Breisacher Str. 64 Fax 49(0)761-270-5416 >79106 Freiburg http://fbi.uniklinik-freiburg.de/```