Because the strata are sampled independently the variance is a
weighted sum of WITHIN-stratum variances only. ybar_st equals the
sample mean only under proportional allocation, so the unweighted mean
is returned alongside for contrast. h holds one-based labels.
Value
List with estimate, se, ci_lower,
ci_upper, stratum_mean, stratum_var, nh,
Wh, unweighted_mean, N, n, L.
Details
Formula: W_h = N_h/N, ybar_st = sum_h W_h ybar_h, V(ybar_st) = sum_h W_h^2 (1 - f_h) s_h^2 / n_h, f_h = n_h/N_h
References
Cochran (1977), Sampling Techniques, 3rd edition, Section 5.3, Theorem 5.3: V(ybar_st) = sum W_h^2 S_h^2 (1 - f_h)/n_h, the cross terms vanishing because the strata are drawn independently. Chapter 5 read from the scanned original. Cross-checked against the reference implementation in the CRAN package samplingbook 1.2.4, whose stratamean forms sum(Meanh\*wh) and sum(Varh\*wh^2).
