Strange values form sryvr package

Your code is close; I believe the issue may be related to your use of the ‘probs’ argument instead of the ‘weights’ argument to assign weights within the as_survey() function. For simplicity sake, I find it useful to first create the survey object using the as_survey_design() function within SRVYR:

svy_object ← data %>% as_survey_design(
ids = CLUSTER,
weights = PERWT,
strata = STRATA,
nest = TRUE)

Then, I run summary statistics on the survey object using DPLYR:

svy_object %>%
filter(MET2013 == 35620, SAMPLE == 201901) %>%
summarize(survey_total())

When I run the above code, I get a coefficient of 19,839,535 which is consistent with the expected 19 million population of New York City. This vignette on srvyr compared to survey provides example code for using srvyr to calculate population estimates that you might find useful. In addition, keep in mind that you can pull up R Documentation within RStudio for most packages and functions by typing “?” followed by the package or function name in the console.