-
Notifications
You must be signed in to change notification settings - Fork 47
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
Is it possible to test the hypothesis that the significant variants are in a set of SNPs? #196
Comments
Not just sets from the susie_get_cs() |
sorry I don't think we understand the question. |
Can I test the hypothesis like "beta_2,beta_3\ne0, beta_1,beta_4=0"? |
perhaps the simplest way would be to sample from the (approximate) posterior distribution on beta, and then use that sample to compute the probability of any particular combination |
Something like this (test the hypothesis that significant variants are in the middle)?
result in:
|
I think the code doesn't look quite right, but something like that, yes |
I made an edit on the code. Could you tell me why it doesn't look right? |
you have samp$b[1,1:39] so the indices of b don't look consistent through your code |
Thanks for spotting this mistake. I'm now using:
which I believe is consistent. However, it looks like these all have very small probabilities. Do you recommend instead of testing |
Can anyone respond to this issue please? @pcarbo |
The issue of working with very small probabilities is a common issue and there are some ways to help with this. If you can share with us a reproducible example illustrating exactly what you are trying to do, I might be able to help you. As a general piece of advice, I recommend starting with an example that is as simple as possible, e.g., an example with exactly 4 variables X. |
An example of four variables b1, b2, b3, b4: suppose I want to calculate P(b1=0 and b4 =0 and (b2!=0 or b3!=0)) as the probability that the causal variant is in {b2,b3}, shall I run this program below to get the probability?
If I rank posterior1, posterior2, posterior3, posterior12, posterior23, posterior13, posterior123 and select the one with probability greater than 0.95, will I get the same credible interval (default coverage = 0.95):
|
@garyzhubc This is not a reproducible example because some variables in your code (e.g., |
I think what you are doing looks OK, and you are just getting the answer that there is a very small probability of the event you are looking at. You could also try the epsilon approach you suggested. |
I also tried using PIP directly instead of sampling.
still gives zero probabilities. See #203 (comment) |
I could do the same on this example https://stephenslab.github.io/susieR/articles/sparse_susie_eval.html:
Using Monte Carlo sample from posterior:
Using PIP:
Both gives probability zero. |
@garyzhubc I think the issue is that in your example all the inclusion probabilities are either 1 or very, very small, so it may be tricky to use a naive Monte Carlo sampling approach: hist(log10(susie.sparse$alpha),n = 64) One idea that comes to mind is importance sampling, but you might want to start with an example where the probabilities are less extreme. |
Is it possible to test the hypothesis that the significant variants are in a set of SNPs?
The text was updated successfully, but these errors were encountered: