Nothing
#' Function to determine the MUE estimate based on the beta distribution.
#'
#' This function calculates the median unbiased estimate for a single proportion.
#'
#' @param n Number of independent trials.
#' @param y Number of successes.
#' @return A number with the MUE estimate
#' @export
dobeta <- function(n,y){
# browser()
lower <- ifelse(y==0, 0, ifelse(y==n,.5 ** (1/n) , stats::qbeta(.5,y,n-y+1) ))
upper <- ifelse(y==0, 1-.5**(1/n), ifelse(y==n, 1 , stats::qbeta(.5,y+1,n-y) ))
mue <- (lower + upper) / 2
return(mue)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.