stat_binomCI: Compute confidence interval of a parameter of the binomial...

View source: R/stat_binomCI.R

stat_binomCIR Documentation

Compute confidence interval of a parameter of the binomial distribution

Description

Draw confidence interval of a parameter of the binomial distribution.

Usage

stat_binomCI(mapping = NULL,
  data = NULL,
  geom = "linerange",
  position = "identity",
  na.rm = FALSE,
  show.legend = NA,
  inherit.aes = TRUE,
  conf.level = 0.95, ...)

Arguments

mapping

The aesthetic mapping, usually constructed with aes or aes_string. Only needs to be set at the layer level if you are overriding the plot defaults.

data

A layer specific dataset - only needed if you want to override the plot defaults.

geom

The geometric object to use display the data

position

The position adjustment to use for overlappling points on this layer

na.rm

If FALSE, the default, missing values are removed with a warning. If TRUE, missing values are silently removed.

show.legend

logical. Should this layer be included in the legends? NA, the default, includes if any aesthetics are mapped. FALSE never includes, and TRUE always includes. It can also be a named logical vector to finely select the aesthetics to display.

inherit.aes

The position adjustment to use for overlappling points on this layer

conf.level

confidence level for the returned confidence interval.

...

other arguments passed on to layer. This can include aesthetics whose values you want to set, not map. See layer for more details.

Examples

entry0117 <- searchConsole[searchConsole$pagePath=="/entry/2015/01/17/064522",]
ggplot(entry0117, aes(date, clicks/impressions)) +
  geom_line()+
  stat_binomCI(geom = "ribbon", aes(numerator=clicks, denominator=impressions), alpha=0.3)

abikoushi/ggsomestat documentation built on March 21, 2024, 7:03 a.m.