This helper function takes a data frame returned by
get_pums
and converts it to a tbl_svy from the srvyr
as_survey
package or a svyrep.design object from the
svrepdesign
package. You can then use functions from
the srvyr or survey to calculate weighted estimates with replicate weights
included to provide accurate standard errors.
A data frame with PUMS person or housing weight variables, most
likely returned by get_pums
.
Whether to use person or housing-level weights; either
"housing"
or "person"
(the default).
Whether to convert to a srvyr or survey object; either
"survey"
or "srvyr"
(the default).
The survey design to use when creating a survey object.
Currently the only option is "rep_weights"
.
A tbl_svy or svyrep.design object.