mwaskom/moss

orthogonalizing temporal derivatives

iancballard opened this issue · 7 comments

Hi Michael,

I might be wrong, but it looks like you don't orthogonalize the temporal derivative regressors relative to the main events. It looks like both SPM and FSL do this, and it results in more accurate beta estimates in simulations:

http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3896880/

-Ian

Are you sure FSL does this? It's not mentioned in the FSL Design Matrix Rules http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FEAT/UserGuide#Appendix_B:_Design_Matrix_Rules

Hmm, according to Jeanette Mumford they do, but you're right its not in the pseudo-code.

From http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0126255

"Similar to SPM, FSL also allows for the modeling of temporal derivatives of regressors to account for minor timing misspecifications. FSL uses a slightly different orthgonalization strategy where the derivative is orthogonalized with respect to both the original regressor and the overall mean. As shown in [2], this approach may still be beneficial in improving the estimate for the regressor of interest, the original regressor, but not as beneficial as only orthogonalizing with respect to the original regressor, as done in SPM."

There's no mention of temporal derivatives in the release notes. I'll email the list.

If you decide to change it, my solution was to add one line at line 65 (after scaling) of glm.py:

dy = dy - (np.dot(y,dy)/np.dot(y,y) * y) #orthogonalize

You would at least want to make it optional for backwards compatibility. Also based on ad hoc checking on a couple runs of a simple design, the value of the correlations between an event-related regressor and its derivative is quite low (r < 0.02) so I doubt it makes a huge difference in practice even if it is the right thing to do.

Agree it might not matter. It's hard to tell from the paper cited above. Anyways, FSL does orthogonalize:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=ind1608&L=FSL&P=R35561&1=FSL&9=A&J=on&d=No+Match%3BMatch%3BMatches&z=4

It would be helpful if you could write back and ask what source code file one could read if they wanted to see exactly how it is done. :)

Nothing too useful:
Hello,
$FSLDIR/src/feat5/feat_model.cc contains all the code for design generation/processing etc.
Kind Regards
Matthew

This code is no fun to read, but it looks like it happens with a comment saying: "// well, Timmy wanted it but doesn't seem to have much effect....."

So perhaps it doesn't matter after all.