serr: Estimation of margins of errors (MOEs) for a proportion

Description Usage Arguments Examples

View source: R/serr.R

Description

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

Usage

1
2
serr(n, deff = 1, rr = 1, N = NULL, cl = 0.95, p = 0.5,
  relative = FALSE)

Arguments

n

Size of the sample.

deff

Design effect (DEff) provided from previous studies or design estimations (e.g., 1.5).

rr

Proportion representing expected response rate, it migth be 0 or more, and less than 1.

N

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

cl

Confidence levels, e.g., .95

p

Value or vector of values with the expected proportion of each stratum.

relative

Logical parameter. Estimate a relative error if TRUE.

Examples

1
serr(n = 400, deff = 1.5, rr = .8, N = 1000)

sdaza/sampler documentation built on Feb. 3, 2018, 11:04 p.m.