View source: R/DesignEffectAndMOE.R

moedeff_calc | R Documentation |

`moedeff_calc`

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

```
moedeff_calc(pct, deff, n, zscore = 1.96)
```

`pct` |
a proportion |

`deff` |
a design effect |

`n` |
the sample size |

`zscore` |
defaults to 1.96, consistent with a 95% confidence interval. |

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

A percentage

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.