Skip to contents

Returns the completed sample size needed to estimate a proportion to a stated margin of error, with a finite population correction, a design effect, and an inflation for non-response.

Usage

morie_sample_size_proportion(
  p,
  moe,
  conf = 0.95,
  N = Inf,
  deff = 1,
  response_rate = 1
)

Arguments

p

Anticipated proportion. Use 0.5 for the conservative maximum-variance value when no prior estimate exists.

moe

Target margin of error (half-width of the confidence interval), on the proportion scale.

conf

Confidence level. Default 0.95.

N

Population size. Default Inf (no finite population correction).

deff

Design effect. Default 1.

response_rate

Expected proportion of selected units that yield a completed response. Default 1.

Value

A list with n_srs (before design effect and non-response), n_design (after the finite population correction and design effect), n_invite (units that must be selected), and the inputs.

Details

The unadjusted requirement is \(n_0 = z^2 p (1 - p) / e^2\). The finite population correction gives \(n = n_0 / (1 + (n_0 - 1)/N)\); the design effect multiplies; non-response inflates by \(1/r\). The order matters and is the one used here: precision first, then the population limit, then the design, then fieldwork loss.

Examples

# 5 percentage points, clustered design, 60% response
morie_sample_size_proportion(0.5, 0.05, deff = 1.5, response_rate = 0.6)
#> $n_srs
#> [1] 384.1459
#> 
#> $n_design
#> [1] 576.2188
#> 
#> $n_invite
#> [1] 960.3647
#> 
#> $p
#> [1] 0.5
#> 
#> $moe
#> [1] 0.05
#> 
#> $conf
#> [1] 0.95
#> 
#> $N
#> [1] Inf
#> 
#> $deff
#> [1] 1.5
#> 
#> $response_rate
#> [1] 0.6
#>