Description Usage Arguments Value Author(s) Examples
Binomial prior for number of SNPs in a model
1 2 | prior.binomial(x = 1:n, n = length(groups), expected,
groups = NULL, pi0 = 0.2, value = c("odds", "prob"))
|
x |
number of SNPs in a model (defaults to 1:length(groups), ie returns a vector) |
n |
total number of SNPs or SNP groups available |
expected |
expected number of SNPs in a model |
groups |
groups of SNPs, from which at most one SNP should be selected |
pi0 |
prior probability that no SNP is associated |
value |
"odds" or "prob" for prior odds (relative to pi0) or prior probabilities |
prior probability/ies or odds as a numeric
Chris Wallace
1 2 3 4 5 6 7 | n<-100 # 100 SNPs in region
x <- 1:10 # consider prior for up to 10 causal SNPs
xbar <- 3 # expect around 3 causal
## a binomial prior
y <- prior.binomial(x, n, xbar)
plot(x, y, type="h")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.