BW2stageSRS
computes the between and within population relvariance components
appropriate for a two-stage sample in which PSUs are selected via srs (either with or without replacement). Elements within PSUs are assumed to be selected by srswor. The same number of elements is assumed to be selected within each sample PSU. The function requires that an entire frame of PSUs and elements be input.
If a PSU contains multiple SSUs, some of which have missing data, or contains only one SSU, a value is imputed. If lonely.SSU = "mean"
, the mean of the non-missing PSU contributions is imputed. If lonely.SSU = "zero"
, a 0 is imputed. The former would be appropriate if a PSU contains multiple SSUs but one or more of them has missing data in which case R will normally calculate
an NA. The latter would be appropriate if the PSU contains only one SSU which would be selected with certainty in any sample.
(Use BW2stagePPSe
if only a sample of PSUs and elements are available.)