unitVar
computes unit (population) variances of an analysis variable \(y\) from either a population or a sample. S2
is the unweighted population variance, \(S^2 = \sum_{i \in U}(y_i - \bar{y}_U)^2/(N-1)\) where \(U\) is the universe of elements, \(N\) is the population size, and \(\bar{y}_U\) is the population mean. If the input is a sample, S2
is estimated as \(\hat{S}^2 = (n/(n-1))\sum_{i \in s} w_i(y_i - \bar{y}_w)^2/(\sum_{i \in s} w_i)\) where \(s\) is the set of sample elements, \(n\) is the sample size, and \(\bar{y}_w\) is the weighted sample mean.
V1
is a weighted population variance used in calculations for samples where elements are selected with varying probabilities. If the \(y\) is a population vector, \(V_1 = \sum_U p_i(y_i/p_i - t_U)^2\) where \(p_i\) is the 1-draw probability for element \(i\) and \(t_U\) is the population total of \(y\). If \(y\) is for a sample, \(\hat{V}_1 = \sum_s (y_i/p_i - n^{-1}\sum_k y_k/p_k)^2 / (n-1)\) with \(p_i\) computed as \(1/(n w_i)\).