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

Proposal: Make contrast names unique at higher-levels #40

Open
adelavega opened this issue May 18, 2022 · 0 comments
Open

Proposal: Make contrast names unique at higher-levels #40

adelavega opened this issue May 18, 2022 · 0 comments

Comments

@adelavega
Copy link
Collaborator

adelavega commented May 18, 2022

@jmumford pointed out this issue:

If you GroupBy contrast, and then create more than one contrast at that level, the two new contrasts will not have a unique name. In fact merely giving a custom name to that higher-level contrast means that new contrasts will clash.

For example:

  "Nodes": [
    {
      "Level": "Run",
      "Name": "run_level",
      "GroupBy": ["run", "subject"],
      "Model": {"X": [1, "incongruent", "congruent"], "Type": "glm"},
      "Contrasts": [
        {
          "Name": "congruent",
          "ConditionList": ["congruent"],
          "Weights": [1],
          "Test": "t"
        },
        {
          "Name": "incongruent",
          "ConditionList": ["incongruent"],
          "Weights": [1],
          "Test": "t"
        }
      ]
    },
    {
      "Level": "Subject",
      "Name": "subject_level",
      "GroupBy": ["subject", "contrast"],
      "Model": {"X": [1], "Type": "meta"},
      "Contrasts": [
        {
          "Name": "mydummy",
          "ConditionList": [1],
          "Weights": [1],
          "Test": "t"
        }
      ]
    }

In this case, you are creating a contrast mydummy for both incongruent and congruent.

If you were to give this new contrast the special name 1, it would work, as the new name would be inherited from the previous level.

But given a new custom name, both contrasts will create a contrast named "mydummy" which cannot be differentiated. This is particularly problematic with more than 1 contrast (e.g. positive and negative slopes, intercepts. etc).

Proposal

If at a higher level a contrast has a custom name, the new name will be:
in_contrast_new_contrast

In this previous example you would have:

  • incongruent_mydummy
  • congruent_mydummy

If the Name has the special key 1, then the name from the previous level is kept without any concatenation.

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

1 participant