Description Usage Arguments Value References Examples
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.
1 |
x |
a data frame of ACS PUMS data. |
f |
a function that takes data and a weight replicate number
called |
the standard error of the statistic defined by f
over the data
http://www2.census.gov/programs-surveys/acs/tech_docs/pums/ACS2016_PUMS_README.pdf
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.