moe_sum: Calculate the margin of error for a derived sum

View source: R/moe.R

moe_sumR Documentation

Calculate the margin of error for a derived sum

Description

Generates a margin of error for a derived sum. The function requires a vector of margins of error involved in a sum calculation, and optionally a vector of estimates associated with the margins of error. If the associated estimates are not specified, the user risks inflating the derived margin of error in the event of multiple zero estimates. It is recommended to inspect your data for multiple zero estimates before using this function and setting the inputs accordingly.

Usage

moe_sum(moe, estimate = NULL, na.rm = FALSE)

Arguments

moe

A vector of margins of error involved in the sum calculation

estimate

A vector of estimates, the same length as moe, associated with the margins of error

na.rm

A logical value indicating whether missing values (including NaN) should be removed

Value

A margin of error for a derived sum

See Also

https://www2.census.gov/programs-surveys/acs/tech_docs/accuracy/MultiyearACSAccuracyofData2015.pdf


tidycensus documentation built on Oct. 18, 2024, 1:07 a.m.