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

Closed
FioritoAnna opened this issue Apr 15, 2024 · 5 comments · Fixed by #1296
Closed

Bidspm with 3 groups #1229

FioritoAnna opened this issue Apr 15, 2024 · 5 comments · Fixed by #1296
Labels
enhancement New feature or request stats
Milestone

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

@Remi-Gau
Copy link
Contributor

@FioritoAnna

sorry I never got back to you on this.

I am finally implementing this in #1296 by adding the possibility to create one-way anova at the group level to compare different groups.

Took me quite a while and a lot of changes but now bidspm should automatically decide between 2 samples T Test or one way anova depending on the number of groups it finds in your participants.tsv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stats
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants