fplot: Make funnel plots

View source: R/fplot.R

fplotR Documentation

Make funnel plots

Description

Create a funnel plot from a dataframe containing at least two columns (i.e numerator and denominator) It is currently working only with binary outcome, continuous outcomes will be supported in future

Usage

fplot(
  data,
  outcome,
  num,
  denom,
  bm,
  ci1 = 0.95,
  ci2 = 0.998,
  cols = c("#F8766D", "#00BFC4", "#7CAE00"),
  site_name
)

Arguments

data

dataframe containing the numertaors and denominators

outcome

string health outcome (e.g. "inpatient mortality")

num

the name of the column in the dataframe which includes the numerator (e.g. numerator)

denom

the name of the column in the dataframe which includes the denominator (e.g. denominator)

bm

the benchamrk value

ci1

the alpha related to the first line of control limits (e.g. 0.95)

ci2

the alpha related to the second line of control limits (e.g 0.998)

cols

the colours used for the points above, within and below the control first control limits

site_name

the sites to be highlighted

Value

ggplot


farhadsalimi/registryr documentation built on June 24, 2022, 12:23 a.m.