Learn R Programming

rsimsum (version 0.3.1)

pattern.multisimsum: pattern method for multisimsum objects

Description

pattern() method for objects of class multisimsum.

Usage

# S3 method for multisimsum
pattern(obj, par = NULL, gpars = list(), ...)

Arguments

obj

An object of class multisimsum.

par

Estimand to plot.

gpars

Graphical parameters. Must be a named list, with possible parameters:

  • alpha, alpha value of each point on the scatterplot;

  • scales, scale of x and y axis of each facet. It is possible to redefine all the graphical parameters or a subset only; if not specified, sensible default values will be utilised. Good practice would be adding a colorblind-safe palette, e.g. using ggthemes::scale_color_colorblind().

...

Ignored.

Value

A ggplot2::ggplot() object that can be combined with additional geom_*, scale_*, theme_*, etc.

Details

If par = NULL (the default), all estimands are plotted and included as faceting variables.

Examples

Run this code
# NOT RUN {
library(rsimsum)
library(ggplot2)
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)
pattern(ms)
pattern(ms, par = "trt")
# }

Run the code above in your browser using DataLab