design_effect(icc = 0.04, take = 40)
#> Planning design effect: 2.5600
vapply(c(10, 25, 40), \(b) design_effect(icc = 0.04, take = b), 1.0)
#> [1] 1.36 1.96 2.569 Clusters, take size and cost
The plan of Chapter 8 sized each LGA with the DEFT it had in 2019-20, and its virtual survey showed the cost. An LGA whose DEFT was low by chance missed its target, and one whose DEFT was high by chance received more households than it needed. This chapter takes the fourth decision of Figure 1.1. It explains where a design effect comes from, replaces the eight noisy DEFTs with a model of two parameters, and asks whether 25 households is the right number to take in each EA.
9.1 Why clusters
A household survey could select households directly from a national list. None exists in most countries, and the interviews would be scattered over the whole territory. A cluster sample selects areas first, lists the households of the selected areas only, and sends a team to interview several households in each. Listing and travel are paid per cluster, not per household. For the same budget a cluster sample interviews many more households.
The price is precision. Households of the same EA share a market, a health center, a water point and often a family history. Their answers are more alike than the answers of households drawn across the country, so 25 households of one EA tell less than 25 households of 25 EAs.
9.2 The design effect of a cluster sample
When each cluster yields \(b\) interviews for an indicator, and the intraclass correlation of the indicator within clusters is \(\rho\), the design effect is approximately \[ \mathrm{deff} = 1 + (b - 1) \, \rho . \] The intraclass correlation \(\rho\) is the correlation between the answers of two persons of the same cluster. It is 0 when clusters are no more alike than the population, and 1 when everyone in a cluster answers the same. The approximation assumes the same take in every cluster and equal weights.
Two features of the formula matter for planning. The first is that \(b\) counts interviews for the indicator, not households. The same 25 households give about 12 married women in Banjul and 51 in Basse, so with the same \(\rho\) Basse has the larger design effect. Part of the pattern of Appendix B (low DEFTs in the towns, high ones in the rural LGAs) comes from the yield and not from the clustering of contraceptive use.
The second is that \(\rho\) is small and the design effect is not. A correlation of 0.04 with 40 interviews per cluster gives a design effect of \(1 + 39 \times 0.04 = 2.56\). Most of the precision of a cluster sample is decided by the take.
design_effect() computes it from the correlation and the take. It takes one take at a time, so vapply() runs it over several.
At the same correlation, the design effect rises from 1.36 with 10 interviews per cluster to 2.56 with 40.
9.3 An intraclass correlation from the report
The formula can be run backwards. A published design effect, with the interviews per cluster that produced it, gives \(\rho\). The LGA tables of Appendix B are too small for this, but Tables B.3 and B.4 give the sampling errors of the urban and the rural sample, each from more than 100 clusters.
residence <- read.csv("data/gmb_dhs2019_residence.csv")
residence
#> domain mcpr mcpr_se married mcpr_deft mcpr_rse
#> 1 National 0.171 0.007 8083 1.576 0.039
#> 2 Urban 0.179 0.009 3888 1.383 0.047
#> 3 Rural 0.153 0.010 4195 1.746 0.063A residence DEFT mixes two effects: the clustering, and the weighting loss of an allocation that gave the LGAs of each residence unequal shares of the sample. Chapter 7 measured that loss with Kish’s factor. Dividing it out leaves the clustering alone, and varcomp() turns what remains into \(\rho\).
inputs <- read.csv("data/gmb_dhs2019_lga.csv") |>
mutate(interviewed = selected * completed,
women_hh = women / interviewed,
married_hh = married / women_rr / interviewed,
resp = completed * women_rr,
in_scope = completed / hrr,
resp_in_scope = hrr * women_rr)
strata_2019 <- bind_rows(
mutate(inputs, lga, urban_rural = "Urban", n = eas_urban, .keep = "none"),
mutate(inputs, lga, urban_rural = "Rural", n = eas_rural, .keep = "none")
) |>
inner_join(read.csv("data/gmb_dhs2019_frame.csv"),
by = c("lga", "urban_rural")) |>
filter(n > 0)
clustering <- strata_2019 |>
summarise(kish = as.numeric(design_effect(
strata = data.frame(N = households, n = n))),
clusters = sum(n), .by = urban_rural) |>
left_join(residence, by = c(urban_rural = "domain")) |>
mutate(deff = mcpr_deft^2 / kish, b = married / clusters)
clustering$icc <- mapply(\(d, b) varcomp(deff = d, take = b)$icc,
clustering$deff, clustering$b)
clustering |>
select(urban_rural, mcpr_deft, kish, deff, b, icc) |>
mutate(across(where(is.numeric), \(x) round(x, 4)))
#> urban_rural mcpr_deft kish deff b icc
#> 1 Urban 1.383 1.4296 1.3379 22.4740 0.0157
#> 2 Rural 1.746 1.2088 2.5219 38.8426 0.0402The rural correlation is 0.04, 2.6 times the urban one. In a village, women share the same clinic and the same norms, and the use of contraception clusters more. Each value rests on more than 100 clusters, where an LGA’s DEFT rests on 26 to 50.
9.4 A design effect for every LGA
With the two correlations, the design effect of an LGA follows from its yield and its mix of urban and rural EAs. The plan splits each LGA’s EAs in proportion to its households, so the share of urban EAs is the urban share of the LGA’s households on the 2024 frame.
icc <- setNames(clustering$icc, clustering$urban_rural)
urban_share <- readRDS("data/gmb24_eas.rds") |>
summarise(N = sum(households), .by = c(lga, urban_rural)) |>
mutate(share = N / sum(N), .by = lga) |>
filter(urban_rural == "Urban") |>
select(lga, urban_share = share)
deff_at <- function(rho, b) {
vapply(b, \(n) design_effect(icc = rho, take = n), 1.0)
}
inputs <- inputs |>
left_join(urban_share, by = "lga") |>
mutate(b = 25 * married_hh * resp,
deff_model = urban_share * deff_at(icc[["Urban"]], b) +
(1 - urban_share) * deff_at(icc[["Rural"]], b))
inputs |>
mutate(lga, b = round(b, 1), urban_share = round(urban_share, 2),
deft_model = round(sqrt(deff_model), 2), deft_2019 = mcpr_deft,
.keep = "none")
#> lga urban_share b deft_model deft_2019
#> 1 Banjul 1.00 12.3 1.09 1.016
#> 2 Kanifing 1.00 18.6 1.13 1.246
#> 3 Brikama 0.74 27.8 1.26 1.086
#> 4 Mansakonko 0.26 27.0 1.37 1.571
#> 5 Kerewan 0.31 31.3 1.41 1.494
#> 6 Kuntaur 0.09 41.8 1.60 1.533
#> 7 Janjanbureh 0.22 34.9 1.48 1.867
#> 8 Basse 0.36 50.9 1.60 1.6459.5 Backtest
The model has two parameters and the report has eight LGA DEFTs. The model cannot reproduce them exactly, and it should not, since each published DEFT carries the noise of its 26 to 50 clusters. It should reproduce their pattern.
cor(sqrt(inputs$deff_model), inputs$mcpr_deft)
#> [1] 0.8051045The correlation is 0.81. The model ranks the LGAs as the report does, low in Banjul and Kanifing and high in Kuntaur and Basse. The largest gaps are in Janjanbureh (published at 1.87, modeled at 1.48) and Brikama (published at 1.09, modeled at 1.26). Both published values lie in the tails of what the 2019-20 design gives on the synthetic Gambia (Chapter 6). They are the two LGAs whose plan missed most in Chapter 8, in opposite directions.
9.6 Sizing with the model
The plan of Chapter 8 runs again with the modeled design effects in place of the published ones. Everything else is unchanged.
size_lgas <- function(deff) {
targets <- bind_rows(
mutate(inputs, lga, name = "mcpr", p = mcpr, cv = 0.10, deff = deff,
eligibility_rate = in_scope, resp_rate = resp_in_scope,
eligible_per_unit = married_hh, .keep = "none"),
mutate(inputs, lga, name = "women", eligibility_rate = in_scope,
resp_rate = resp_in_scope, eligible_per_unit = women_hh,
min_respondents = 800, .keep = "none")
)
n_multi(targets, domains = "lga")$domains |>
mutate(lga, eas = ceiling(.n / 25), .keep = "none")
}
sizes <- left_join(
rename(size_lgas(inputs$mcpr_deft^2), published = eas),
rename(size_lgas(inputs$deff_model), model = eas),
by = "lga"
)
sizes
#> lga published model
#> 1 Banjul 34 35
#> 2 Kanifing 45 37
#> 3 Brikama 18 24
#> 4 Mansakonko 55 42
#> 5 Kerewan 28 25
#> 6 Kuntaur 35 38
#> 7 Janjanbureh 45 29
#> 8 Basse 63 60
colSums(sizes[c("published", "model")])
#> published model
#> 323 290Janjanbureh and Mansakonko lose EAs, since their published DEFTs were high. Brikama gains, since its published DEFT was low. In total the plan needs 290 EAs instead of 323.
9.7 Virtual survey
Both plans are drawn 1,000 times on the synthetic Gambia, with the same seed.
gmb_synthetic <- readRDS("data/gmb_synthetic.rds")
response <- mutate(inputs, lga, household = completed, person = women_rr,
.keep = "none")
quota_design <- function(eas) {
strata_n <- gmb_synthetic$clusters |>
summarise(N = sum(households), .by = c(lga, urban_rural)) |>
left_join(eas, by = "lga") |>
mutate(n = pmax(2, round(n_lga * N / sum(N))), .by = lga) |>
select(lga, urban_rural, n)
sampling_design() |>
add_stage("Clusters") |>
stratify_by(lga, urban_rural) |>
cluster_by(cluster) |>
draw(n = strata_n, method = "pps_systematic", mos = households,
control = c(district, ward)) |>
add_stage("Households") |>
draw(n = 25, method = "systematic")
}
with_published <- virtual_survey(
quota_design(mutate(sizes, lga, n_lga = published, .keep = "none")),
gmb_synthetic, response, reps = 1000, seed = 6)
with_model <- virtual_survey(
quota_design(mutate(sizes, lga, n_lga = model, .keep = "none")),
gmb_synthetic, response, reps = 1000, seed = 6)
tibble(lga = with_model$lga,
published = with_published$estimated_rse,
model = with_model$estimated_rse) |>
mutate(across(where(is.numeric), \(x) round(x, 3)))
#> # A tibble: 9 × 3
#> lga published model
#> <chr> <dbl> <dbl>
#> 1 Banjul 0.106 0.104
#> 2 Kanifing 0.09 0.099
#> 3 Brikama 0.115 0.1
#> 4 Mansakonko 0.092 0.104
#> 5 Kerewan 0.103 0.11
#> 6 Kuntaur 0.112 0.108
#> 7 Janjanbureh 0.082 0.103
#> 8 Basse 0.096 0.097
#> 9 National 0.065 0.058With the published DEFTs, the RSE the survey reports runs from 8.2% to 11.5% across the LGAs. With the model, it runs from 9.7% to 11.0%, close to the 10% of the target everywhere, with 33 fewer EAs. Two correlations estimated on all the clusters predict each LGA better than eight DEFTs estimated on a few clusters each.
Does the synthetic Gambia favor one of the two plans? It was not built from the model of this chapter. Its EA effect depends on household density, not on residence. Density and residence go together, so the model may gain a little from that. But the population was calibrated to the eight published DEFTs, which favors the plan built on them, and the model still comes closer to the target. The reason is the noise of the eight DEFTs, each estimated on a few clusters, which the virtual survey of Chapter 6 measured directly.
9.8 Choosing the take
The Gambia DHS takes 25 households per EA, the Zimbabwe MICS 26 and the Malawi IHS 16. A larger take spends less on clusters and more on households, and raises the design effect. The best take balances cost against design effect, and it depends on what a cluster costs relative to an interview.
If a cluster costs \(c_1\) (travel, listing, supervision) and each interview costs \(c_2\), the number of interviews per cluster that gives the smallest variance for a fixed budget is \[ b^* = \sqrt{\frac{c_1}{c_2} \, \frac{1 - \rho}{\rho}} . \] It assumes a budget of \(n (c_1 + c_2 b)\) for \(n\) clusters and the design effect above.
n_cluster() returns it, with the units counted as interviews. A planner states the cost of a cluster as the cost of \(r\) household interviews, read from the budget of the last round. Since a household yields \(k\) interviews, an interview costs \(1 / k\) of a household. The take in households is then \(b^* / k\).
take <- function(r, rho, k) {
n_cluster(stage_cost = c(r, 1 / k), icc = rho, cv = 0.10,
unit_relvar = 4)$n[["stage_2"]] / k
}
k <- inputs |>
summarise(Urban = weighted.mean(married_hh * resp, urban_share),
Rural = weighted.mean(married_hh * resp, 1 - urban_share))
round(k, 2)
#> Urban Rural
#> 1 0.98 1.46
takes <- expand.grid(r = seq(10, 80, by = 5),
urban_rural = c("Urban", "Rural")) |>
rowwise() |>
mutate(households = take(r, icc[[urban_rural]], k[[urban_rural]])) |>
ungroup()A selected household yields about one married woman interviewed in urban areas and about one and a half in rural ones, the k printed above. The target cv = 0.10 and unit_relvar, the relvariance \((1 - P) / P = 4\) of a proportion near 0.2, set the number of clusters, not the take, which depends only on the costs and \(\rho\).
ggplot(takes, aes(r, households, color = urban_rural)) +
geom_line(linewidth = 1) +
geom_hline(yintercept = 25, linetype = "dashed") +
scale_color_manual(values = c(Urban = "#1f5f99", Rural = "grey40")) +
labs(x = "Cost of a cluster, in household interviews",
y = "Households per cluster", color = NULL) +
theme_minimal(base_size = 11) +
theme(legend.position = "bottom")
For mCPR, the take of 25 is about right in rural areas when a cluster costs the equivalent of 40 household interviews. In urban areas \(\rho\) is smaller and the optimum is larger at the same cost, but urban clusters are also cheaper to reach. At a cost of 10 interviews the urban optimum is 25. The efficiency is flat near the optimum. A take of 25 where 35 would be optimal loses about 2% of efficiency, so a single take for the whole survey is a reasonable choice. A survey also measures many indicators, and an indicator that clusters more, such as access to an improved water source, pulls the optimum down. The DHS take is a compromise across indicators and teams, and Chapter 18 tests other takes in virtual surveys.
The formula treats a cluster as an endless supply of households. A Gambian cluster is not. The urban curve passes 60 households at the higher costs, close to the size of the cluster itself. The clusters below are the EAs of the 2024 frame, merged where they hold fewer than 25 households, as Chapter 11 prepares them. When the take is a large share of the cluster, the households not interviewed are few, and the within-cluster variance shrinks by the factor \(1 - m/M\), with \(m\) the take and \(M\) the households of the cluster. With fpc = "stage" and the clusters and households of the frame in N, n_cluster() corrects each stage by its own sampling fraction. The take is then counted in households, and eligible_per_unit gives the interviews each one yields.
frame_counts <- gmb_clusters() |>
summarise(N = sum(households), N_1 = n(),
mean_size = mean(households), .by = urban_rural)
frame_counts
#> urban_rural N N_1 mean_size
#> 1 Urban 206402 2887 71.49359
#> 2 Rural 104711 2116 49.48535
take_fpc <- function(r, area) {
counts <- filter(frame_counts, urban_rural == area)
n_cluster(stage_cost = c(r, 1), icc = icc[[area]], cv = 0.10,
unit_relvar = 4, eligible_per_unit = k[[area]],
fpc = "stage", N = c(counts$N_1, counts$N))$n[["stage_2"]]
}
takes_fpc <- expand.grid(r = c(20, 40, 60, 80),
urban_rural = c("Urban", "Rural")) |>
rowwise() |>
mutate(no_fpc = take(r, icc[[urban_rural]], k[[urban_rural]]),
stage_fpc = take_fpc(r, urban_rural)) |>
ungroup() |>
mutate(across(c(no_fpc, stage_fpc), \(x) round(x, 1)))
takes_fpc
#> # A tibble: 8 × 4
#> r urban_rural no_fpc stage_fpc
#> <dbl> <fct> <dbl> <dbl>
#> 1 20 Urban 35.7 71.5
#> 2 40 Urban 50.4 71.5
#> 3 60 Urban 61.8 71.5
#> 4 80 Urban 71.3 71.5
#> 5 20 Rural 18.1 22.1
#> 6 40 Rural 25.6 31.2
#> 7 60 Rural 31.3 38.3
#> 8 80 Rural 36.2 44.2In rural areas, where clusters hold about 49 households, the correction raises the optimum, to between 22 and 44 households over the range of costs, against 18 to 36 without it. Each added household removes a larger share of the within-cluster variance than the formula counts. In urban areas, with \(\rho\) near 0.016, the corrected optimum is the whole cluster. Once every household of a cluster is interviewed, only the variance between clusters is left, and it is small. The listing already visits every household, so the extra interviews are the only added cost. The result rests on the model of a constant \(\rho\) inside small clusters, and on mCPR alone. It is a reason to test larger urban takes in a virtual survey, as Chapter 18 does, rather than a reason to interview whole EAs.
9.9 Effective sample size and degrees of freedom
The design effect has a plain reading. A cluster sample of \(n\) interviews with design effect deff is as precise as a simple random sample of \(n_{\mathrm{eff}} = n / \mathrm{deff}\). effective_n() computes it, and Basse’s 1,553 married women of 2019-20, with a DEFT of 1.645, are worth 574 women drawn at random.
The clusters also limit the degrees of freedom of a variance estimate, which are about the number of clusters minus the number of strata. design_df() counts them for a planned design.
national_df <- design_df(n_psu = 281, n_strata = 14)
lga_df <- design_df(n_psu = 30, n_strata = 2)
c(national = national_df, lga = lga_df)
#> national lga
#> 267 28
qt(0.975, c(national_df, lga_df))
#> [1] 1.968889 2.048407With 28 degrees of freedom, a 95% interval uses 2.05 instead of 1.96, and is 5% wider. The DHS formula ignores this, which is harmless above about 30 clusters per domain. A domain with fewer clusters needs more care than its design effect suggests. The sizing functions of svyplan take the count as df and then use the \(t\) quantile for a margin of error.
9.10 How the other surveys handle clustering
The Zimbabwe MICS of Chapter 26 divides its national design effect by the weighting loss and gives every province the result, a single design effect. It keeps the take of 26 households with which that design effect was measured, so it does not need \(\rho\).
The Rwanda LFS of Chapter 27 backs a correlation out of the national design effect, as this chapter does, and rebuilds each district’s design effect from the labor force members a PSU contributes in a year. Its rotation adds a twist. A household interviewed in two quarters counts twice in \(b\), and the correlation between a person’s two interviews ends up in \(\rho\).
The Malawi IHS of Chapter 28 backs a correlation of 0.23 out of the poverty design effect of IHS4. Poverty clusters far more than contraceptive use, because neighbors share land, markets and harvests. With \(\rho = 0.23\) and a cluster costing 20 household interviews, the optimal take is about 8 households, fewer than the 16 the IHS takes.
9.11 What to record
The design effect of each LGA is modeled as \(1 + (b - 1)\rho\), with \(b\) the married women interviewed per cluster in the LGA and \(\rho\) an intraclass correlation for urban and for rural areas. The correlations, 0.0157 urban and 0.0402 rural, are backed out of the urban and rural DEFTs of mCPR in Tables B.3 and B.4 of the 2019-20 GDHS, after removing the weighting loss of the 2019-20 allocation. The modeled DEFTs replace the LGA DEFTs of Appendix B, which rest on 26 to 50 clusters each. The take stays at 25 households.
inputs |>
mutate(LGA = lga, `Married women per cluster` = round(b, 1),
`Urban share` = round(urban_share, 2),
`DEFT, model` = round(sqrt(deff_model), 2),
`DEFT, 2019-20` = mcpr_deft, .keep = "none") |>
knitr::kable()| LGA | Married women per cluster | Urban share | DEFT, model | DEFT, 2019-20 |
|---|---|---|---|---|
| Banjul | 12.3 | 1.00 | 1.09 | 1.016 |
| Kanifing | 18.6 | 1.00 | 1.13 | 1.246 |
| Brikama | 27.8 | 0.74 | 1.26 | 1.086 |
| Mansakonko | 27.0 | 0.26 | 1.37 | 1.571 |
| Kerewan | 31.3 | 0.31 | 1.41 | 1.494 |
| Kuntaur | 41.8 | 0.09 | 1.60 | 1.533 |
| Janjanbureh | 34.9 | 0.22 | 1.48 | 1.867 |
| Basse | 50.9 | 0.36 | 1.60 | 1.645 |
9.12 Exercises
- With \(\rho = 0.04\), what design effect does a cluster of 40 married women give? And of 20? How many clusters of 20 give the precision of 100 clusters of 40?
- Back out a single national \(\rho\) from Table B.2 (DEFT 1.576, 8,083 married women in 281 clusters), after dividing out the national weighting loss of 1.44. How does it compare with the urban and rural values?
- Recompute the optimal take for mCPR in rural areas when a cluster costs 30 household interviews. How much precision does a take of 25 lose against it, at the same budget?
- Full vaccination has a rural DEFT of 1.166 on 873 children in 108 clusters (Table B.4). Back out its \(\rho\), ignoring the weighting loss. Why does it differ from that of mCPR?
- \(1 + 39 \times 0.04 = 2.56\) and \(1 + 19 \times 0.04 = 1.76\). Precision depends on \(n / \mathrm{deff}\). 100 clusters of 40 give \(4000 / 2.56 = 1{,}563\), and clusters of 20 give \(20 / 1.76 = 11.4\) each, so 138 clusters are needed.
- \(b = 8083 / 281 = 28.8\) and \(\mathrm{deff} = 1.576^2 / 1.44 = 1.72\), so \(\rho = 0.72 / 27.8 = 0.026\), between the urban and the rural values. A single \(\rho\) would give urban LGAs too large a design effect and rural ones too small.
take(30, icc[["Rural"]], k[["Rural"]])gives about 22 households. The variance per unit of budget is proportional to \((c_1 + c_2 m)(1 + (m k - 1)\rho) / (m k)\) for a take of \(m\) households. Evaluated at both takes, 25 households lose less than half a percent against the optimum.- \(b = 873 / 108 = 8.1\), \(\mathrm{deff} = 1.36\) and \(\rho = 0.36 / 7.1 = 0.05\). Each cluster has few children aged 12 to 23 months, so the same \(\rho\) gives a small design effect. Vaccination often depends on outreach sessions held for a whole village, which can make it cluster more than contraceptive use.