zkutalik / ssimp_software

GNU General Public License v3.0
16 stars 10 forks source link

branch <new-output-columns> : adding P.imp, N.imp and bst.imp + testing #20

Closed sinarueeger closed 6 years ago

sinarueeger commented 6 years ago

add to output: n.imp, p.value and st.effectsizes to output

aaronmcdaid commented 6 years ago

I've pushed code to print these to a branch called 'more.columns'. It's a really tiny change, so I'll simply copy in here directly.

Add this near the top of ssimp.cc:

#include<gsl/gsl_cdf.h>

... and add this to where the header is printed:

                        << '\t' << "P.imp"
                        << '\t' << "N.imp"
                        << '\t' << "bst.imp"

and this to the output:

                        << '\t' << 2.0*gsl_cdf_gaussian_P(-std::abs(z_imp), 1)      // P.imp
                        << '\t' << N_max * imp_qual                                 // N.imp
                        << '\t' << z_imp / std::sqrt(N_max*imp_qual)                // bst.imp

Note: sometimes the imp.qual is exactly zero (in my crazy tests anyway) which results in N.imp=0 and bst.imp=inf. That's weird and I'm sure some users will be confused to see it

(I also intend to push a follow-up commit in the next hour which updates all the tests to include this extra column)

sinarueeger commented 6 years ago

Merged it and adapted docu/manual.md

aaronmcdaid commented 6 years ago

Please pull from 'more.columns' again. I finally pushed the test updates only a few minutes ago!

sinarueeger commented 6 years ago

Done