autoplot.summary.multisimsum: autoplot method for summary.multisimsum objects

Description Usage Arguments Value Examples

View source: R/autoplot.summary.multisimsum.R

Description

autoplot method for summary.multisimsum objects

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## S3 method for class 'summary.multisimsum'
autoplot(
  object,
  par,
  type = "forest",
  stats = "nsim",
  target = NULL,
  fitted = TRUE,
  scales = "fixed",
  top = TRUE,
  density.legend = TRUE,
  zoom = 1,
  ...
)

Arguments

object

An object of class summary.multisimsum.

par

The parameter results to plot.

type

The type of the plot to be produced. Possible choices are: forest, lolly, zip, est, se, est_ba, se_ba, est_density, se_density, est_hex, se_hex, est_ridge, se_ridge, heat, nlp, with forest being the default.

stats

Summary statistic to plot, defaults to bias. See summary.simsum() for further details on supported summary statistics.

target

Target of summary statistic, e.g. 0 for bias. Defaults to NULL, in which case target will be inferred.

fitted

Superimpose a fitted regression line, useful when type = (est, se, est_ba, se_ba, est_density, se_density, est_hex, se_hex). Defaults to TRUE.

scales

Should scales be fixed (fixed, the default), free (free), or free in one dimension (free_x, free_y)?

top

Should the legend for a nested loop plot be on the top side of the plot? Defaults to TRUE.

density.legend

Should the legend for density and hexbin plots be included? Defaults to TRUE.

zoom

A numeric value between 0 and 1 signalling that a zip plot should zoom on the top x% of the plot (to ease interpretation). Defaults to 1, where the whole zip plot is displayed.

...

Not used.

Value

A ggplot object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data("frailty", package = "rsimsum")
ms <- multisimsum(
  data = frailty,
  par = "par", true = c(trt = -0.50, fv = 0.75),
  estvarname = "b", se = "se", methodvar = "model",
  by = "fv_dist", x = TRUE
)
sms <- summary(ms)

library(ggplot2)
autoplot(sms, par = "trt")
autoplot(sms, par = "trt", type = "lolly", stats = "cover")
autoplot(sms, par = "trt", type = "zip")
autoplot(sms, par = "trt", type = "est_ba")

rsimsum documentation built on May 21, 2021, 5:06 p.m.