ssize: Estimation of sample sizes for a proportion

Description Usage Arguments Examples

View source: R/ssize.R

Description

This function provides flexibility to estimate margins of errors of a proportion assuming different population sizes, confidence levels, design effects (DEff), and response rates.

Usage

1
ssize(e, deff = 1, rr = 1, N = NULL, cl = 0.95, p = 0.5)

Arguments

e

Expected margin of error.

deff

Design effect (DEff). Generally, from studies and estimations. Values should be higher than 0.

rr

Proportion representing expected response rate, it migth higher than 0 and lower than 1.

N

Population size. If the population size is not specified, MOEs are estimated using an infinite population formula.

cl

Confidence levels, e.g., .95

p

Value or vector of values with the expected proportion.

Examples

1
2
ssize(e = 0.02, deff = 1.5, rr = .8, N = 1000)
ssize(e = 0.05)

sdaza/sampler documentation built on June 22, 2020, 4:51 a.m.