stratAgg: Aggregate a stratified sample to avoid strata with counts...

View source: R/plotStratZV.R

stratAggR Documentation

Aggregate a stratified sample to avoid strata with counts smaller than a threshold

Description

Aggregate a stratified sample to avoid strata with counts smaller than a threshold

Usage

stratAgg(X, popMin = 50, greedy = TRUE)

Arguments

X

(vector) stratified sample to be aggregated

popMin

(integer) minimal count in a stratum

greedy

(logical) use greedy algorithm to merge strata (default: TRUE)

Value

a list containing the new X vector and the values and counts of the new strata

Examples


  uE  = sqrt(rchisq(1000, df = 4))  # Uncertainty
  X   = signif(uE,1)                # Stratify uE
  ST  = stratAgg(X)
  print(str(ST))


ppernot/ErrViewLib documentation built on June 1, 2024, 4:33 a.m.