Skip to contents

Estimates macro-F1 and its standard error using a stratified Taylor linearization. The variance includes covariance between class-specific F1 estimates.

Usage

aa_macro_f1_stratified_su(
  stratum,
  reference,
  map,
  classes,
  f1,
  h,
  N_h,
  fpc = FALSE
)

Arguments

stratum

Stratum identifier for each sampled unit.

reference

Reference class for each sampled unit.

map

Map class for each sampled unit.

classes

Class labels corresponding to `f1`.

f1

Estimated class-specific F1 values.

h

Stratum identifiers corresponding to `N_h`.

N_h

Population size for each stratum in `h` order.

fpc

Apply the finite population correction when `TRUE`.

Value

A named numeric vector with the macro-F1 estimate (`macroF1`), its standard error (`macroF1_se`, `NA` if any stratum has one sample) and an approximate standard error (`macroF1_se_approx`) in which single-sample strata borrow the mean variance of the other strata.