moedeff_calc {pollster} | R Documentation |
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)
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
Value
A percentage
Examples
moedeff_calc(pct = 0.515, deff = 1.6, n = 214)
[Package pollster version 0.1.6 Index]