marginalone: Marginal PP for models sharing information between diseases

Description Usage Arguments Details Value Author(s)

View source: R/marginalone.R

Description

Calculate marginal model posterior probabilities for one disease incorporating information from others

Usage

1
marginalone(STR, ABF, PP, pr, kappa, p0, fthr = 0.99, N0, ND)

Arguments

STR

list of models for diseases 1, 2, ..., n, each given in the form of a character vector, with entries "snp1%snp2%snp3". The null model is given by "1" OR "0". It is assumed that all elements of ABF, PP and pr below follow this same order.

ABF

list of log(ABF) vectors for diseases 1, 2, ...

PP

list of posterior probability vectors for diseases 1, 2, ...

pr

list of prior probabilities for the models in STR

kappa

single value or vector of values to consider for the sharing scale parameter. the value of kappa=1 must be included, and if not will be prepended.

p0

prior probability of the null model

fthr

models for all but the first disease are retained if their cumsum(PP) < fthr. Ie set PP[j]=0 if SNP j is not in the smallest set of SNPs that satisfy cumsum(PP) < fthr. This is an APPROXIMATION, eps should be as close to 1 as your computing facilities allow.

N0

number of shared controls

ND

list of number of cases for a set of diseases

Details

Given a list of model matrices and log ABFs, this function calculates the marginal model posterior probabilities for thr FIRST disease without ever calculating the joint Bayes Factors for all cross-disease model configurations, which would require large amounts of memory.

This aims to be faster than marginalpp by ignoring contributions from other diseases to models with individual PP < eps. This is an approximation, and the effects of having too large an eps may induce inaccuracies. However, if you want to pull in information from several diseases, this may be the only way to do it within achievable computer time.

Value

list of: - single.pp: list of pp for each model in STR[[i]] for disease i - shared.pp: list of pp for each model in STR[[i]] for disease i, - STR: not quite as input, reordered so null model is first row - ABF: not quite as input, repordered so null model is first row - kappa: as supplied

Author(s)

Chris Wallace


jennasimit/MTFM documentation built on Aug. 15, 2019, 6:14 p.m.