sdY.correction: Estimate trait variance, internal function

View source: R/gr-wrenches.R

sdY.correctionR Documentation

Estimate trait variance, internal function

Description

Estimate trait standard deviation given vectors of variance of coefficients, MAF and sample size, and correct BETA and SE.

Usage

sdY.correction(beta, se, maf, n)

Arguments

beta

vector of coefficients

se

vector of standard error of coefficients

maf

vector of MAF (same length as beta and se)

n

sample size

Details

For studies of quantitative traits, measurements can come in different scales, leading to differences in standard deviation of the effects. This function estimates the trait standard deviation from MAF and sample size, and by dividing beta and se by this estimate we can make var.beta = 1, thus making different datasets of quantitative traits in different scales comparable.

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 is an adaptation of sdY.est function, by Chris Wallace

Value

a list containing adjusted Beta and SE by estimated standard deviation of Y

Author(s)

Guillermo Reales, Chris Wallace


GRealesM/IMDtools documentation built on Oct. 3, 2023, 10:04 a.m.