ManhattanPlot: Manhattan Plot

Description Usage Arguments Author(s) Examples

View source: R/ManhattanPlot.R

Description

Produces a Manhattan plot of marginal predictor evidence from a Reversible Jump Results object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
ManhattanPlot(
  results = NULL,
  plot.quantity = "PosteriorProbability",
  results.vector = NULL,
  covariates.to.include = NULL,
  var.dictionary = NULL,
  plot.title = "Manhattan Plot",
  y.max = NULL,
  add.bonferroni = FALSE,
  top.hits = NULL,
  X.mat = NULL,
  point.cols = NULL,
  point.labs = NULL,
  include.var.names.on.x.axis = TRUE
)

Arguments

results

A R2BGLiMS_Results-class object frum running the R2BGLiMS command.

plot.quantity

Can be "PosteriorProbability" (default), "BayesFactor", "ABF", or "pvalue". The latter is implemented to allow easy comparison between analysis frameworks using the same plot style, and only works if a vector of p-values is supplied. ABF is for plotting Approximate Bayes Factors in favour of the null (i.e. small values correspond to evidence of association), as proposed in Wakefield, J. (2009). Genetic Epidemiology.

results.vector

Alternatively can simply pass a named vector of probabilties

covariates.to.include

Character vector indicating a subset of covariates to include in the plot.

var.dictionary

Character vector containing a mapping of covariate names to substitutions for the plot. The names of the elements are the variable names as in the original analysis (i.e. as named in the results object).

plot.title

Optional character string to name the plot with

y.max

If plotting Bayes Factors, this is an optional upper limit for the y-axis (e.g. to make comparison with a different set of results easier on the eye). Note that if p-values are being plotted, then this can be used to supply the maximum -log10(p-value) on the y-axis.

add.bonferroni

If plotting p-values this option draws a dashed red line at the Bonferroni threshold. (default is TRUE).

top.hits

If a list of "top hits" are provided here, along with the original X matrix below, then the points are coloured according to their pairwise correlation with the "top hits" (default NULL)

X.mat

Must be provided if top.hits are provided above - used to calculate pairwise correlations.

point.cols

Optional vector of colours to use for the points (as many and in the same order as the covariates)

point.labs

Optional vector of labels to use for the points (as many and in the same order as the covariates)

include.var.names.on.x.axis

Set to TRUE to avoid adding x tick mark labels (e.g. if there are many many variables)

Author(s)

Paul Newcombe

Examples

1
2
3
4
5
6
library(R2BGLiMS)

### --- Logistic regression with two model space prior components
# Load results from the biopsy logistic regression analysis (see R2MHRJ examples)
data(biopsyResults)
ManhattanPlot(biopsyResults)

pjnewcombe/R2BGLiMS documentation built on Feb. 10, 2020, 8:52 p.m.