gqi / MRMix

R package for performing Mendelian Randomization using mixture models
22 stars 8 forks source link

Algorithm may not have converged #2

Closed anglixue closed 4 years ago

anglixue commented 4 years ago

Hi Guanghao,

Recently I found that MRmix sometimes gives very significant P-value along with the following information:

> MRMix(bzx, bzy, sx=bzx_se, sy=bzy_se, theta_temp_vec = seq(-1,1,by=0.01))
$theta
[1] -0.09

$pi0
[1] 0.9999

$sigma2
[1] 5.662289e-05

$SE_theta
[1] 0.02252094

$zstat_theta
[1] -3.99628

$pvalue_theta
[1] 6.434561e-05

Warning message:
In MRMix(bzx, bzy, sx = bzx_se, sy = bzy_se, theta_temp_vec = seq(-1,  :
  Algorithm may not have converged.

I was wondering how should I interpret this result. And is there any way to make it converged and provide more robust estimate?

Thank you!

Cheers, Angli

gqi commented 4 years ago

Hi Angli,

Thanks for your email. This usually means the pi0 vs theta curve is too spiky so the maxima may not be trustworthy. You can view the complete set of pi0 vs theta by setting profile=TRUE. There will be an additional output named profile_mat which has this information.

We made an update on Jan 27th this year to address this issue. If you installed it earlier than this date. You might want to try re-installing it.

Let me know if you have any questions.

Best, Guanghao

On Wed, Jun 17, 2020 at 1:53 AM Angli Xue notifications@github.com wrote:

Hi Guanghao,

Recently I found that MRmix sometimes gives very significant P-value along with the following information:

MRMix(bzx, bzy, sx=bzx_se, sy=bzy_se, theta_temp_vec = seq(-1,1,by=0.01)) $theta [1] -0.09

$pi0 [1] 0.9999

$sigma2 [1] 5.662289e-05

$SE_theta [1] 0.02252094

$zstat_theta [1] -3.99628

$pvalue_theta [1] 6.434561e-05

Warning message: In MRMix(bzx, bzy, sx = bzx_se, sy = bzy_se, theta_temp_vec = seq(-1, : Algorithm may not have converged.

I was wondering how should I interpret this result. And is there any way to make it converged and provide more robust estimate?

Thank you!

Cheers, Angli

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gqi/MRMix/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADXFPF3KTMXLRYZEK6LZRZTRXBK63ANCNFSM4OAIJMNA .

anglixue commented 4 years ago

Hi Guanghao,

Thanks for your quick reply.

Yes, after I install the latest version, there is no such warnings anymore and the FDR is well-controlled now. Thanks for your help!

Cheers, Angli

gqi commented 4 years ago

No problem!

On Jun 18, 2020, at 2:57 AM, Angli Xue notifications@github.com wrote:

 Hi Guanghao,

Thanks for your quick reply.

Yes, after I install the latest version, there is no such warnings anymore and the FDR is well-controlled now. Thanks for your help!

Cheers, Angli

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.