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