1 |
MAF |
|
MAF.cutoff |
|
prop.caus |
|
c |
|
prop.pos |
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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.