Propagate ACS uncertainty for a linear combination.
Usage
acs_linear(estimates, moes, weights, cov = NULL, conf = 0.9)
Arguments
- estimates
Numeric estimates.
- moes
Numeric MOEs corresponding to estimates.
- weights
Numeric weights for the linear combination.
- 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_linear(c(100, 50, 25), c(10, 8, 6), weights = c(2, -1, 0.5))
#> estimate moe se
#> 1 162.5 21.74856 13.22219