mtag
mtag copied to clipboard
ValueError: cannot convert float NaN to integer
After completed MTAG calculations of 5 traits, I get a ValueError: cannot convert float NaN to integer. The consequence is that I lack mtag_estimates for one of my traits. I have attached the log-file.
Prior to the analysis I removed all SNPs with NAs and the SNPs with frequencies of 0 or 1. I have no idea why this error occurs, and what to do about it.
Hello!
I think the likely culprit here is that your mean chi2 statistics are too small for MTAG to work well. MTAG estimates the variance of the effect sizes using (1- mean_chi2). It appears that for 4 of your 5 traits, the mean chi2 stat is less than one, which means that MTAG will treat it as if it has a negative variance. This problem will occur when the sample sizes of the input GWAS are too small. So it may be that MTAG is not well-suited to your problem until you get a bit more statistical power first.
Let me know if you have any questions.
Best, Patrick
On Tue, Aug 28, 2018 at 1:30 PM cks2903 [email protected] wrote:
After completed MTAG calculations of 5 traits, I get a ValueError: cannot convert float NaN to integer. The consequence is that I lack mtag_estimates for one of my traits. I have attached the log-file.
Prior to the analysis I removed all SNPs with NAs and the SNPs with frequencies of 0 or 1. I have no idea what to do about this error.
NaK.log https://github.com/omeed-maghzian/mtag/files/2329167/NaK.log
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/omeed-maghzian/mtag/issues/42, or mute the thread https://github.com/notifications/unsubscribe-auth/AUNA9XhngACFXJOlVjelYCo0mfHCU_EVks5uVX4rgaJpZM4WQEZL .
Thank you. I was speculating that the low mean chi2 statistics would be what's causing the problem. The question is then: Can I trust the mtag_pvalues that are estimated for 4 of my 5 traits? I am aware that I forced the analysis.
I would be suspicious of p-values for all of the traits in an analysis where any of the traits has a p-value of less than one. It may be fine, but we didn't even test the software at such extreme levels since it's a bit strange from a theory standpoint. If you are willing to make the equal heritability, perfect genetic correlation assumption, that might help, but it may not be appropriate for your application.
On Wed, Aug 29, 2018 at 2:02 AM cks2903 [email protected] wrote:
Thank you. I was speculating that the low mean chi2 statistics would be what's causing the problem. The question is then? Can I trust the mtag_pvalues that is estimated for 4 of my 5 traits? I am aware that I forced the analysis.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/omeed-maghzian/mtag/issues/42#issuecomment-416834645, or mute the thread https://github.com/notifications/unsubscribe-auth/AUNA9TQ_cgiKXsQPrUFBUs0u48zij8b4ks5uVi6PgaJpZM4WQEZL .