forestPlot,PCOSP_or_ClinicalModel-method {PDATK}R Documentation

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

Description

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

Usage

## 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

data(sampleValPCOSPmodel)

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


[Package PDATK version 1.1.3 Index]