Learn R Programming

easycensus (version 1.1.3)

estimate: Estimate class

Description

A numeric vector that stores margin-of-error information along with it. The margin of error will update through basic arithmetic operations, using a first-order Taylor series approximation. The implicit assumption is that the errors in each value are uncorrelated. If in fact there is correlation, the margins of error could be wildly under- or over-estimated.

Usage

estimate(x, se = NULL, moe = NULL, conf = 0.9)

is_estimate(x)

as_estimate(x)

Value

An estimate vector.

Arguments

x

A numeric vector containing the estimate(s).

se

A numeric vector containing the standard error(s) for the estimate(s). Users should supply either se or moe and conf.

moe

A numeric vector containing the margin(s) of error. Users should supply either se or moe and conf.

conf

The confidence level to use in converting the margin of error to a standard error. Defaults to 90%, which is what the Census Bureau uses for ACS estimates.

Examples

Run this code
estimate(5, 2) # 5 with std. error  2
estimate(15, moe=3) - estimate(5, moe=4)
estimate(1:4, 0.1) * estimate(1, 0.1)

Run the code above in your browser using DataLab