moedeff_calc: Calculate the margin of error (including design effect) of a...

Description Usage Arguments Details Value Examples

View source: R/DesignEffectAndMOE.R

Description

moedeff_calc returns a single number. It is designed for use in the moe family of functions.

Usage

1
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

1
moedeff_calc(pct = 0.515, deff = 1.6, n = 214)

Example output

[1] 8.489864

pollster documentation built on Aug. 25, 2020, 5:08 p.m.