wakefield_pp: compute posterior probabilities using Wakefield's approximate...

Description Usage Arguments Value

View source: R/cupfunc.R

Description

compute posterior probabilities using Wakefield's approximate Bayes Factors wakefield_pp computes posterior probabilities for a given SNP to be causal for a given SNP under the assumption of a single causal variant.

Usage

1
wakefield_pp(p, f, N, s, pi_i = 1e-04, sd.prior = 0.2)

Arguments

p

a vector of univariate pvalues from a GWAS

f

a vector of minor allele frequencies taken from some reference population.

N

a scalar or vector for total sample size of GWAS

s

a scalar representing the proportion of cases (n.cases/N)

pi_i

a scalar representing the prior probability (DEFAULT 1 \times 10^{-4})

sd.prior

a scalar representing our prior expectation of β (DEFAULT 0.2). The method assumes a normal prior on the population log relative risk centred at 0 and the DEFAULT value sets the variance of this distribution to 0.04, equivalent to a 95% belief that the true relative risk is in the range of 0.66-1.5 at any causal variant.

Value

a vector of posterior probabilities.


ollyburren/cupcake documentation built on July 30, 2020, 9:58 a.m.