14  The sample design report

Plan the sample1 Domains→2 Inputs→3 Targets→4 Design effect→5 Sample size→6 Allocation
Draw the sample7 Frame→8 PSUs→9 Households→10 Weights

A design that only its author can reproduce is not finished. The sample design report states every decision, the inputs it rests on and the numbers it produced, so that a reviewer can check them, an analyst can weight the data, and the next round can start from them. This chapter takes the second half of the tenth decision of Figure 1.1. It assembles the report from the paragraphs recorded in chapters 7 to 13, adds the tables a DHS Appendix A carries, archives the design so it can be replayed, and prepares the lists the field teams need.

14.1 What a report contains

A DHS sampling appendix follows the same plan from one country to the next. It describes the objectives and domains, the frame, the stratification and the stages of selection, the allocation, the expected interviews, and the probabilities and weights. Appendix B then gives the sampling errors after fieldwork. The report of this chapter follows that plan. Its tables are computed from the objects of the earlier chapters, so they change when a decision changes, and they never disagree with the design that drew the sample.

gmb24_eas <- readRDS("data/gmb24_eas.rds")
clusters <- gmb_clusters()
inputs <- gmb_inputs()
allocation <- gmb_allocation()
design <- gmb_design(allocation)
selected <- execute(design, clusters, stages = 1, seed = 2025)

by_residence <- function(data, value) {
  data |>
    tidyr::pivot_wider(names_from = urban_rural, values_from = {{ value }},
                       values_fill = 0) |>
    mutate(Total = Urban + Rural) |>
    arrange(match(lga, inputs$lga)) |>
    rename(LGA = lga)
}

14.2 The report

A.1 Introduction

The survey is designed to give estimates for the country, for urban and rural areas, and for each of the eight local government areas (LGAs). All women aged 15 to 49 in the selected households are eligible for the individual interview. Men aged 15 to 59 are interviewed in every second household, where the biomarker tests and the anthropometric measurements are also done, and one woman per household of that half is selected for the domestic violence module.

A.2 Sample frame

The frame is the list of the 5,054 EAs of the 2024 census cartography, with 311,113 households. Each EA lies in one LGA, district and ward, and has a residence type and a household count. 63 EAs with fewer than 25 households were merged with the next EA of their stratum in district and ward order, giving 5,003 clusters. Table A.1 gives the households of the frame.

Table A.1 Households in the frame
LGA Urban Rural Total
Banjul 6,600 0 6,600
Kanifing 65,218 0 65,218
Brikama 109,756 38,381 148,137
Mansakonko 3,090 8,763 11,853
Kerewan 8,587 19,186 27,773
Kuntaur 1,000 10,278 11,278
Janjanbureh 3,391 12,255 15,646
Basse 8,760 15,848 24,608

A.3 Sample design

The sample is a stratified two-stage cluster sample. Each LGA is divided into urban and rural parts, which gives 14 strata, Banjul and Kanifing being wholly urban. In the first stage, 307 clusters are selected by systematic sampling with probability proportional to the number of households, independently in each stratum, after sorting by district and ward. In the second stage, all households of each selected cluster are listed, and 25 are selected by systematic sampling. No replacement is allowed.

The sample is sized so that the use of a modern contraceptive method among currently married women has a relative standard error of at most 10% in each LGA and 4% nationally, with at least 800 completed interviews with women in each LGA. Design effects are modeled from an urban and a rural intraclass correlation backed out of the 2019-20 GDHS, and the clusters are allocated to the strata at the lowest cost that meets every target. Table A.2 gives the allocation.

Table A.2 Allocation of clusters and households
LGA Urban Rural Total Households
Banjul 34 0 34 850
Kanifing 36 0 36 900
Brikama 39 17 56 1,400
Mansakonko 9 29 38 950
Kerewan 7 18 25 625
Kuntaur 3 32 35 875
Janjanbureh 5 22 27 675
Basse 17 39 56 1,400

A.4 Expected interviews

The expected interviews use the completion rate, eligible women per completed household and women’s response rate of each LGA in the 2019-20 GDHS.

Table A.3 Expected completed interviews with women aged 15 to 49
LGA Urban Rural Total
Banjul 805 0 805
Kanifing 1,262 0 1,262
Brikama 1,836 800 2,636
Mansakonko 343 1,107 1,450
Kerewan 304 782 1,086
Kuntaur 152 1,621 1,773
Janjanbureh 227 997 1,224
Basse 1,086 2,491 3,577

A.5 Probabilities and weights

The first-stage probability of cluster \(i\) in stratum \(h\) is \(P_{1hi} = a_h M_{hi} / M_h\), with \(a_h\) the clusters selected in the stratum, \(M_{hi}\) the households of the cluster and \(M_h\) those of the stratum. The second-stage probability is \(P_{2hi} = 25 / L_{hi}\), with \(L_{hi}\) the households listed. The design weight is \(1 / (P_{1hi} P_{2hi})\). Household and women’s weights are adjusted for nonresponse within each stratum and normalized nationally. Sampling errors are computed by Taylor linearization on the design exported from the sample, with a finite population correction from each cluster’s inclusion probability. The errors of the 2019-20 formula, with clusters treated as selected with replacement within strata, are computed alongside for comparison with earlier rounds.

A.6 Expected sampling errors

Table A.4 gives two relative standard errors of mCPR: the one the clustering model predicts for the design, and the true RSE found by drawing the design 1,000 times on a synthetic population calibrated to the 2019-20 GDHS.

Table A.4 Expected relative standard errors of mCPR
Domain Clusters Planned RSE RSE in virtual surveys
Banjul 34 0.101 0.092
Kanifing 36 0.101 0.100
Brikama 56 0.065 0.066
Mansakonko 38 0.104 0.107
Kerewan 25 0.098 0.111
Kuntaur 35 0.103 0.100
Janjanbureh 27 0.102 0.088
Basse 56 0.103 0.101
National 307 NA 0.040

The report has the shape of the 2019-20 appendix and every number in it comes from code. A table that a reviewer questions can be traced to the chapter that produced it.

14.3 Backtest

The report of the next round can be set beside the one of 2019-20 (Tables A.1, A.3 and A.4 of Gambia Bureau of Statistics and ICF (2021)).

tibble(
  item = c("EAs in the frame", "Households in the frame", "Clusters",
           "Households selected", "Interviews with women expected"),
  round_2019 = c(4098, 280702, 281, 7025, 12475),
  next_round = c(nrow(gmb24_eas), sum(gmb24_eas$households),
                 sum(allocation$n), 25 * sum(allocation$n),
                 sum(expected$women))
) |>
  mutate(change = round(next_round / round_2019 - 1, 2))
#> # A tibble: 5 × 4
#>   item                           round_2019 next_round change
#>   <chr>                               <dbl>      <dbl>  <dbl>
#> 1 EAs in the frame                     4098       5054   0.23
#> 2 Households in the frame            280702     311113   0.11
#> 3 Clusters                              281        307   0.09
#> 4 Households selected                  7025       7675   0.09
#> 5 Interviews with women expected      12475      13813   0.11

The next round selects 26 more clusters than 2019-20, and expects 1,338 more interviews with women. The 2019-20 design expected 12,475 and achieved 11,865, because its yields came from another survey (Chapter 7). The next round uses the yields of 2019-20 itself, and its expectation should fall closer.

14.4 Archiving and replaying the design

A report describes the design. The design itself, with its seed, is kept in a file that can redraw the same sample. write_design() writes the executed sample’s design, its execution record and a fingerprint of the frame to a JSON file. The execution record includes a digest of the frame, with the chance of every cluster, so the file grows with the frame. A path ending in .gz writes it compressed.

plain <- tempfile(fileext = ".json")
write_design(selected, plain, frame = clusters)
path <- tempfile(fileext = ".json.gz")
write_design(selected, path, frame = clusters)
sapply(c(plain = plain, compressed = path),
       \(file) format(file.size(file), big.mark = ","))
#>       plain  compressed 
#> "1,233,443"    "58,879"

Months later, or on another computer, read_design() reads it back and replay_design() executes it again on the frame. The fingerprint is checked first, so a frame that has changed since is refused rather than giving a different sample silently.

archived <- read_design(path)
replayed <- replay_design(archived, clusters)

identical(replayed$cluster, selected$cluster)
#> [1] TRUE
all.equal(replayed$.weight, selected$.weight)
#> [1] TRUE

The replayed sample is the same, cluster for cluster and weight for weight. The file holds no survey data, only the design, the record of its execution and a fingerprint of the frame, and it can be archived with the report. Its digest names the selected clusters, so it is kept with the same care as the sample.

14.5 Checking the design against the report

A report and the code that drew the sample are two descriptions of one design. They can drift apart when a late change to one never reaches the other. compare_designs() checks that two designs give the same allocation, or the same inclusion probabilities, on a frame. Here the design is rebuilt from Table A.2 as a reader of the report would type it, with one cluster too many in rural Basse.

from_report <- allocation
rural_basse <- from_report$lga == "Basse" & from_report$urban_rural == "Rural"
from_report$n[rural_basse] <- from_report$n[rural_basse] + 1

first_stage <- function(n) {
  sampling_design() |>
    stratify_by(lga, urban_rural) |>
    cluster_by(cluster) |>
    draw(n = n, method = "pps_systematic", mos = households,
         control = c(district, ward))
}

compare_designs(first_stage(allocation), first_stage(from_report), clusters,
                key = cluster)
#> ── Design comparison ────────────────────────────────────────────
#> Allocations differ on this frame.
#> 
#> ✔ Stage 1 units: agree. 5,003 units.
#> ✔ Stage 1 pools: agree. 14 pools.
#> ✖ Stage 1 targets: differ. 1 of 14 pools differ ("Basse/Rural"). x takes 307 units in all, y 308.
#> 
#> Specification, outside the verdict:
#> ✔ Stage 1 method: pps_systematic in both.
#> ✔ Stage 1 measure of size: households in both.
#> ✔ Stage 1 control sort: c(district, ward) in both.

The comparison names the stratum that differs. It also confirms that two designs with different methods but the same probabilities agree, which is the check to run when a design is redrawn with Brewer’s method instead of the systematic one.

14.6 Field lists

The field teams need the selected clusters, with the codes and names that let them find each EA. A merged cluster is listed with all its EAs, since the listing team lists them together.

ea_clusters <- gmb24_eas |>
  arrange(lga, urban_rural, district, ward, ea_id) |>
  mutate(cluster = merge_psus(ea_id, min_size = 25, size = households),
         .by = c(lga, urban_rural))

field_list <- selected |>
  as.data.frame() |>
  select(cluster, .weight_1) |>
  left_join(ea_clusters, by = "cluster") |>
  arrange(lga, urban_rural, district, ward, ea_id) |>
  mutate(cluster_number = match(cluster, unique(cluster))) |>
  select(cluster_number, lga, urban_rural, district, ward, ea_id,
         households, .weight_1)

head(field_list, 4)
#>   cluster_number    lga urban_rural       district          ward
#> 1              1 Banjul       Urban Banjul Central New Town East
#> 2              2 Banjul       Urban Banjul Central New Town East
#> 3              3 Banjul       Urban Banjul Central New Town East
#> 4              4 Banjul       Urban Banjul Central New Town East
#>     ea_id households .weight_1
#> 1 1021003         91  2.133161
#> 2 1021005         91  2.133161
#> 3 1021008         99  1.960784
#> 4 1021009        107  1.814184
nrow(field_list)
#> [1] 313

The list has one row per EA, 313 rows for the 307 clusters, since a merged cluster takes a row for each of its EAs. write.csv(field_list, "field_list.csv") gives the file the survey manager shares with the teams. The weights stay with the statistician. The listing forms of Chapter 12 then come back to the office, and the second stage is drawn from them.

14.7 How the other surveys document their designs

MICS reports carry a sample design appendix of the same shape, with tables SD.1 and SD.2 for the frame and the allocation (Chapter 26). NISR publishes a separate methodology document for its labor force survey, which Chapter 27 reads, and the Malawi IHS a Basic Information Document. All of them describe the design in words. None publishes the code or a file that redraws the sample. A design file and the code that produced the report fill that gap.

14.8 Exercises

  1. Change the national target of gmb_allocation() to 3.5% and rebuild the report. Which tables change?
  2. Replay the archived design on a frame with one EA removed. What does replay_design() report?
  3. Compare the design with one drawn by Brewer’s method at level = "probabilities". Do they agree?
  4. Add to Table A.3 the expected interviews with men. The 2019-20 appendix planned with 1.58 men per urban household and 1.55 per rural one, and response rates of 78% and 85.6%.
  1. Tables A.2, A.3 and A.4 change, and the text of A.3 gives the new total. Table A.1 does not, since the frame is the same.
  2. It stops with an error that the frame’s fingerprint differs from the one recorded, before drawing anything.
  3. Yes. Both give every cluster the probability \(a_h M_{hi} / M_h\), and the comparison notes the different methods but leaves them out of its verdict.
  4. Multiply each stratum’s selected households by 0.5 for the men’s half, by its LGA’s completion rate, and by the men per household and the response rate of its residence.