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

Add support for the concordant mode test in Fisher's and Stouffer's estimators #884

Merged
merged 13 commits into from
May 28, 2024

Conversation

JulioAPeraza
Copy link
Collaborator

Closes None.

Changes proposed in this pull request:

  • Currently, we only support directed tests in Fisher's and Stouffer's estimators. The new parameter two_sided (following Nilearn's naming convention) adds support for the concordant (two-sided) test.
  • That parameter will be used in the Diagnostics module to determine if the diagnostic should be run for z < 0.

@JulioAPeraza JulioAPeraza added enhancement New feature or request ibma Issues/PRs pertaining to image-based meta-analysis labels May 17, 2024
Copy link

codecov bot commented May 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.17%. Comparing base (80cc7a5) to head (b03fc62).
Report is 15 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #884      +/-   ##
==========================================
+ Coverage   88.15%   88.17%   +0.01%     
==========================================
  Files          48       48              
  Lines        6367     6374       +7     
==========================================
+ Hits         5613     5620       +7     
  Misses        754      754              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JulioAPeraza JulioAPeraza marked this pull request as ready for review May 20, 2024 18:54
@JulioAPeraza
Copy link
Collaborator Author

It looks like something changed in Nilearn's plot_stat_map. The color bars for maps with only positive values in the example gallery are not symmetric by default: https://nimare--884.org.readthedocs.build/en/884/auto_examples/02_meta-analyses/01_plot_cbma.html#sphx-glr-auto-examples-02-meta-analyses-01-plot-cbma-py

@JulioAPeraza
Copy link
Collaborator Author

Setting symmetric_cbar to True in plot_stat_map didn't fix the issue.

@JulioAPeraza
Copy link
Collaborator Author

This could also be addressed using sequential colormaps instead. I open an issue here to see if there is a better way to approach this.

@JulioAPeraza
Copy link
Collaborator Author

When I checked the gallery the other day, it looked like the RTD was not properly built. Setting symmetric_cbar to True in plot_stat_map actually solved the issue.

@JulioAPeraza JulioAPeraza requested a review from jdkent May 28, 2024 01:08
@@ -529,3 +529,16 @@ @article{geoffroy2001poisson
year={2001},
publisher={Taylor \& Francis}
}

@article{winkler2016non,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this referenced in the permutedOLS class?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I added that when I defined the mode parameter, but later, I removed it in favor of two_sided and forgot to remove the citation.

@@ -337,12 +358,15 @@ class Stouffers(IBMAEstimator):

_required_inputs = {"z_maps": ("image", "z")}

def __init__(self, use_sample_size=False, **kwargs):
def __init__(self, use_sample_size=False, two_sided=True, **kwargs):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this changes the default to concordant right? we should make note that this is different from previous behavior (but I do agree with changing this default behavior)

@JulioAPeraza
Copy link
Collaborator Author

@jdkent Thanks for the review! I added a note for the change in the versionchanged field of the docstring. We could also include a sentence in the release note of 0.2.3.

Copy link
Member

@jdkent jdkent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @JulioAPeraza!

@jdkent jdkent merged commit d95c18b into neurostuff:main May 28, 2024
20 checks passed
@JulioAPeraza JulioAPeraza deleted the enh-ibma branch May 28, 2024 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ibma Issues/PRs pertaining to image-based meta-analysis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants