# snpprior: snpprior In chr1swallace/GUESSFM: Using GUESS for Fine Mapping

## Description

(Beta) Binomial prior for number of SNPs in a model ' ' A binomial

## Usage

 ```1 2``` ```snpprior(x = 0:10, n, expected, overdispersion = 1, pi0 = NA, truncate = NA, overdispersion.warning = TRUE) ```

## 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 `overdispersion` overdispersion parameter. Setting this to 1 gives a binomial prior. Values < 1 are nonsensical: if you really believe the prior should be underdispersed relative to a binomial distribution, consider using a hypergeometric prior. `pi0` prior probability that no SNP is associated `truncate` optional, if supplied priors will be adjusted so models with x>truncate have prior 0 `overdispersion.warning` by default, prior distributions should be binomial or beta-binomial (overdispersed). If you give an overdispersion <1, snpprior will stop with an error. Set overdispersion.warning=FALSE to override this.

## Value

prior probabilities as a numeric vector

Chris Wallace

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19``` ```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 <- snpprior(x, n, xbar) plot(x, y, type="h") ## is equivalent to y1.0 <- snpprior(x, n, xbar, overdispersion=1.0) points(x, y1.0, col="red") ##larger values of overdispersion change the distribution: y1.1 <- snpprior(x, n, xbar, overdispersion=1.1) y1.5 <- snpprior(x, n, xbar, overdispersion=1.5) y2.0 <- snpprior(x, n, xbar, overdispersion=2.0) points(x, y1.1, col="orange") points(x, y1.5, col="pink") points(x, y2.0, col="green") ```

chr1swallace/GUESSFM documentation built on May 13, 2019, 6:17 p.m.