specs_control_plot: Draw a control grid plot.

View source: R/specs_plots.R

specs_control_plotR Documentation

Draw a control grid plot.

Description

specs_control_plot produces the control grid plot in a specification plot.

Usage

specs_control_plot(
  control_grid,
  palette = "green",
  control_geom = "rect",
  control_spacing = NULL,
  control_text_size = 9,
  trim_top = 0,
  ...
)

Arguments

control_grid

A dataframe with index (of the specs), key (name of a spec key) and value (0 or 1).

palette

Change the palette. Default to "green" for green-shaded plot. Change to "brown" for brown-shaded plot.

control_geom

A string indicating the geom that should be used to indicate the presence of controls. Currently supported are "circle" and "rect". Default to "rect".

control_spacing

A numeric scalar indicating how large the control geoms should be. For control_geom=="circle", this is the diameter of the circle. For control_geom=="rect", this is the width of the rectangle. Default to NULL and set to 0.75 if fewer than 40 specs and 1 otherwise.

control_text_size

A numeric scalar indicating how large the control name text should be. Default to 9.

trim_top

A numeric scalar indicating how close the bottom panel (displaying presence of controls) should be to the top panel (displaying presence of coefficients). Useful when dealing with large CIs. Default to 0.

...

Other arguments passed to ttr::theme_tt()

Value

A ggplot2 object depicting the control grid plot


ttecon/ttr documentation built on March 6, 2023, 7:36 a.m.