Hi Cyril,
> K as an F is correct as the sum of the columns is 0 -2 2 and therefore
> the whole sum up to 0
The sum-to-zero constraint is something that I've been curious about
before, and something that's been discussed (albeit a little
inconclusively) on the mailing list before. Several books mention that
contrasts should sum to zero, but actually SPM just requires the
contrasts to be estimable. There are more details in the HBF book, but
basically, estimable combinations of the betas are ones which are
equivalent to combinations of X*beta, as this is how beta affects the
dependent variable. These are unique even for non-unique beta. With
rank-deficient design matrices, beta depends on the choice of
generalised inverse, but c'*beta doesn't iff c' = d'X, or in other
words if c is in the rowspace of X. The way that SPM tests to see if a
contrast is in the rowspace is to project the contrast onto the rows
of X and see how close it is to the original, something like:
all(all(c - X'*pinv(X')*c < eps))
but with a few tricks in spm_SpUtil and spm_sp to speed things up.
Examples of valid contrasts which don't sum to zero include simple a
correlation analysis:
X = [ones(N,1) covariate]; c = [0 1]';
and (one possible coding of) an F-contrast to test the null hypothesis
that all betas are zero, as used here:
http://www.fil.ion.ucl.ac.uk/spm/data/archive/face-contrasts/rfx-multiple.html#_Effects_of_Interest_F-contrast
[also http://tinyurl.com/252mnc if above breaks]
I hope that helps,
Ged
|