get_valid_sources | R Documentation |
Determine valid sources for estimation of a stratum of interest.
get_valid_sources(stratum_data_prepped, min_n = 1)
stratum_data_prepped |
A data frame with all records in a stratum of interest.
Columns indicating sources should be prefixed with |
min_n |
The minimum number of records that must appear in a source to be
considered valid for estimation. |
A character vector containing the names of the valid sources.
set.seed(19481210)
in_A <- sample(c(0, 1), size = 100, replace = TRUE, prob = c(0.45, 0.65))
in_B <- sample(c(0, 1), size = 100, replace = TRUE, prob = c(0.5, 0.5))
in_C <- sample(c(0, 1), size = 100, replace = TRUE, prob = c(0.75, 0.25))
in_D <- sample(c(0, 1), size = 100, replace = TRUE, prob = c(1, 0))
my_stratum <- tibble::tibble(in_A, in_B, in_C, in_D)
get_valid_sources(my_stratum)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.