You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I guess the problem was the set-up of 'df = length(b_exp) - 1'. If we are estimating p value from bootstrap, should the dr = number of bootstrap -1 ? In my case, I only used 3 SNPs, if df = length(b_exp) - 1, then here the df is 2, which makes the p value really big ...which is inconsistent with 95% CI...
Thank you very much,
Yvonne & Huan
The text was updated successfully, but these errors were encountered:
Dear developer,
Recently I ran 'TwosamleMR' and noticed that the mode-based method may have some bugs in reporting P values when the number of IV is small.
For example, I ran an MR with 3 SNPs as IV, here are my results.
id.exposure id.outcome method nsnp b se ci_low ci_upp pval
1 6azTYV iUTOLO Simple mode 3 -5.834308 2.627214 -10.983553 -0.685062833 0.1565154
2 6azTYV iUTOLO Weighted mode 3 -4.327279 2.509336 -9.245486 0.590928338 0.2267644
3 6azTYV iUTOLO Penalised mode 3 -4.327279 2.526705 -9.279529 0.624971024 0.2289150
4 6azTYV iUTOLO Simple mode (NOME) 3 -5.834308 2.278630 -10.300342 -1.368274369 0.1246472
5 6azTYV iUTOLO Weighted mode (NOME) 3 -4.464282 2.275595 -8.924365 -0.004197941 0.1888013
The ci_low and ci_up are all both less than 0, while the pval is not significant.
I went back to the original code, I noticed that the 95% CI is derived from 1000 bootstrap. However, the P value is derived from t-statistics:
"P_Mode <- pt(abs(beta_Mode/se_Mode), df = length(b_exp) - 1, lower.tail = F) * 2"
I guess the problem was the set-up of 'df = length(b_exp) - 1'. If we are estimating p value from bootstrap, should the dr = number of bootstrap -1 ? In my case, I only used 3 SNPs, if df = length(b_exp) - 1, then here the df is 2, which makes the p value really big ...which is inconsistent with 95% CI...
Thank you very much,
Yvonne & Huan
The text was updated successfully, but these errors were encountered: