acs.se: Compute standard errors for ACS PUMS data by the direct...

Description Usage Arguments Value References Examples

View source: R/acs.se.R

Description

This function uses weight replicates to compute direct standard errors on the ACS PUMS data for any statistic. It can take any of the functions in PUMSUtils that produce single estimates, including estimate, proportion, acs.mean, etc. The function f must have the signature f(x, ..., wt.rep.num=NULL), where x is the data and wt.rep.num is 1:80 or NULL. If NULL, the main expansion weight is used. If 1:80, a replicate weight is used. The dots argument is passes to f and may be empty. See the ACS PUMS readme document referenced below for the details of the calculation of the direct standard errors.

Usage

1
acs.se(x, f, ...)

Arguments

x

a data frame of ACS PUMS data.

f

a function that takes data and a weight replicate number called wt.rep.num with a default value of NULL

Value

the standard error of the statistic defined by f over the data

References

http://www2.census.gov/programs-surveys/acs/tech_docs/pums/ACS2016_PUMS_README.pdf

Examples

1
2
3
4
5
6
7
8
# Standard error of count of households in Washington State in 2016
acs.se(wa.house16, estimate)

# Standard error of median household income in Washington State in 2016
acs.se(wa.house16, acs.median, 'HINCP')

# Standard error of proportion of Washington STate households that pay cash rent
acs.se(subset(wa.house16, TEN==3), proportion, wa.house16)

davidthaler/PUMSutils documentation built on July 13, 2019, 9:58 a.m.