Dear Carolina,
in addition to what Will wrote I want to add that if you choose
'replications over subjects' in SPM2 you will get misspecified variance
components that erroneously model covariances between particular
subjects from both groups. Check SPM.xVi.Vi for that: press Review
Design and from the Design Menu choose 'Explore/Covariance Structure'.
then use the arrow buttons to cycle through the variance components.
These matrices have the dimensions nScan x nScan and are the
prespecified covariances that you want SPM to correct for. If you see
entries that specify a covariance between e.g. sub1 from group1 and sub1
from group, then your design will probably be inestimable (especially if
there are different subjects per group as in your case). In addition
these variance components don't make any sense because usually one
assumes that the group are independent and that the order in which one
enters the subjects doesn't matter. However, you should leave those
variance components that model separate variances for each group untouched.
To resolve this problem you can you the attached little script that I
wrote PRIOR TO ESTIMATION. It will prompt you for the SPM.mat and will
remove the unwanted variance components. It should work fine in the
case of two groups (haven't tested it for more that that). I believe it
is also included in the Volumes Toolbox
(http://www.fil.ion.ucl.ac.uk/spm/ext/#Volumes), but I am not sure.
Note that the attached script has been developed under SPM2 (don't know
if it works under SPM5). After running the script you should check the
variance components again (see above). Then proceed to estimation and
your design should be estimable. Let me know if this does not work.
Good luck,
Jan
Will Penny wrote:
> Dear Carolina,
>
> Carolina C. wrote:
>
>> Dear SPMers
>>
>> We are trying to look for differences between two groups (patients
>> and controls) (PET study) with 3 conditions A (baseline), B and C (2
>> different olfactory stimuli) (2 scans per condition)
>>
>> Chosen design type - multi-group: conditions and covariates,
>>
>> Input 10 patients for group 1,
>>
>> 21 controls (10 females and 11 males) for group 2,
>>
>> 3 conditions (1 for A, 2 for B and 3 for C)
>>
>> Covariates 0
>>
>> Global normalization-proportional scaling to 50
>>
>> Threshold masking =relative (relative to global 0.8)
>>
>> Global calculation – mean voxel per value (within per image full
>> mean/8mask)
>>
>> Non-sphericity correction - yes
>>
>> Replications are over – 3 conditions
>>
>
> I think if you change this to 'subjects' you should be OK.
>
> Each subject is a replication in the sense that each
> produces a trivariate response (ie 3 responses).
>
> There will possibly be some correlation in responses
> that can be modelled by a 3 by 3 covariance matrix.
>
> Each subject provides a `sample' or `replication' that allows SPM
> to estimate this covariance.
>
> Best,
>
> Will.
>
>> Correlated repeated measures – Yes
>>
>>
>>
>> And immediately after I get this message in the command window
>>
>>
>>
>> Initialising parameters :
>> ...computing??? Index exceeds matrix dimensions.
>>
>> Error in ==> /usr/local/matlab65/toolbox/matlab/sparfun/spdiags.m
>> On line 102 ==> a = [a; i i+d(k) B(i+(m>=n)*d(k),k)];
>>
>> Error in ==> /usr/local/spm2_updates/spm_spm.m
>> On line 420 ==> s =
>> spdiags(1./sqrt(diag(s)),0,nScan,nScan);
>>
>> Error in ==> /usr/local/spm2_updates/spm_spm.m
>> On line 827 ==> SPM = spm_spm(SPM);
>>
>> Error in ==> /usr/local/spm2_updates/spm_getSPM.m
>> On line 197 ==> [SPM] = spm_spm(SPM);
>>
>> Error in ==> /usr/local/spm2/spm_results_ui.m
>> On line 260 ==> [SPM,xSPM] = spm_getSPM;
>>
>> ??? Error while evaluating uicontrol Callback.
>>
>>> >
>>
>>
>>
>> Must add, without non-sphericity correction model is accepted. I've
>> tried with simplified model and got the same message.
>>
>>
>> I would greatly appreciate some advice
>>
>> Kind regards
>>
>> Carolina
>>
>>
>>
>
--
Dr. rer. nat. Jan Gläscher Caltech Brain Imaging Center
+1 (626) 395-4976 (office) Caltech, Broad Center, M/C 114-96
+1 (626) 395-2000 (fax) 1200 California Blvd
[log in to unmask] Pasadena, CA 91125
function RemoveGroupCov
SPMmat = spm_get(1,'SPM.mat','Select SPM.mat');
load(SPMmat)
ncond = length(unique(SPM.xX.I(:,2))); % no. of conditions
for v = length(SPM.xVi.Vi):-1:1 % go backwards because length(SPM.xVi.Vi)
% can change due to removal of components
V = full(SPM.xVi.Vi{v});
for c = 1:ncond:size(SPM.xX.X,1)
V(c+ncond:end,c:c+ncond-1) = 0;
V(c:c+ncond-1,c+ncond:end) = 0;
end
if any(V(:))
SPM.xVi.Vi{v} = sparse(V); % save modified version
else
SPM.xVi.Vi(v) = []; % delete variance component
% if modified V contains only zeros
end
end
save(SPMmat,'SPM')
|