cosanlab / nltools

Python toolbox for analyzing imaging data
https://nltools.org
MIT License
122 stars 43 forks source link

design matrix in Representational Similarity Analysis(RSA) #402

Open JJliao13 opened 3 years ago

JJliao13 commented 3 years ago

Dear nltools developers,

Thanks for your work of nltools. I am using nltools to perform representational similarity analysis. There were two task runs in my design, so I defined a between-run representational similarity matrix(RSM). Due to the time auto-correlation of the BOLD signal in the same run, the similarities within runs need to be ignored. Setting the similarities within runs to 0 to ignore the effect in the RSM is correct or not?

Thanks much!

ljchang commented 7 months ago

hi @JJliao13 , apologies for the delay. I'm not sure I can provide much help on this without knowing more details about your design and what you are trying to do. Are you trying to do an RSA across conditions or trials for multiple tasks? or simply across tasks? If the latter, it seems like a contrast might make more sense.

There are many ways to address the potential autocorrelation issue, one solution is to just include that in your matrix that specifies hypothesized relations between conditions. Another is to use a multiple regression approach, where you would add a covariate specifying this autocorrelation to separate it from your analysis of interest.