prior.binomial: prior.binomial

Description Usage Arguments Value Author(s) Examples

Description

Binomial prior for number of SNPs in a model

Usage

1
2
  prior.binomial(x = 1:n, n = length(groups), expected,
    groups = NULL, pi0 = 0.2, value = c("odds", "prob"))

Arguments

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

Value

prior probability/ies or odds as a numeric

Author(s)

Chris Wallace

Examples

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")

chr1swallace/snpBMA documentation built on May 13, 2019, 6:19 p.m.