GetTopModelsPerSNPViaPosteriors {bmass}R Documentation

Get Top Multivariate Models

Description

Get a summary of the top models per SNP across all multivariate {U,D,I} combinations based on posterior probabilities.

Usage

GetTopModelsPerSNPViaPosteriors(DataSources, ListSNPs, ModelPriorMatrix,
  LogFile)

Arguments

DataSources

A string indicating the variable names of the input datafiles and phenotypes.

ListSNPs

A list produced from running bmass containing the SNPs of interest to get marginal posteriors for.

ModelPriorMatrix

A matrix detailing the models being explored and their associated priors (obtained by running GetModelPriorMatrix)

LogFile

A matrix of string outputs for function logging purposes (default output from running bmass).

Value

A matrix containing each model that was a SNP's top model at least once, along with related information; this matrix is appended to the input ListSNPs as a new object, TopModels (the full returned object is a list containing the input ListSNPs and the input LogFile).

Examples

Phenotypes <- c("bmass_SimulatedData1", "bmass_SimulatedData2")
bmassOutput <- bmass(Phenotypes, bmass_SimulatedSigSNPs)
bmassOutput[c("ModelPriorMatrix", "LogFile")] <- 
  GetModelPriorMatrix(Phenotypes, bmassOutput$Models,
  bmassOutput$ModelPriors, bmassOutput$LogFile)
bmassOutput[c("PreviousSNPs", "LogFile")] <-
  GetTopModelsPerSNPViaPosteriors(Phenotypes,
  bmassOutput$PreviousSNPs, bmassOutput$ModelPriorMatrix, bmassOutput$LogFile)
head(bmassOutput$PreviousSNPs$TopModels)


[Package bmass version 1.0.3 Index]