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

View source: R/DesignEffectAndMOE.R

moedeff_calcR 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)

jdjohn215/pollster documentation built on May 19, 2023, 4:34 p.m.