Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bidspm with 3 groups #1229

Open
FioritoAnna opened this issue Apr 15, 2024 · 4 comments
Open

Bidspm with 3 groups #1229

FioritoAnna opened this issue Apr 15, 2024 · 4 comments

Comments

@FioritoAnna
Copy link

FioritoAnna commented Apr 15, 2024

Hi,

I am working on a neuroimaging dataset with three groups (control, patients, relatives) and I am using bidspm.
I am aware that bidspm only work for one-sample or two-sample t-test, and I would like to perform 2-by-2 comparisons (controls vs patients, patients vs relatives, relatives vs controls).

For instance to look at controls >patients in my bids stat model for between group comparisons at dataset level I would use something like:

{
      "Level": "Dataset",
      "Name": "between_group",
      "Description": "two sample t-test",
      "GroupBy": [
        "contrast"
      ],
      "Model": {
        "Type": "glm",
        "X": [
          1,
          "Group"
        ]
      },
      "DummyContrasts": {
       "Test": "t"
     },
      "Contrasts": [
        {
          "Name": "hc_gt_sz",
          "ConditionList": [
             "Group.controls",
             "Group.patients",
             "Group.relatives"             
          ],
          "Weights": [
            1,
            -1,
            0
          ],
          "Test": "t"
        }
      ]
    }

However, this is not working (I can only make it work if I delete individuals subjects folders of relatives in my bids, bidspm-preproc and bidspm-stats directories) and use ;

 "ConditionList": [
             "Group.controls",
             "Group.patients"
]

Is there a more straightforward way of using bidspm with 3 groups?

Thank you!
All the best,
Anna

Copy link

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory

@Remi-Gau
Copy link
Contributor

I can only make it work if I delete individuals subjects folders of relatives in my bids, bidspm-preproc and bidspm-stats directories

Ouch !!! that's a bit drastic.
Sorry about that.

Will try to set a minimal example to see if I can find a workaround.

I would like to perform 2-by-2 comparisons (controls vs patients, patients vs relatives, relatives vs controls)

Not sure I follow, that seems more like a one-way (1 by 3) anova with some planned contrats. You only have a "group" factor with 3 levels, right?

@FioritoAnna
Copy link
Author

That would be nice, thanks!

Since my understanding is that it's not possible to perform ANOVA in bidspm, I thought that instead of first performing a one-way ANOVA and then post-hoc t-tests I can directly test my hypothesis with t-tests (with 2 groups I would only have to perform one t-test - patients vs controls- while with 3 groups I will perform 3 separate t-tests - controls vs patients, patients vs relatives, relatives vs controls but to do so I need to be able to "ignore" one of the three groups when it is not employed in a given comparison, which I can't do for now).

Not sure this answer to your question but I have a between-factor (3 groups) and a task-related within-factor (my task have three 2-level factors which are attention high/attention low, valence positive/valence negative, congruent/incongruent).

Don't hesitate to tell me if this is not clear

@FioritoAnna
Copy link
Author

Hi,
Any follow-up on this issue?
Thanks,
Anna

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants