stratAgg | R Documentation |
Aggregate a stratified sample to avoid strata with counts smaller than a threshold
stratAgg(X, popMin = 50, greedy = TRUE)
X |
(vector) stratified sample to be aggregated |
popMin |
(integer) minimal count in a stratum |
greedy |
(logical) use greedy algorithm to merge strata (default: TRUE) |
a list containing the new X vector and the values and counts of the new strata
uE = sqrt(rchisq(1000, df = 4)) # Uncertainty
X = signif(uE,1) # Stratify uE
ST = stratAgg(X)
print(str(ST))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.