Dear list,
briefly: how do I decorrelate my data?
according to
http://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=ind00&L=spm&O=D&F=&S=&P=146875
I am trying to orthogonalize data: RT = RT - X*(pinv(X)*RT);
I think, spm_orth is the implementatin of this with x=RT (spm uses this
function to orthogonalize basis functions). It works columwise on a matrix X:
x = X(:,1);
for i = 2:size(X,2)
D = X(:,i);
D = D - x*(pinv(x)*D);
if any(D)
x = [x D];
end
end
Unfortunately, I am mathematically not very inclined and have come across
the following observation (=problem to me). My understanding of
orthogonalizytion is that the colum vectors get 'decorrelated'. To convince
myself of this effect, I calculated Pearson's R before and after
orthogonalization, i.e.
corrcoef(X) vs. corrcoef(spm_orth(X))
and found that for a set of [some random] trial data I get higher absolute
correlation coefficients after the orthogonalization (but they are
negative). Again, my understanding is that even a negative but higher
correlation means that I did not achieve what I had wanted.
Any hints/help? Thank you!
Helmut
|