View source: R/autoplot.simsum.R
autoplot.simsum | R Documentation |
autoplot
can produce a series of plot to summarise results of simulation studies. See vignette("C-plotting", package = "rsimsum")
for further details.
## S3 method for class 'simsum'
autoplot(
object,
type = "forest",
stats = "nsim",
target = NULL,
fitted = TRUE,
scales = "fixed",
top = TRUE,
density.legend = TRUE,
zoom = 1,
zip_ci_colours = "yellow",
...
)
object |
An object of class |
type |
The type of the plot to be produced. Possible choices are: |
stats |
Summary statistic to plot, defaults to |
target |
Target of summary statistic, e.g. 0 for |
fitted |
Superimpose a fitted regression line, useful when |
scales |
Should scales be fixed ( |
top |
Should the legend for a nested loop plot be on the top side of the plot? Defaults to |
density.legend |
Should the legend for density and hexbin plots be included? Defaults to |
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. |
zip_ci_colours |
A string with (1) a hex code to use for plotting coverage probability and its Monte Carlo confidence intervals (the default, with value |
... |
Not used. |
A ggplot
object.
data("MIsim", package = "rsimsum")
s <- rsimsum::simsum(
data = MIsim, estvarname = "b", true = 0.5, se = "se",
methodvar = "method", x = TRUE
)
library(ggplot2)
autoplot(s)
autoplot(s, type = "lolly")
autoplot(s, type = "est_hex")
autoplot(s, type = "zip", zoom = 0.5)
# 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")
)
autoplot(s1, stats = "bias", type = "nlp")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.