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

View source: R/stats.R

rt_plot_proportionsR Documentation

plots the proportions with confidence intervals according to prop.test. This should not be used for multi-nomial variables. Only use for >=1 binary variables.

Description

According to the the descriptionof the MultinomCI package:

Usage

rt_plot_proportions(
  numerators,
  denominators,
  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

numerators

numerators

denominators

denominators

categories

categories

groups

vector of groups/categories to plot, seperated by color

confidence_level

the confidence level (e.g. 0.95) passed to MultinomCI.

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

title

subtitle

subtitle

caption

caption

Details

> Confidence intervals for multinomial proportions are often approximated by single binomial confidence intervals, which might in practice often yield satisfying results, but is properly speaking not correct. This function calculates simultaneous confidence intervals for multinomial proportions either according to the methods of Sison and Glaz, Goodman, Wald, Wald with continuity correction or Wilson.


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