Skip to contents

Multiplies a standard error (SE) by the normal quantile \(z\) for the level, giving the margin of error (MOE): \(\mathrm{MOE} = z \cdot \mathrm{SE}\). A margin of error is the half-width of a confidence interval. When level is 0.90, the level of published American Community Survey (ACS) margins of error, the function uses \(z = 1.645\), the value the Census Bureau uses. At other levels it uses qnorm(1 - (1 - level) / 2), for example about 1.96 at level = 0.95.

Usage

cacs_se_to_moe(se, level = 0.9)

Arguments

se

A numeric vector of standard errors.

level

A single number between 0 and 1 (not a percentage) giving the confidence level of the margin of error. The default is 0.9. The value is not checked: level = 90, for example, gives NaN with a warning.

Value

A numeric vector of margins of error, the same length as se.

References

U.S. Census Bureau (2020). Understanding and Using American Community Survey Data: What All Data Users Need to Know. Chapter 7, Understanding Error and Determining Statistical Significance.

See also

cacs_propagate_moe() computes margins of error for drive-time area estimates.

Other rates and margins of error: cacs_acs_default_rates, cacs_moe_to_se()

Examples

cacs_se_to_moe(c(5, 10, NA), level = 0.90)
#> [1]  8.225 16.450     NA