forestPlot-PCOSP_or_ClinicalModel-method: Render a forest plot from the 'validationStats' slot of a...

Description Usage Arguments Value Examples

Description

Render a forest plot from the validationStats slot of a PCOSP model object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## S4 method for signature 'PCOSP_or_ClinicalModel'
forestPlot(
  object,
  stat,
  groupBy = "mDataType",
  colourBy = "isSummary",
  vline,
  ...,
  xlab,
  ylab,
  transform,
  colours,
  title
)

Arguments

object

A PCOSP model which has been validated with validateModel and therefore has data in the validationStats slot.

stat

A character vector specifying a statistic to plot.

groupBy

A character vector with one or more columns in validationStats to group by. These will be the facets in your forestplot.

colourBy

A character vector specifying the columns in validationStats to colour by.

vline

An integer value on the x-axis to place a dotted vertical line.

...

Force subsequent parameters to be named, not used.

xlab

A character vector specifying the desired x label. Automatically guesses based on the stat argument.

ylab

A character vector specifying the desired y label. Defaults to 'Cohort (P-value)'.

transform

The name of a numeric function to transform the statistic before making the forest plot.

colours

A character vector of colours to pass into ggplot2::scale_fill_manual, which modify the colourBy argument.

title

A character vector with a title to add to the plot.

Value

A ggplot2 object.

Examples

1
2
3
4
data(sampleValPCOSPmodel)

# Plot
dIndexForestPlot <- forestPlot(sampleValPCOSPmodel, stat='log_D_index')

bhklab/PanCuRx documentation built on Dec. 30, 2021, 4:59 p.m.