RapidoPGS (version 2.3.0)

sdY.est: Estimate trait variance, internal function

Description

Estimate trait standard deviation given vectors of variance of coefficients, MAF and sample size

Usage

sdY.est(vbeta, maf, n)

Value

estimated standard deviation of Y

Arguments

vbeta

vector of variance of coefficients

maf

vector of MAF (same length as vbeta)

n

sample size

Author

Chris Wallace

Details

Estimate is based on var(beta-hat) = var(Y) / (n * var(X)) var(X) = 2* maf*(1-maf) so we can estimate var(Y) by regressing n*var(X) against 1/var(beta) This function is verbatim from its namesake in coloc package (github.com/chr1swallace/coloc/), by Chris Wallace