dot_plot: creates a dot-plot of safety data showing the absolute and...

View source: R/dot_plot.R

dot_plotR Documentation

creates a dot-plot of safety data showing the absolute and relative risks

Description

creates a dot-plot of safety data showing the absolute and relative risks

Usage

dot_plot(
  safety,
  type = c("non_serious", "serious"),
  reference = safety$GROUP$title[1],
  size = 95,
  text_width = 10,
  base = 2,
  valid_estimates = TRUE
)

Arguments

safety

an object created by safety_summary or by relative_risk, in case you want to re-order or filter the choice of rows.

type

a choice of "non_serious" (default) or "serious" as to which type of AE to report on

reference

character vector nameing the refenrence arm for teh calculations. Defualts to the first row of the safety$GROUP.

size

a number between 0-100, giving the size of the confidence interval. Default is 95.

text_width

Integer giving a target width to which the labels are wrapped. Defaults to 10.

base

numeric value to which a log scale uses as tick marks. Suggest powers of 2, or 5.

valid_estimates

a logical, which determines if only terms with valid estimates of relative risk are included in the table. The alternative is to include terms with zeroes.

Value

a graphical object that shows the estimates and CI of relative and absolute risk.

See Also

safety_summary relative_risk [relative_risks()]

Examples

safety_statistics <- safety_summary(safety,
           exposed=c("Experimental"=60,"Control"=67))
head( relative_risk(safety_statistics, type="serious") )
dot_plot(safety_statistics, type="non_serious", base=4)

eudract documentation built on Aug. 10, 2023, 1:10 a.m.