Skip to contents

execute() returns a tbl_sample: the selected rows of the frame plus a set of generated columns recording how each row was selected. k is the stage index, so a two-stage design carries .weight_1 and .weight_2. The literal names .weight_k and .fpc_k are not themselves reserved.

Details

The generated columns are:

  • .sample_id: Unique identifier for each sampled unit

  • .weight: Sampling weight (1/probability)

  • .weight_1, .weight_2, ...: Per-stage sampling weights (\(1/\pi_i^{(k)}\)) for the stored design. In a single-phase multi-stage sample their product equals .weight. In a multi-phase sample .weight additionally includes earlier-phase weights.

  • .fpc_1, .fpc_2, ...: Per-stage finite population correction values. The meaning depends on the method and context:

    • Equal-probability WOR (srswor, systematic): \(N_h\) (stratum population size), or \(N\) if unstratified. The sampling fraction \(f = n / N\) is derived from this at variance-estimation time.

    • PPS WOR (pps_brewer, pps_cps, etc.): \(N_h\) (stratum population size), converted to \(\pi_i = 1/w_i\) at survey export, because survey::svydesign() expects inclusion probabilities for unequal-probability stages.

    • Clustered stages: the number of clusters in the stratum/group, not the number of ultimate units.

    • WR / PMR (srswr, pps_multinomial, pps_chromy): \(\infty\). With-replacement designs have no finite population correction. Variance is estimated via the Hansen-Hurwitz formula.

    In a multi-stage design, each stage has its own .fpc_k. At survey export (as_svydesign()), these are assembled into a multi-level FPC formula (e.g., ~ .fpc_1 + .fpc_2).

  • .draw_1, .draw_2, ...: Draw index per stage (WR/PMR methods only). Each row represents one independent draw. The draw index identifies which with-replacement selection the row came from.

  • .certainty_1, .certainty_2, ...: Whether the unit's resolved inclusion probability is one, so that it is self-representing and contributes no variance at that stage. TRUE whether the probability came from a certainty_size/certainty_prop rule or was capped at one by the probability calculation. Present for unequal-probability and balanced stages. Always FALSE for WR/PMR stages, where the recorded chance is an expected hit rather than a probability.

  • .replicate: Replicate identifier (only when reps is specified)

  • .panel: Panel assignment (only when panels is specified)

  • Stage and stratum identifiers as appropriate

See also

execute() which produces them, frame_summary() for the population structure behind them, as_svydesign() for how they are translated for survey

Other diagnostics: design_effect, frame_summary(), joint_expectation(), summary.tbl_sample(), varcomp.tbl_sample()