rt_plot_2_proportions_test: plots the proportions with confidence intervals according to...

View source: R/stats.R

rt_plot_2_proportions_testR Documentation

plots the proportions with confidence intervals according to prop.test

Description

plots the proportions with confidence intervals according to prop.test

Usage

rt_plot_2_proportions_test(
  prop_1,
  prop_2,
  categories,
  groups = NULL,
  confidence_level = 0.95,
  show_confidence_values = TRUE,
  axes_flip = FALSE,
  axis_limits = NULL,
  text_size = 4,
  line_size = 0.35,
  base_size = 11,
  x_label = "",
  y_label = "",
  group_name = "",
  title = "",
  subtitle = NULL,
  caption = NULL
)

Arguments

prop_1

vector with two values c(numerator, denominator)

prop_2

vector with two values c(numerator, denominator)

categories

categories

groups

vector of groups/categories to plot, seperated by color

confidence_level

the confidence level (e.g. 0.95) passed to prop.test

show_confidence_values

show the high/low confidence values

axes_flip

flip axes

axis_limits

custom limits for the corresponding axis (x if not axes_flip, y if axes_flip)

text_size

text size (proportion value)

line_size

the line size for the error bars

base_size

uses ggplot's base_size parameter for controling the size of the text

x_label

label for x-axis

y_label

label for y-axis

group_name

when using 'groups', used for the legend in the plot

title

overwrites default title of "Confidence Intervals of Two Proportions"

subtitle

subtitle

caption

expands on default caption giving p-value


shane-kercheval/rtools documentation built on July 7, 2022, 8:31 a.m.