Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add calculation for percent variance explained #5

Open
kbeutel opened this issue Feb 21, 2023 · 1 comment
Open

Add calculation for percent variance explained #5

kbeutel opened this issue Feb 21, 2023 · 1 comment
Assignees

Comments

@kbeutel
Copy link
Contributor

kbeutel commented Feb 21, 2023

GSP needs to calculate the percent variance explained via a simple formula

@npankrat
Copy link
Member

npankrat commented Feb 21, 2023

PVE: estimated proportion of total variance explained using the formula from Shim et al. 2015 (https://doi.org/10.1371/journal.pone.0120758.s001)

All this needs is beta, SE, and sample size (N) to compute. Technically allele frequency is part of the computation as well, but since it's in the numerator and the denominator, the value doesn't affect the end result. Here is an example within Excel:

beta SE MAF N estRsq
-10.637 2.07 0.083534137 3735 0.007020167

Where the formula for estRsq is =2*POWER(A2,2)*C2*(1-C2)/(2*POWER(A2,2)*C2*(1-C2)+POWER(B2,2)*2*D2*C2*(1-C2))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants