plot.simBA {sim.BA}R Documentation

Plot the results of a simulation

Description

plot() plots the output of a call to simBA(). The plot can contain either the estimated hazard ratios or standardized mean differences across simulations, each in a set of box plots.

Usage

## S3 method for class 'simBA'
plot(x, type = "balance", ...)

Arguments

x

a simBA object; the output of a call to simBA().

type

the type of plot to produce; allowable options include "balance" (default), "hr", and "bias". Abbreviations allowed. See Details.

...

further arguments passed to ggplot2::geom_boxplot().

Details

The balance plot plots absolute standardized mean differences. Vertical lines are placed at 0 (solid) and .1 (dashed). The hazard ratio (HR) plot plots hazard ratios on a log scale for the x-axis. Vertical lines are placed at 1 (solid) and the true marginal HR (dashed). The bias plot plots the relative error in the HR with a vertical line at 0% (indicating no error).

Value

A ggplot object, which can be modified using ggplot2 syntax.

See Also

simBA() for performing the simulation.

Examples

# See help("simBA") for examples.


[Package sim.BA version 0.1.0 Index]