credset: Credible set of genetic variants

Description Usage Arguments Details Value Author(s) Examples

View source: R/extra_functions.R

Description

Credible set of putative causal variants

Usage

1
credset(pp, CV, thr)

Arguments

pp

Vector of posterior probabilities of causality

CV

Optional parameter: Index of CV

thr

Minimum threshold for credible set size

Details

If the CV parameter is supplied (index of causal variant) then the output includes a binary indicator of whether the CV is contained in the set

Value

list of the variants in the credible set, the claimed.cov (cumulative sum of the posterior probabilities of the variants forming the credible set), binary covered indicator (1 if CV is contained in the credible set) and nvar (number of variants in the set)

Author(s)

Anna Hutchinson

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
set.seed(1)
nsnps <- 100
pp <- rnorm(nsnps, 0.3, 0.05)
pp <- pp/sum(pp)

credset(pp, thr = 0.9)

iCV <- 71

credset(pp, CV = iCV, thr = 0.9)

corrcoverage documentation built on Dec. 7, 2019, 1:07 a.m.