Skip to content

Conversation

@FrancescoNottingham
Copy link
Collaborator

Hi @AnriiGegliuk and @oesteban

Here is some code which attempts to calculate the probability that each DVARS value comes from artefact free scans. The DVARS metric is assumed to follow a chi^2 distribution and the process of calculating parameters for the null distribution is found in this paper: https://www.sciencedirect.com/science/article/pii/S1053811917311229?via%3Dihub#appsecE

Unfortunately the final chi^2 metrics calculated are far too high for all DVARS in test scans (leading to all values being statistically significant) - I have tried to troubleshoot by using different methods to calculate the null distribution variance and null distribution mean, however this has not worked.

I'll keep working on it but any suggestions would be great!

…ibution_mean function to calculate the median of voxel IQR timeseries differences instead of the mean (look at reference paper beneath equation 13)
…iance using power calculation and calculation of z-scores using the null distribution
merging changes
added functions which calculate the null variance, correction to the
null variance and z-scores (these still need to be tested!!)

still to do:
test functions
calculate p-values
bonferroni correction for p-values
…2 metrics are still too high so p-values calculated are all too small
@codecov
Copy link

codecov bot commented Sep 28, 2023

Codecov Report

Attention: Patch coverage is 74.00000% with 26 lines in your changes missing coverage. Please review.

Project coverage is 81.59%. Comparing base (3c4256e) to head (a552749).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
findoutlie/dvars_distribution.py 49.01% 26 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #13      +/-   ##
==========================================
- Coverage   90.43%   81.59%   -8.85%     
==========================================
  Files          10       10              
  Lines         115      201      +86     
==========================================
+ Hits          104      164      +60     
- Misses         11       37      +26     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Successfully merging this pull request may close these issues.

2 participants