Produces a detailed summary of a sample including design specification, execution details, per-stage stratum allocation tables, and weight diagnostics.
Usage
# S3 method for class 'tbl_sample'
summary(object, ...)Arguments
- object
A
tbl_sampleobject produced byexecute().- ...
Additional arguments (ignored).
Details
The summary has three sections preceded by a header line showing the total sample size, stages executed, and seed:
Design – the sampling specification (method, strata, clusters, allocation) for each stage.
Allocation – per-stage stratum tables showing population size
(N_h), sample size (n_h), and sampling fraction (f_h). Requires
.fpc_k columns to be present (produced by samplyr >= 0.2.0).
Weights – range, mean, coefficient of variation, Kish design effect, and effective sample size.
See also
tbl_sum.tbl_sample() for the compact print method,
as_svydesign() for exporting to the survey package
Examples
sample <- sampling_design() |>
stratify_by(region, alloc = "proportional") |>
draw(n = 300) |>
execute(bfa_eas, seed = 42)
summary(sample)
#> ── Sample Summary ──────────────────────────────────────────────────────────────
#>
#> ℹ n = 300 | stages = 1/1 | seed = 42
#>
#> ── Design: Stage 1 ─────────────────────────────────────────────────────────────
#> • Strata: region (proportional)
#> • Method: srswor
#>
#> ── Allocation: Stage 1 ─────────────────────────────────────────────────────────
#> region N_h n_h f_h
#> Boucle du Mouhoun 5009 34 0.0068
#> Cascades 2508 17 0.0068
#> Centre 3888 26 0.0067
#> Centre-Est 2941 20 0.0068
#> Centre-Nord 3402 23 0.0068
#> Centre-Ouest 3723 25 0.0067
#> Centre-Sud 1612 11 0.0068
#> Est 5505 37 0.0067
#> Hauts-Bassins 4839 32 0.0066
#> Nord 2930 20 0.0068
#> Plateau-Central 1662 11 0.0066
#> Sahel 4144 28 0.0068
#> Sud-Ouest 2407 16 0.0066
#> ───── ─── ──────
#> Total 44570 300 0.0067
#>
#> ── Weights ─────────────────────────────────────────────────────────────────────
#> • Range: [146.5, 151.22]
#> • Mean: 148.57 · CV: 0.01
#> • DEFF: 1 · n_eff: 300
#>