NiMARE icon indicating copy to clipboard operation
NiMARE copied to clipboard

Do not zero out one-tailed z-statistics for p-values > 0.5

Open JulioAPeraza opened this issue 3 years ago • 3 comments

Closes #511.

Changes proposed in this pull request:

  • Do not zero out one-tailed z-statistics for p-values > 0.5. Note: p-value = 0.5 will still be set to 0, so logp and z-statistic maps will not completely match in that case.

JulioAPeraza avatar Jun 01 '22 21:06 JulioAPeraza

Codecov Report

Base: 88.64% // Head: 88.66% // Increases project coverage by +0.02% :tada:

Coverage data is based on head (e6cb5e2) compared to base (2de404d). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #693      +/-   ##
==========================================
+ Coverage   88.64%   88.66%   +0.02%     
==========================================
  Files          38       38              
  Lines        4324     4323       -1     
==========================================
  Hits         3833     3833              
+ Misses        491      490       -1     
Impacted Files Coverage Δ
nimare/decode/continuous.py 94.79% <ø> (ø)
nimare/io.py 95.14% <ø> (ø)
nimare/meta/cbma/ale.py 96.61% <ø> (ø)
nimare/meta/cbma/mkda.py 98.75% <ø> (ø)
nimare/meta/kernel.py 95.78% <ø> (ø)
nimare/meta/utils.py 95.73% <ø> (ø)
nimare/extract/utils.py 38.58% <100.00%> (ø)
nimare/transforms.py 75.63% <100.00%> (+0.27%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Jun 01 '22 22:06 codecov[bot]

@tsalo if we don't zero out one-tailed z-statistics for p-values > 0.5, should we: (1) leave the negative value, (2) apply the abs() function since the values returned by this function should be unsigned z-statistics, or (3) replace the negative values with a small number 1.0e-300?

JulioAPeraza avatar Jun 07 '22 19:06 JulioAPeraza

I'm not sure... maybe someone else who has a better handle on stats can answer that?

tsalo avatar Jun 11 '22 14:06 tsalo

@yifan0330 seemed to have a good handle on z-to-p conversion (and probably p-to-z conversion), given #748 and #749. @yifan0330 would you be willing to take a look at this?

tsalo avatar Jan 27 '23 16:01 tsalo

@yifan0330 seemed to have a good handle on z-to-p conversion (and probably p-to-z conversion), given #748 and #749. @yifan0330 would you be willing to take a look at this?

@JulioAPeraza @tsalo I saw you replace negative z value with values estimated by cdf, I am wondering if it's the same as taking absolute value of z (since z and zval_cdf have same value but opposite sign)? Also, I left two comments on testing case (I think z=-1.959964 corresponds to p=0.975 in one tail test).

yifan0330 avatar Jan 31 '23 23:01 yifan0330

Thanks so much, @yifan0330! I've incorporated your suggestions. @tsalo Do you think this is ready to merge?

JulioAPeraza avatar Feb 01 '23 18:02 JulioAPeraza

@JulioAPeraza if @yifan0330 is happy with the changes then absolutely, I think it's good to merge.

Yeah I am happy with Julio's changes :)

yifan0330 avatar Feb 01 '23 21:02 yifan0330

Thanks! Merging now.

JulioAPeraza avatar Feb 01 '23 21:02 JulioAPeraza