TDT: how to perform RSA-GLM and obtain beta values?

Hi Martin,

I really appreciate your helpful comments!
I am happy to confirm that my code is fine, including cfg.files.components.
Separate similarity analyses might be nice, too. Thanks for a helpful suggestion.

Cross-validated squared distance sounds nice. I would be happy if you could give me some more tips about this procedure.

My current design is very similar to the previous post by Phil: RSA on individual behavioral ratings.
I have 6 sessions neural data. Half of 80 items (= 40 items) appeared on session 1, 3, and 5. Another half items appeared on session 2, 4, and 6. Therefore, output neural (dis)similarity matrix has size of 240 x 240.
Each behavior RDM in RSA-GLM indicates data of differences between two ratings across 80 items (size: 80 x 80). These behavior ratings were obtained in the task outside the scanner (not during fMRI task).

To get cross-validated output values, I should correctly arrange decoding labels for cross-validation. I am wondering how I should perform it.
I believe that in normal RSA, labels are meaningless, so settings are like this:
labels(1:2:length(labelnames)) = -1;
labels(2:2:length(labelnames)) = 1;
(* labelnemes: 80 items)
But such an arbitrary labeling seems not appropriate for cross-validated RSA.

I look forward to hearing from you.
Thank you!
Ryuhei