View source: R/survey_statistics_helpers.R
cur_svy_wts | R Documentation |
This is a helper to allow srvyr's syntactic style. This function allows quick access
to the full-sample weights for the current group, using cur_svy_wts()
,
See vignette("extending-srvyr")
for more details.
cur_svy_wts()
a numeric vector containing full-sample weights
data(api, package = 'survey')
dstrata <- apistrat %>%
as_survey_design(strata = stype, weights = pw)
dstrata %>%
summarize(sum_of_weights = sum(cur_svy_wts()),
kish_deff = var(cur_svy_wts())/(mean(cur_svy_wts())^2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.