Skip to contents

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_sample object produced by execute().

...

Additional arguments (ignored).

Value

Invisibly returns object. Called for its side effect of printing a summary.

Details

The summary has four sections:

Design – the sampling specification (method, strata, clusters, allocation) for each stage.

Execution – seed, stages executed, timestamp, and total sample size.

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  1483   30   0.0202
#>   Cascades           667    14   0.0210
#>   Centre             1556   31   0.0199
#>   Centre-Est         1259   25   0.0199
#>   Centre-Nord        1375   28   0.0204
#>   Centre-Ouest       1287   26   0.0202
#>   Centre-Sud         608    12   0.0197
#>   Est                1590   32   0.0201
#>   Hauts-Bassins      1483   30   0.0202
#>   Nord               1211   24   0.0198
#>   Plateau-Central    757    15   0.0198
#>   Sahel              902    18   0.0200
#>   Sud-Ouest          722    15   0.0208
#>                      ─────  ───  ──────
#>   Total              14900  300  0.0201
#> 
#> ── Weights ─────────────────────────────────────────────────────────────────────
#> • Range: [47.64, 50.67]
#> • Mean:  49.67 · CV: 0.02
#> • DEFF:  1 · n_eff: 300
#>