Get_Betas: Get effect sizes for causal variants

Usage Arguments Examples

View source: R/Get_Betas.R

Usage

1
Get_Betas(MAF, MAF.cutoff, prop.caus, c, prop.pos)

Arguments

MAF
MAF.cutoff
prop.caus
c
prop.pos

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (MAF, MAF.cutoff, prop.caus, c, prop.pos) 
{
    p = length(MAF)
    Beta = rep(0, p)
    for (i in 1:p) {
        if (MAF[i] < MAF.cutoff && rnorm(1) < prop.caus && MAF[i] > 
            0) {
            Beta[i] = -c * log10(MAF[i]) * (2 * rbinom(1, 1, 
                prop.pos) - 1)
        }
    }
    return(Beta)
  }

lin-lab/CEPSKAT documentation built on May 29, 2019, 3:41 a.m.