Skip to contents

Create confidence interval grob

Usage

makeci(
  est,
  lower,
  upper,
  pch,
  sizes = 1,
  gp = gpar(),
  t_height = NULL,
  xlim = c(0, 1),
  nudge_y = 0,
  name = NULL
)

Arguments

est

Point estimation. Can be a list for multiple columns and/or multiple groups. If the length of the list is larger than then length of ci_column, then the values reused for each column and considered as different groups.

lower

Lower bound of the confidence interval, same as est.

upper

Upper bound of the confidence interval, same as est.

pch

Numeric or character vector indicating what sort of plotting symbol to use. See pointsGrob.

sizes

Size of the point estimation box, can be a vector or a list. The value is a multiple of one line of text, so 1 draws a point as tall as the base_size of the theme. The same scale applies to the summary diamond. Values are used as they are, unless scale_sizes is used to read them as study weights; useful values are roughly between 0.2 and 1.5, and a warning is given when the plot is drawn if they are outside 0.1 to 2.

gp

Graphical parameters of gpar. Please refer to forest_theme for more details.

t_height

The height of the confidence interval line end vertices. If the value is NULL (default), no vertices will be drawn.

xlim

Limits for the x-axis as a vector of length 2, i.e. c(low, high). By default the minimum and maximum of the lower and upper values are used.

nudge_y

Vertical adjustment to nudge groups by, must be within 0 to 1. Defaults to 0; for grouped forest plots a value of 0 is bumped to 0.1 automatically so that group CIs do not overplot. Set explicitly to override.

name

Name of the grob.

Value

A gTree object