Computes Kish's design effect due to unequal weighting,
\(deff = 1 + CV^2(w) = m \sum w^2 / (\sum w)^2\), and the effective sample
size \(n_\mathrm{eff} = m / deff\) it implies. It is the standard one-number
summary of what a weighting cascade cost in precision, and it is what the
summary() and plot() methods of a prepped recipe report step by step.
Details
Zero weights are dropped (they are the "dropped-unit" marker); negative weights
– a valid but unusual output of unbounded linear/GREG calibration – are kept
active, so the count n matches collect_weights(). Be aware, however, that
the Kish formula assumes non-negative weights: a negative weight shrinks
\(\sum w\) and enlarges \(\sum w^2\) at once, so with
negatives present deff is inflated and no longer interpretable as an
effective-sample summary. prep() raises an alert when a calibration produces
negative weights; prefer bounds to keep the factor positive if you need the
design effect to be meaningful.
