# \donttest{
data(lou_pums_microdata)
# Prepare the data for analysis with the survey package
lou_pums_rep_design <- svrepdesign(
data = lou_pums_microdata,
variables = ~ UNIQUE_ID + AGE + SEX + RACE_ETHNICITY + EDUC_ATTAINMENT,
weights = ~ PWGTP,
repweights = "PWGTP\\d{1,2}",
type = "successive-difference",
mse = TRUE
)
# Estimate population proportions
svymean(~ SEX, design = lou_pums_rep_design)
# }
Run the code above in your browser using DataLab