cs: Credible set

View source: R/cs.R

csR Documentation

Credible set

Description

Credible set

Usage

cs(tbl, b = "Effect", se = "StdErr", log_p = NULL, cutoff = 0.95)

Arguments

tbl

Input data.

b

Effect size.

se

Standard error.

log_p

if not NULL it will be used to derive z-statistic

cutoff

Threshold for inclusion.

Details

The function implements credible set as in fine-mapping.

Value

Credible set.

Examples

## Not run: 
\preformatted{
  zcat METAL/4E.BP1-1.tbl.gz | \
  awk 'NR==1 || ($1==4 && $2 >= 187158034 - 1e6 && $2 < 187158034 + 1e6)' > 4E.BP1.z
}
  tbl <- within(read.delim("4E.BP1.z"),{logp <- logp(Effect/StdErr)})
  z <- cs(tbl)
  l <- cs(tbl,log_p="logp")

## End(Not run)

gap documentation built on Aug. 26, 2023, 5:07 p.m.