Propagate ACS uncertainty for a sum.
Usage
acs_sum(estimates, moes, cov = NULL, conf = 0.9)
Arguments
- estimates
Numeric estimates to sum.
- moes
Numeric MOEs corresponding to estimates.
- cov
Optional covariance matrix on the standard-error scale. A scalar
is interpreted as a common off-diagonal covariance.
- conf
Confidence level associated with input and output MOEs.
Value
A one-row data frame with estimate, moe, and se.
Details
A scalar cov is a covariance, not a correlation. In contrast,
acs_aggregate(cov_strategy = "constant") accepts a scalar correlation
because that interface derives covariances from group-specific MOEs.
Examples
acs_sum(c(100, 50, 25), c(12, 8, 6))
#> estimate moe se
#> 1 175 15.6205 9.496589
acs_sum(c(100, 50), c(12, 8), cov = 5)
#> estimate moe se
#> 1 150 15.33152 9.320901