Stratified bootstrap standard errors for class-specific F1 scores
aa_f1_bootstrap.RdResamples observations with replacement within each sampling stratum and estimates class-specific F1 standard errors from the bootstrap replicates. Stratum weights are held fixed across replicates.
Arguments
- stratum
Vector of sampling-stratum identifiers.
- reference
Vector of reference class labels.
- map
Vector of map class labels.
- h
Stratum identifiers corresponding to `N_h`, in matching order. Defaults to the observed strata.
- N_h
Population size or area for each stratum in `h`. If omitted, observed stratum sample sizes are used as weights.
- B
Number of bootstrap replicates; must be at least 2.
Value
A list containing `stats` (class-specific F1 estimates, bootstrap standard errors, and numbers of valid replicates), the replicate matrix, and the requested number of replicates.
Details
This is a stratified, with-replacement bootstrap and does not apply a finite population correction. It cannot estimate within-stratum variability when any stratum has only one observation; in that case it stops with an error. For design-based standard errors, use [aa_stratified()] when possible.