mamba: Fit the MAMBA model.

Description Usage Arguments Value Examples

View source: R/source1.R

Description

Fit the MAMBA model.

Usage

1
2
3
mamba(betajk, sjk2, parcores = 1, p = 0.003, lambda = 0.96,
  tau2 = 2e-04, alpha = 3, rel.eps = 1e-08, verbose = 1,
  snpids = NA, maxIter = 10^4L)

Arguments

betajk

Mxk matrix of effect size estimates, where row j corresponds to j-th SNP, and column k corresponds to k-th study . Missing values can be represented with NA.

sjk2

Mxk matrix of effect size estimate variances, where row j corresponds to SNP j, and column k corresponds to study k. Missing values can be represented with NA.

p

initial value for EM algorithm, for the proportion of non-zero SNPs

lambda

initial value for EM algorithm, for the proportion of non-replicable SNPs which are well behaved, or non-outliers.

tau2

initial value for EM algorithm, for the variance of replicable non-zero effect SNPs.

alpha

initial value for EM algorithm, for the variance inflation of outlier summary statistics at non-replicable SNPs.

rel.eps

threshold for when to end EM algorithm. rel.eps = (ll[i] - ll[i-1])/ll[i], where ll[i] is the log-likelihood at iteration i.

snpids

an optional vector of SNP id names. If not provided, the ID's will be 1:M, corresponding to the order of the matrix betajk.

maxIter

maximum # of EM iterations.

Value

A list containing

Examples

1
2
  d<-generate_data_mamba()
  mod<-mamba(betajk=d$betajk, sjk2=d$sjk2)

dan11mcguire/mamba documentation built on Nov. 10, 2020, 12:37 a.m.