Skip to content

Instantly share code, notes, and snippets.

View thibautjombart's full-sized avatar

Thibaut Jombart thibautjombart

View GitHub Profile
@thibautjombart
thibautjombart / prop_ci.R
Last active July 10, 2020 08:33
Function prop_ci() to calculate Binomial confidence intervals for proportions
#' Binomial confidence intervals for proportions
#'
#' This function uses `binom.test` to derive estimates of the confidence interval
#' for proportions.
#'
#' @param k number of successes
#'
#' @param n number of trials
#'
#' @param conf confidence level (1 - alpha), defaults to 0.95