Hi Ged,
just a quick comment (I guess you already know that .. )
> I've searched the code for that error message, and it comes from
> spm_FcUtil. The distinguishing feature of F-contrasts (aside from
> SPM's restriction to right-tailed T-contrasts) is that they are
> matrices rather than vectors. And indeed, if I try the following:
>
> X = kron(eye(3),ones(4,1)); % an example ANOVA design matrix
> c = [-1 -1 2]'; % vector T-contrast
> K = [-1 -1 2; 1 -1 0]'; % matrix F-contrast
> spm_FcUtil('Set', 'test', 'T', 'c', c, X)
> spm_FcUtil('Set', 'test', 'F', 'c', K, X)
> spm_FcUtil('Set', 'test', 'T', 'c', K, X)
>
> the first two (c as a T-contrast, and K as an F-contrast) work fine,
> while the third (K attempting to be a T-contrast) reproduces your error.
K as an F is correct as the sum of the columns is 0 -2 2 and therefore
the whole sum up to 0
>
> This doesn't explain why you seem to get the error for a valid
> T-contrast of [-1 -1 2] but it does suggest that you should very
> carefully check that you have indeed entered this correctly.
can it be any error in the estimation? ie. for any reason the estimation
of Bs is wrong and thus then contrast c doesn't work (while it should)
>
> You might also want to investigate something like:
> load SPM.mat
> X = SPM.xX.X;
> N = numel(SPM.xCon);
> for n = 1:N
> c = SPM.xCon(n).c % looks like your contrast??
> spm_FcUtil('Set', 'test', 'T', 'c', c, X)
> end
if the contrast is correct, try to reestimate the matrix and check if
any messages is return in the command window ..
Best
Cyril
|