Obtain confidence interval for corrected coverage estimate using estimated effect sizes and their standard errors

corrcov_CI_bhat(bhat, V, N0, N1, Sigma, thr, W = 0.2, nrep = 1000,
  CI = 0.95, pp0min = 0.001)

Arguments

bhat

Estimated effect sizes from single-SNP logistic regressions

V

Variance of estimated effect sizes

N0

Number of controls

N1

Number of cases

Sigma

SNP correlation matrix

thr

Minimum threshold for fine-mapping experiment

W

Prior for the standard deviation of the effect size parameter beta

nrep

The number of simulated posterior probability systems to consider for the corrected coverage estimate (nrep = 1000 default)

CI

The size of the confidence interval (as a decimal)

pp0min

Only average over SNPs with pp0 > pp0min

Value

CI for corrected coverage estimate

Examples

# \donttest{ # this is a long running example set.seed(1) nsnps <- 100 N0 <- 5000 # number of controls N1 <- 5000 # number of cases ## generate example LD matrix library(mvtnorm) nsamples = 1000 simx <- function(nsnps, nsamples, S, maf=0.1) { mu <- rep(0,nsnps) rawvars <- rmvnorm(n=nsamples, mean=mu, sigma=S) pvars <- pnorm(rawvars) x <- qbinom(1-pvars, 1, maf) } S <- (1 - (abs(outer(1:nsnps,1:nsnps,`-`))/nsnps))^4 X <- simx(nsnps,nsamples,S) LD <- cor2(X) maf <- colMeans(X) varbeta <- Var.data.cc(f = maf, N = N0 + N1, s = N1/(N0+N1)) bhats = rnorm(nsnps,0,0.2) # log OR corrcov_CI_bhat(bhat = bhats, V = varbeta, N0, N1, Sigma = LD)
#> Error in credsetmat(pp, CV, thr): argument "thr" is missing, with no default
# }