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

p value #18

Open
sokratiag opened this issue Nov 13, 2020 · 2 comments
Open

p value #18

sokratiag opened this issue Nov 13, 2020 · 2 comments

Comments

@sokratiag
Copy link

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)?

@vals
Copy link
Member

vals commented Nov 18, 2020

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.

@sokratiag
Copy link
Author

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!

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

No branches or pull requests

2 participants