moedeff_calc: Calculate the margin of error (including design effect) of a sample
Description
moedeff_calc returns a single number. It is designed for use in the moe family of functions.
Usage
moedeff_calc(pct, deff, n, zscore = 1.96)
Value
A percentage
Arguments
pct
a proportion
deff
a design effect
n
the sample size
zscore
defaults to 1.96, consistent with a 95% confidence interval.
Details
This function returns the margin of error including design effect of a given sample of weighted data using the formula
sqrt(deff)*zscore*sqrt((pct*(1-pct))/(n-1))*100