beta/or, se, p, zscore换算总结帖(20211014更新)


对GWAS的summary文件进行整合时,经常需要在beta,or, se, p, zscore之间进行换算,故在此总结一下​。希望对大家有帮助。

1. se 计算

1.1 有 beta、p ,计算se;

se=sqrt(((beta)^2)/qchisq(p,1,lower.tail=F))

1.2 有 or、p ,计算se;

se=abs(log(or)/qnorm(p/2))

2. zscore计算

2.1 有 beta、p ,计算zscore;

c=-qnorm(p/2)

情况1:beta > 0,zscore = c
情况2:beta < 0,zscore = -c

2.2 有 or、p ,计算zscore;

c=qnorm(1-p/2)

情况1:or > 1,zscore = c
情况2:or < 1,zscore = -c

2.3 有 beta、se ,计算zscore;

zscore=beta/se

2.4 有 or、se ,计算zscore;

zscore=log(or)/se

注意:这里的se指的是log(or)的se,plink给出的se就是默认log(or)的se

3 beta 和 OR 的转换

beta to OR:

Beta= log(OR)

Assuming the confidence interval being used is 95%,the upper and lower bounds for the OR:

upper bound of OR = OR + se(OR) x 1.96
lower bound of OR = OR - se(OR) x 1.96
Log(upper bound of OR) = upper bound of beta
Log(lower bound of OR) = lower bound of beta
upper bound of beta = beta + se(beta) x 1.96
lower bound of beta = beta - se(beta) x 1.96
If you have the 95% C.I of beta, then calculating the SE(beta) is quite simple!
for example if beta = 0.5 and the upper C.I is 0.6 then
upper C.I of beta = beta + se(beta) x 1.96
0.6 = 0.5 + se x 1.96

以上所有的公式换算均在R环境下完成的。
此文感谢彭师姐和蔡大胖同学参与的讨论,以及 https://www.researchgate.net/post/How_can_I_calculate_beta_coefficient_and_its_error_from_Odds_Ratio_from_GWAS_summary_Statisitcs


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM