Learn R Programming

rsimsum (version 0.3.3)

pattern.simsum: pattern method for simsum objects

Description

pattern() method for objects of class simsum.

Usage

# S3 method for simsum
pattern(obj, gpars = list(), ...)

Arguments

obj

An object of class simsum.

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

pattern() requires simsum and multisimsum objects top be fit with the x = TRUE option.

Examples

Run this code
# NOT RUN {
library(rsimsum)
library(ggplot2)
data("relhaz", package = "rsimsum")
s <- simsum(data = relhaz, estvarname = "theta", true = -0.5, se = "se",
  methodvar = "model", by = c("n", "baseline"), x = TRUE)
pattern(s)
# }

Run the code above in your browser using DataLab