Skip to contents

The seventeen selection methods samplyr ships, what each one requires, and how registered methods extend the set. draw() chooses among them with its method argument.

Details

Seventeen methods are built in, in three families: equal probability, PPS (probability proportional to size, all requiring mos), and balanced.

MethodReplacementSizemosAlso takes
srsworWithoutFixed--
srswrWithFixed--
systematicWithoutFixed--
bernoulliWithoutRandom-prn
pps_systematicWithoutFixedRequired-
pps_brewerWithoutFixedRequired-
pps_cpsWithoutFixedRequired-
pps_sampfordWithoutFixedRequired-
pps_poissonWithoutRandomRequiredprn
pps_spsWithoutFixedRequiredprn
pps_paretoWithoutFixedRequiredprn
pps_multinomialWithFixedRequired-
pps_chromyMinimumFixedRequired-
pps_systematic_mrMinimumFixedRequired-
cubeWithoutFixedOptionalaux
lpm2WithoutFixedOptionalspread
scpsWithoutFixedOptionalspread, prn

Every method takes either n or frac, except pps_cps, which requires n. For fixed-size methods, frac follows the round parameter (ceiling by default). Bernoulli and PPS Poisson use an unrounded expected target. prn in the last column marks the methods that accept permanent random numbers for coordination, and it is always optional. cube takes aux optionally, whereas lpm2 and scps require spread.

What each method does

  • srswor, the default, is simple random sampling.

  • srswr allows a unit to be drawn more than once.

  • systematic selects at a fixed interval.

  • bernoulli makes an independent trial for each unit.

  • pps_systematic is order-sensitive, with exact first-order probabilities. Sorted with control, it spreads the sample over the sorted variables.

  • pps_brewer is Brewer's general method for any n, with exact first-order and approximate joint probabilities. PPS_BREWER in SAS and SPSS selects two units per stratum.

  • pps_cps has the highest entropy and exact joint probabilities.

  • pps_sampford has exact Sampford joint probabilities. It is the PPS_SAMPFORD method of SAS and SPSS.

  • pps_poisson is the PPS analog of Bernoulli sampling.

  • pps_sps (sequential Poisson) and pps_pareto meet their probability targets only approximately.

  • pps_multinomial allows any number of hits, with the Hansen-Hurwitz estimator.

  • pps_chromy is sequential and order-sensitive, the method of SAS PPS_SEQ.

  • pps_systematic_mr is systematic PPS without the cap at 1, the method of SAS PPS_SYS. pps_systematic caps each chance at 1 and takes a large unit once, whereas pps_systematic_mr hits it once per sampling interval its size spans.

  • cube is the cube method of Deville and Tillé (2004).

  • lpm2 and scps spread the sample in space.

Minimum in the Replacement column is probability minimum replacement. pps_chromy and pps_systematic_mr draw a unit either \(\lfloor E \rfloor\) or \(\lceil E \rceil\) times, where \(E\) is its expected number of hits, so a unit is never hit more often than its size warrants. When every \(E\) is below 1, pps_systematic_mr draws the units pps_systematic draws from the same seed.

Choosing a PPS method

When a protocol names the method, use that method.

Otherwise a general fixed-size method is the usual choice. pps_brewer, pps_cps and pps_sampford select any number of units, ignore the frame order and give every pair of units a positive joint probability, so the variance can be estimated from the design. The joint probabilities are exact for CPS and Sampford and approximate for Brewer.

pps_systematic, pps_systematic_mr and pps_chromy depend on the frame order. Sorted with control, they spread the sample over the sorted variables, which is why many household survey protocols use them. Both systematic methods can give some pairs of units a joint probability of zero, which rules out a design-unbiased variance estimator, and a frame whose order resonates with the sampling interval can make their standard errors far too small. as_svydesign() uses Brewer's approximation for a pps_systematic stage, treats a pps_systematic_mr stage as drawn with replacement, and warns for both. A pps_chromy stage is treated as drawn with replacement too (variance_estimation).

pps_poisson, pps_sps and pps_pareto take permanent random numbers, for samples coordinated across occasions or surveys.

Spreading the sample

A protocol that sorts the frame by geography wants the sample spread over the areas it sorts by. samplyr reaches that spread in four ways, and each pays for it differently.

  • control with pps_systematic, pps_systematic_mr or pps_chromy gives implicit stratification, with the variance limits given above.

  • Finer strata in stratify_by(), down to two units per stratum, with a general method. Every joint probability stays positive, at the cost of more strata and smaller takes in each.

  • method = "cube" with aux = c(bound(province)) fixes the count in each province to an integer adjacent to its expected count.

  • method = "lpm2" or "scps" with spread spreads the sample in space.

The last two keep exact first-order probabilities, but their joint probabilities are refused and their variance comes from subbootstrap replicates only, or mrbbootstrap ones when no size is given (variance_estimation). No method dominates the others, and the choice depends on the variance the analysis needs.

Selection and inference

Every method above draws a sample when its inputs are met, but selection support and variance support are separate contracts. variance_estimation gives how each method's variance is estimated and how exact it is.

SPS, Pareto and custom approximate targets require allow_approximate = TRUE in exante_probabilities() and exante_overlaps(). Estimates using these targets need not be design-unbiased. Unknown probabilities are refused. Probability and variance declarations by a custom-method author are contracts, not proofs.

The two order-sampling methods part ways in small pools. Their realized inclusion probabilities depart from the targets as the take shrinks, and those of pps_pareto stay closer to them than those of pps_sps, so an estimator built on the targets is less biased. For coordinated samples from small pools, prefer pps_pareto.

Fixed vs random sample size

Where the table says Fixed, n is the realized sample size. Where it says Random, n is the expected size: it is converted to frac = n / N (with N the stratum or frame size) and the realized count varies around it.

For pps_poisson, the raw inclusion probabilities are computed as \(\pi_i = f \cdot x_i / \bar{x}\) where \(f\) is frac and \(x_i\) is the MOS value. Any \(\pi_i > 1\) is clipped to 1, so the expected sample size \(E[n] = \sum \min(\pi_i, 1)\) can be less than \(f \cdot N\) when large units dominate the MOS distribution. Use certainty_size or certainty_prop to handle these dominant units explicitly.

Declaring certainty units does more than remove them. The remainder is re-resolved over the reduced target and the reduced MOS total, so the surviving chances can rise. The remaining expected take equals the reduced target only if no remaining probability needs clipping. See draw() for the certainty-adjusted n and frac contract.

This is not silent. execute() warns with class samplyr_warning_poisson_shortfall once per stage when a pool's resolved expectation falls more than 5% below what that pool could reach, naming the pools affected and how many chances were clipped. The comparison is against the reachable target rather than the request: a pool asked for more units than it holds has already had its target reduced by the population, which samplyr_warning_nominal_cap reports, and only the further reduction that saturation caused is charged here. A design reduced both ways gets both warnings.

The shortfall is a gap between the nominal and realized design, not a bias. Horvitz-Thompson estimates from a saturated Poisson design remain unbiased, because the weights are the reciprocals of the resolved probabilities.

When an allocation method is set in stratify_by() (equal, proportional, neyman, optimal, power), specify total sample size via n. Combining alloc with frac is not supported.

Registered methods

A method registered with sondage::register_method() is named "pps_<name>" for type = "wor" or type = "wr", and "balanced_<name>" for type = "balanced", where mos is optional. supports_aux = TRUE permits ordinary balancing variables in aux, and supports_spread = TRUE requires coordinates in spread. To draw such a function without coordinates, register it again under another name, without supports_spread = TRUE. A method declaring both takes aux and spread together, for a sample that is balanced and well spread. Under stratify_by(), a method declaring supports_strata = TRUE draws all strata in one call, as "cube" does, and any other registered method draws each stratum on its own.

Its weights are 1 / pik, the inclusion expectation (target inclusion probabilities, or expected hits for type = "wr") samplyr hands to the method. The probabilities tier declared at registration is "exact" (the design's first-order inclusion probabilities, or expected hits, equal pik), "approximate" (to a documented approximation, as in Pareto sampling), or "unknown", the default. draw() refuses "unknown", because pik is then a selection weight only and the weights would be systematically biased. The classic trap is sample(prob = pik). With replace = TRUE its expected hits equal pik, a valid type = "wr" method, but its inclusion probabilities without replacement do not, so a type = "wor" wrapper's tier is unknown.

References

srswor, srswr, systematic, bernoulli, pps_systematic, pps_multinomial: Cochran, W.G. (1977). Sampling Techniques, 3rd ed. Wiley.

pps_brewer: Brewer, K.R.W. (1975). A simple procedure for sampling PPS WOR. Australian Journal of Statistics, 17(3), 166-172.

pps_cps: Hájek, J. (1964). Asymptotic theory of rejective sampling with varying probabilities from a finite population. Annals of Mathematical Statistics, 35(4), 1491-1523.

Chen, X.-H., Dempster, A.P. and Liu, J.S. (1994). Weighted finite population sampling to maximize entropy. Biometrika, 81(3), 457-469.

pps_sampford: Sampford, M.R. (1967). On sampling without replacement with unequal probabilities of selection. Biometrika, 54(3/4), 499-513.

pps_poisson: Tillé, Y. (2006). Sampling Algorithms. Springer.

pps_sps: Ohlsson, E. (1998). Sequential Poisson sampling. Journal of Official Statistics, 14(2), 149-162.

pps_pareto: Rosén, B. (1997). Asymptotic theory for order sampling. Journal of Statistical Planning and Inference, 62(2), 135-158.

pps_multinomial, srswr: Hansen, M.H. and Hurwitz, W.N. (1943). On the theory of sampling from finite populations. Annals of Mathematical Statistics, 14(4), 333-362. doi:10.1214/aoms/1177731356

pps_chromy: Chromy, J.R. (1979). Sequential sample selection methods. Proceedings of the Survey Research Methods Section, ASA, 401-406.

pps_systematic, pps_systematic_mr: Madow, W.G. (1949). On the theory of systematic sampling, II. Annals of Mathematical Statistics, 20(3), 333-354. doi:10.1214/aoms/1177729988

cube, balanced: Deville, J.-C. and Tillé, Y. (2004). Efficient balanced sampling: the cube method. Biometrika, 91(4), 893-912.

Chauvet, G. (2009). Stratified balanced sampling. Survey Methodology, 35(1), 115-119.

lpm2: Grafström, A., Lundström, N.L.P. and Schelin, L. (2012). Spatially balanced sampling through the pivotal method. Biometrics, 68(2), 514-520. doi:10.1111/j.1541-0420.2011.01699.x

scps: Grafström, A. (2012). Spatially correlated Poisson sampling. Journal of Statistical Planning and Inference, 142(1), 139-147. doi:10.1016/j.jspi.2011.07.003

Grafström, A. and Matei, A. (2018). Coordination of spatially balanced samples. Survey Methodology, 44(2), 215-238.

Matei, A., Smith, P.A., Smeets, M.J.E. and Klingwort, J. (2023). Targetted double control of burden in multiple surveys. Survey Methodology, 49(2), 363-384.

See also

draw() to set a method on a stage, variance_estimation for how each method's variance is estimated, joint_expectation() for which methods yield exact second-order quantities

Other reference topics: frame_input_grammar, reserve_lists, sample_columns, variance_estimation