Creates a matrix containing the model descriptions and their associated priors.

GetModelPriorMatrix(DataSources, Models, ModelPriors, LogFile,
  SigmaAlphas = c(0.005, 0.0075, 0.01, 0.015, 0.02, 0.03, 0.04, 0.05,
  0.06, 0.07, 0.08, 0.09, 0.1, 0.15))

Arguments

DataSources

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

Models

A matrix describing the models being explored (default output from running bmass).

ModelPriors

A vector containing the priors on each model across each tranche of sigma alpha (default output from running bmass; length is number of models times number of sigma alphas).

LogFile

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

SigmaAlphas

A vector containing the different values traversed for this 'effect size controlling' hyperparameter (see "Prior on Sigma_Alpha" in Stephens 2013 PLoS ONE, https://doi.org/10.1371/journal.pone.0065245).

Value

A matrix containing the original description of each model sort by prior, each model's trained prior, the cummulative prior distribution, and the model's original order position.

Examples

Phenotypes <- c("bmass_SimulatedData1", "bmass_SimulatedData2") bmassOutput <- bmass(Phenotypes,bmass_SimulatedSigSNPs) bmassOutput[c("ModelPriorMatrix", "LogFile")] <- GetModelPriorMatrix(Phenotypes, bmassOutput$Models, bmassOutput$ModelPriors, bmassOutput$LogFile) head(bmassOutput$ModelPriorMatrix)
#> bmass_SimulatedData1 bmass_SimulatedData2 Prior Cumm_Prior OrigOrder #> 1 1 1 1.000000e+00 1 5 #> 2 1 2 8.553556e-143 1 8 #> 3 2 1 6.643107e-155 1 6 #> 4 0 0 0.000000e+00 1 1 #> 5 1 0 0.000000e+00 1 2 #> 6 2 0 0.000000e+00 1 3