Using task regression residuals for RDMs? #428
Unanswered
melaniekos
asked this question in
Q&A
Replies: 1 comment
-
HI @melaniekos I'm gonna move this to the Discussions section as it seems more of a methods question rather than a technical one. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I posted the below to Neurostars, but realized I should share to the Issues page 😃 I've done a quick search and wasn't able to find any issues like the below, so my apologies in advance if it has been addressed elsewhere.
Here's the situation: I have 4 conditions to be compared across all subjects, with conditions pulled from 2 task types. For a toy example to illustrate the problem, both of my tasks involve social and non-social conditions, but differ in terms of visual features (e.g., one task uses photos to represent sociality, the other uses avatars). This would leave four types of trial: task1_social (photos), task1_nonsocial (photos), task2_social (avatars), task2_nonsocial (avatars).
As I see it, there are two types of similarity here, one of which I am interested in assessing (social vs. non-social, across and within tasks) and one that I am interested in controlling for (photos vs. avatars, across tasks). Basically, I would like to determine when and how to “regress” task out, in order to examine my primary comparison of interest (in this example, social vs. non-social).
My current pipeline involves:
Dissimilarity matrix values generated using rsatoolbox.rdm.calc_rdm (method=correlation) on the raw, zstat values, computed by running the pairwise correlations between all four conditions (task1_social (photos), task1_nonsocial (photos), task2_social (avatars), task2_nonsocial (avatars)):
Example output:
Step 2: Regress out the task variance from the dissimilarity vectors
Example output (where s hits the fan)
Step 3: Compare these task-regressed dissimilarity vectors/matrices to hypothetical RDMs for the psychological construct
Step 3 results seem pointless to share here given the negative RDM values after step 2, but I can if it helps, and feedback on process is welcome!
As you can see, the current way that I am regressing out the task variable results in RDMs taking on negative values. I figure this is because task variance should be regressed prior to creating the RDM, and that the regression I am running pulls the beta values for the new rdms_dict (in step 2), when it should be pulling the residuals. These residuals should then be used as the DVs for my hypothetical RDMs. Can I pull the residual values from the regression on my raw data’s dissimilarity matrix, and then create a RDM of these residuals? Also toying with somehow using partial RDMs. Thank you in advance for any guidance!
Beta Was this translation helpful? Give feedback.
All reactions