piEst: Estimate population proportion and interval limits

View source: R/piEst.R

piEstR Documentation

Estimate population proportion and interval limits

Description

Estimate population proportion and interval limits from observede counts of succes and trials.

Usage

piEst(
  y = 12,
  n = 20,
  beta.priors = c(0.5, 0.5),
  credMass = 0.95,
  showPlot = FALSE,
  lateX = FALSE,
  ...
)

Arguments

y

counts of successes

n

counts of trials

beta.priors

vector of 2 non-negative parameters of the Beta prior distribution (shapes - by default Jeffrey's c(0.5,0.5))

credMass

mass of the HDI region

showPlot

if TRUE, show a graphical representation of Pi distribution

lateX

if TRUE, print lateX output

Value

Proportion estimates with HDI, CI (quantile c(.025,0.975)), and binomial CI (from binom.test)

Author(s)

JuG

Examples

piEst(y = 3, n = 12, showPlot = TRUE)
piEst(y = 3, n = 12, lateX = F)


jgodet/utilitR documentation built on May 16, 2024, 12:01 p.m.