...adding, if you want to check what's going on, _after_ starting SPM2 (after picking "fMRI"), use the matlab debugger. You'd type
dbstop in spm_get_ons at 226
Then you'd run SPM. The debugger would stop at that line. You could type
whos u
to see the dimensions of the vector/matrix u, then type
dbstep
to process that line, then type
whos u
again. If u is Nx1, then it's a vector and u will probably be unchanged by spm_orth, unless SPM normalizes it somehow.
Alternatively, for more detail, you could save "u" in a temporary variable (because line 226 alters it). Run until the debugger stops, then type something like
utmp = u;
dbstep
isequal(u, utmp)
Best,
Stephen J. Fromm, PhD
Contractor, NIMH/MAP
(301) 451--9265
________________________________________
From: Fromm, Stephen (NIH/NIMH) [C]
Sent: Friday, March 05, 2010 12:03 PM
To: Misha Koshelev; [log in to unmask]
Subject: RE: orthogonalization of regressors
I could be mistaken---I just quickly read over the code---but I think what's being orthogonalized is the case of parametric modulation.
That is, when you have parametric modulation for a specific trial type, then the regressors for that trial type will be orthogonalized. But there's no orthogonalization _between_ trial types.
Note (at the "zero indent" level of code blocks) the enclosing loop:
for i = 1:v
That's a loop over trial types (equivalently, conditions).
I'm pretty sure that if there's no parametric modulation, "u" will be be a single column (or perhaps row), so there's nothing to make orthogonal. If you look at the code, you'll see this line:
u = [u P.^j];
That's u being built up into a matrix with more than one column, but it only happens in the case of parametric modulation.
Stephen J. Fromm, PhD
Contractor, NIMH/MAP
(301) 451--9265
________________________________________
From: Misha Koshelev [[log in to unmask]]
Sent: Friday, March 05, 2010 11:31 AM
To: Fromm, Stephen (NIH/NIMH) [C]; [log in to unmask]
Subject: Re: orthogonalization of regressors
Stephen J. Fromm wrote:
> On Tue, 2 Mar 2010 19:21:22 -0600, Misha Koshelev <[log in to unmask]>
> wrote:
>
> Why do you think regressors are always orthogonalized?
>
I have attached the file spm_get_ons.m for SPM2.
On line 224-226 it reads:
% orthogonalize inputs
%---------------------------------------------------------------
u = spm_orth(u);
Per my lab members advice, this is the line where orthogonalization of regressor is done. In fact, he toggles this line (or not) to determine whether or not his regressors are orthogonalized (if commented out - no orthogonalization). Is this not the case?
Thank you
Misha Koshelev
--
Misha Koshelev
MD/PhD Student
Human Neuroimaging Laboratory
One Baylor Plaza
S104
Baylor College of Medicine
Houston, TX 77030
|