Skip to contents

All sampling functions in sondage return objects inheriting from class "sondage_sample". These objects store the realized sample together with the design-defining quantities needed by the query generics.

Details

All sondage_sample objects contain:

$sample

Sample indices (integer vector, or matrix/list when nrep > 1).

$n

Target or expected sample size.

$N

Population size.

$method

Sampling method name.

$fixed_size

Whether the sample size is fixed by design.

Without-replacement ("wor") objects also contain:

$pik

Inclusion probability vector. For most methods this equals the true first-order probabilities. For "sps" and "pareto", this is the target vector.

With-replacement ("wr") objects also contain:

$prob

Per-draw selection probability vector.

$hits

Realized selection counts (integer vector, or N x nrep matrix when nrep > 1).

The class vector records the design family:

c("equal_prob", "wor", "sondage_sample")

Equal probability, without replacement.

c("equal_prob", "wr", "sondage_sample")

Equal probability, with replacement.

c("unequal_prob", "wor", "sondage_sample")

Unequal probability, without replacement (includes balanced).

c("unequal_prob", "wr", "sondage_sample")

Unequal probability, with replacement.