Teichlab / SpatialDE

Test genes for Spatial Variation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

p value

sokratiag opened this issue · comments

Hi,

Shouldn't the test statistics for the LLR be 2*LLR in mll_results['pval'] = 1 - stats.chi2.cdf(mll_results['LLR'], df=1), so that ['pval'] = 1 - stats.chi2.cdf(2 * mll_results['LLR'], df=1)?

Hm, you're right, it should be! Not sure why we missed that.

Looking at simulations from null model, the FDR is calibrated: https://github.com/Teichlab/SpatialDE/blob/master/Analysis/Theory/Simulation%20from%20null%20model.ipynb . But the black bar might be even closer to the 5% FDR with 2 * LLR.

Usually the null hypothesis is very clearly rejected, with large LLR's that give infinitesimal p-values. So in practice it probably makes a pretty small difference. But we should change this.

Hi vals,
I think if you take pval=1 - ss.chi2.cdf(2*df['LLR'], df=1) on the MOUSEOB example, would result to 345 SV genes which makes a big difference so it is worth looking at it because you lose power!