Learn R Programming

uwo4419 (version 0.3.0)

propci: Approximate and Exact Confidence Intervals for Proportions

Description

Produces confidence intervals for proportions through normal approximation and using exact methods based on the Beta distribution.

Usage

propci(x, n=NULL, conf.level=.95)

Arguments

x

An integer value representing the number of ones (successes) or a variable with only zeros, ones and (potentially) NAs.

n

If x is an integer, then n is the total number of observations from which the number of successes comes. Otherwise, n will be disregarded.

conf.level

Level of confidence for the interval

Value

A matrix giving the normal approximation and exact confidence intervals.

Examples

Run this code
# NOT RUN {
data(alberta)
propci(alberta$sex-1)
# }

Run the code above in your browser using DataLab