autoplot can produce a series of plot to summarise results of simulation studies. See vignette("plotting", package = "rsimsum") for further details.

# S3 method for simsum
autoplot(object, type = "forest", stats = "bias",
  target = NULL, fitted = TRUE, scales = "fixed", top = TRUE, ...)

Arguments

object

An object of class simsum.

type

The type of the plot to be produced. Possible choices are: forest, lolly, zip, est, se, est_ba, se_ba, 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). 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.

...

Not used.

Value

A ggplot object.

Examples

data("MIsim", package = "rsimsum") s <- rsimsum::simsum( data = MIsim, estvarname = "b", true = 0.5, se = "se", methodvar = "method", x = TRUE )
#> 'ref' method was not specified, CC set as the reference
library(ggplot2) autoplot(s)
autoplot(s, type = "lolly")
# Nested loop plot: data("nlp", package = "rsimsum") s1 <- rsimsum::simsum( data = nlp, estvarname = "b", true = 0, se = "se", methodvar = "model", by = c("baseline", "ss", "esigma") )
#> 'ref' method was not specified, 1 set as the reference
autoplot(s1, stats = "bias", type = "nlp")