n <- 9800
p <- 0.15
patterns <- c(`2-2-2` = "2-2-2", `four in a row` = "4",
`eight in a row` = "8")
overlaps <- c(list(independent = c(0, 0, 0)),
lapply(patterns, \(pattern)
as.numeric(design_overlap(design_rotation(pattern),
max_lag = 3))))
interviews <- c(independent = 1,
sapply(patterns, \(pattern)
attr(design_rotation(pattern), "in_sample")))
lapply(names(overlaps), \(rotation) {
overlap <- overlaps[[rotation]]
tibble(rotation, overlap_1 = overlap[1],
interviews = interviews[[rotation]],
se_change = prec_change(p = c(p, p), n = n, deff = 1.6,
overlap = overlap[1],
overlap_cor = 0.4)$se,
se_average = prec_pooled(p = p, n = n, occasions = 4, deff = 1.6,
overlap = overlap,
cor_decay = 0.4)$se)
}) |>
bind_rows() |>
mutate(across(starts_with("se"), \(x) round(x, 5)))
#> # A tibble: 4 × 5
#> rotation overlap_1 interviews se_change se_average
#> <chr> <dbl> <dbl> <dbl> <dbl>
#> 1 independent 0 1 0.00645 0.00228
#> 2 2-2-2 0.5 4 0.00577 0.00261
#> 3 four in a row 0.75 4 0.0054 0.00283
#> 4 eight in a row 0.875 8 0.0052 0.0029420 Rotating panels and master samples
A labor force survey publishes three kinds of figures. The unemployment rate of each quarter is a level. Its rise or fall since the last quarter is a change. The rate of the year, the average of four quarters, is an average. One sample serves all three, but not equally well. Interviewing the same households again helps the change and hurts the average, and the level does not care.
This chapter explains that trade-off, the rotation patterns that set it, and the master sample from which a rotating survey takes each quarter. It follows the Rwanda LFS of Chapter 27, which interviews a household in two consecutive quarters, rests it for two and returns for two more. It then weights a panel that follows people as their households change, and it ends with a virtual survey of three rotations on a synthetic Rwanda.
20.1 Three estimands, one overlap
Suppose each occasion’s estimate has variance \(V\), a share \(f\) of the sample is common to two occasions, and the outcome has correlation \(\rho\) between occasions among the common units. Then \[ V(\hat Y_2 - \hat Y_1) \approx 2V (1 - f\rho), \qquad V\!\left(\tfrac{1}{2}(\hat Y_1 + \hat Y_2)\right) \approx \tfrac{1}{2} V (1 + f\rho). \] The level’s variance is \(V\) whatever \(f\) is.
A change subtracts the two estimates, and their covariance, positive when the same units are measured twice, cancels part of the noise. An average adds them, and the same covariance adds noise. With independent samples, \(f = 0\), the change has twice the variance of a level and the average half.
prec_change() and prec_pooled() compute both for a design. For the Rwanda LFS, a quarter interviews about 9,800 labor force members, the unemployment rate is near 15%, and a person’s status is correlated between quarters. The correlation of 0.4 below is an illustration, not an estimate.
The longer a household stays, the larger the overlap, the better the change and the worse the average. A rotation is a choice of where on that line to sit, and of how often to ask a household, the burden that interviews counts.
20.2 Rotation patterns
design_rotation() writes a pattern as spells in and out of sample. The 2-2-2 of the Rwanda LFS is two quarters in, two out and two in. design_overlap() gives the share of one quarter’s sample found again at each lag.
rwanda <- design_rotation("2-2-2")
design_overlap(rwanda, max_lag = 5)
#> Rotation overlap (planning)
#>
#> life: 6 periods, 4 in sample each period
#> rotation: 2 in, 2 out, 2 in
#>
#> lag shared overlap
#> 1 2 0.5
#> 2 0 0
#> 3 1 0.25
#> 4 2 0.5
#> 5 1 0.25plot(design_rotation("1-1-0-0-1-1"))
Consecutive quarters share half their sample, and so do the same quarters of two consecutive years. The change from one quarter to the next and the change over a year both gain. The quarters two and three apart share nothing.
20.3 Backtest
The United States Current Population Survey uses a 4-8-4 pattern, four months in, eight out and four in, and its documentation gives 75% overlap between consecutive months and 50% between the same months of two years (U.S. Census Bureau and U.S. Bureau of Labor Statistics 2019). The Rwanda methodology gives 50% for both of its own lags and a household interviewed 1.8 times a year on average (National Institute of Statistics of Rwanda 2024).
cps <- design_overlap(design_rotation("4-8-4"))
c(cps_month = cps[[1]], cps_year = cps[[12]],
rwanda_quarter = design_overlap(rwanda)[[1]],
rwanda_year = design_overlap(rwanda)[[4]],
rwanda_visits = design_overlap(rwanda, window = 4)$visits)
#> cps_month cps_year rwanda_quarter rwanda_year
#> 0.750000 0.500000 0.500000 0.500000
#> rwanda_visits
#> 1.777778The pattern notation reproduces the published figures of both surveys.
20.4 The master sample
A rotating survey does not select a new sample every quarter. It selects a single master sample that holds every panel to be fielded over a horizon, and takes each quarter’s active panels from it. The PSUs are selected once, the panels are spread over each stratum like the whole sample, and the overlap between quarters is fixed by design rather than by chance. The households of a panel are drawn when it enters, from a listing of its PSUs made then.
Chapter 27 selected the master sample of the Rwanda LFS, 13 panels for eight quarters. panels = gave the schedule, the panels in the field each quarter. execute(master, listing, period = ) drew the households of each panel in the quarter it entered; execute(period = ) gave the sample of one quarter, whose weights carry the activation of its panels; and a window of four periods gave the year. The schedule for four quarters of 2-2-2 needs nine panels, since four must already be in the field, at different points of their life, in the first quarter.
schedule <- rotation_schedule(c(0, 1, 4, 5))
schedule
#> [,1] [,2] [,3] [,4]
#> [1,] TRUE FALSE FALSE FALSE
#> [2,] TRUE TRUE FALSE FALSE
#> [3,] FALSE TRUE TRUE FALSE
#> [4,] FALSE FALSE TRUE TRUE
#> [5,] TRUE FALSE FALSE TRUE
#> [6,] TRUE TRUE FALSE FALSE
#> [7,] FALSE TRUE TRUE FALSE
#> [8,] FALSE FALSE TRUE TRUE
#> [9,] FALSE FALSE FALSE TRUE
colSums(schedule)
#> [1] 4 4 4 4Each row is a panel and each column a quarter, TRUE where the panel is interviewed. The first rows are panels that the start finds at different points of their life, some in their last interviews, two in their gap. The last rows enter later in the year. Every quarter has four active panels, as the column sums show.
Two checks belong to an executed master. joint_expectation() reports the overlap the master realizes, which can differ slightly from the planned one when a stratum’s PSUs do not divide into whole panels. stack_periods() puts two periods of the same master into one long table, the hand-off to a longitudinal analysis. Neither chooses a variance estimator for a change. Section 20.6 gives the one the design implies, before the response process enters.
20.5 The standard error of a window
A window of four quarters estimates the average of the four quarterly totals. samplyr builds it as statistical agencies build an annual figure from a continuous survey: each quarter keeps its own weights, divided by the number of quarters, so each quarter counts once however many households it holds. Kish (1999) calls this combining statistics, as opposed to cumulating cases, which pools the rows with one weight per unit and so weights each quarter by its sample size. The two agree only when every quarter holds the same number of panels.
The variance needs one more step. A panel fixes the quarters in which a PSU is interviewed, and the panel labels are given out in blocks of a stratum’s PSUs, each block holding the panels in fixed numbers. So the number of PSUs of a block that share a set of quarters is fixed by design and does not vary between samples. Call these groups of PSUs cells. They are the strata of a second phase.
Let \(u_i\) be PSU \(i\)’s contribution to the window total, the sum over its quarters of its quarterly weight times its outcome, divided by the number of quarters. With the cells \(c\) as strata, \[ v = \sum_c \frac{n_c}{n_c - 1} \sum_{i \in c} (u_i - \bar u_c)^2 . \] A cell with one PSU is merged with the cell of the same quarters in the next block. Merged blocks carry different activation multipliers \(m_i\), and the residuals become \(u_i - m_i \bar u_c / \bar m_c\), the ratio-adjusted collapsed-strata estimator (Hansen et al. 1953; Wolter 2007, sec. 2.5).
as_svydesign() builds this design. It crosses the strata with the cells and calibrates on each cell’s total of the multipliers. This leaves the weights as they are and gives the ratio residuals. The PSUs still left alone are pooled into one stratum. A single PSU left alone joins the cell of its stratum whose PSUs are active in the nearest number of quarters. A PSU found empty enters its cell with a zero total and the multiplier of the cell. as_svrepdesign() calibrates its replicates the same way.
A master of 20 EAs in each region of Burkina Faso, over the nine panels of the schedule above, shows the method at work. The outcome is a synthetic count of households with a member in work, which rises in the second quarter and falls in the fourth.
grid <- data.frame(panel = as.vector(row(schedule)),
period = as.vector(col(schedule)),
active = as.vector(schedule))
ea_design <- sampling_design() |>
stratify_by(region) |>
cluster_by(ea_id) |>
draw(n = 20, method = "pps_brewer", mos = households)
set.seed(1)
ea_effect <- rnorm(nrow(bfa_eas))
season <- c(0, 0.3, 0, -0.3)
working <- function(ea, quarter) {
i <- match(ea, bfa_eas$ea_id)
bfa_eas$households[i] * plogis(0.4 + 0.5 * ea_effect[i] + season[quarter])
}
master <- execute(ea_design, bfa_eas, seed = 7, panels = grid)
year <- execute(master, period = 1:4)
year$working <- working(year$ea_id, year$.period)
totals <- list(
linearized = survey::svytotal(~working, as_svydesign(year)),
jackknife = survey::svytotal(~working, as_svrepdesign(year, type = "JKn"))
)
tibble(variance = names(totals),
total = round(sapply(totals, coef)),
se = round(sapply(totals, survey::SE)))
#> # A tibble: 2 × 3
#> variance total se
#> <chr> <dbl> <dbl>
#> 1 linearized 1782752 22636
#> 2 jackknife 1782752 22639The two routes give the same total, since the calibration does not move the weights, and standard errors within a fraction of a percent of each other.
Repeating the master many times shows whether the standard error matches the spread of the estimate, here with 20 EAs per region and with 6, fewer than the nine panels.
truth <- mean(sapply(1:4, \(q) sum(working(bfa_eas$ea_id, q))))
window_check <- function(n, reps = 300) {
design <- sampling_design() |>
stratify_by(region) |>
cluster_by(ea_id) |>
draw(n = n, method = "pps_brewer", mos = households)
runs <- sapply(seq_len(reps), \(seed) {
year <- execute(execute(design, bfa_eas, seed = seed, panels = grid),
period = 1:4)
year$working <- working(year$ea_id, year$.period)
total <- survey::svytotal(~working, as_svydesign(year))
c(estimate = coef(total), se = survey::SE(total))
})
tibble(eas_per_region = n,
bias = mean(runs[1, ]) / truth - 1,
se_over_sd = mean(runs[2, ]) / sd(runs[1, ]),
coverage = mean(abs(runs[1, ] - truth) <= 1.96 * runs[2, ]))
}
checks <- bind_rows(window_check(20), window_check(6))
mutate(checks, across(where(is.numeric), \(x) round(x, 3)))
#> # A tibble: 2 × 4
#> eas_per_region bias se_over_sd coverage
#> <dbl> <dbl> <dbl> <dbl>
#> 1 20 0.001 1.05 0.957
#> 2 6 0.001 1.15 0.963With 20 EAs per region the standard error is 1.05 times the spread of the estimate, and 95% intervals cover the true total in 96% of the samples. With 6 EAs, fewer than the panels, it is 1.15 times the spread. Many PSUs then share their quarters with no other PSU of their stratum, and pooling them errs on the side of a larger variance, so intervals are conservative. A master with at least as many PSUs per stratum as panels avoids that.
20.6 The standard error of a change
The change between two quarters is estimated from their window. Each quarter enters the window at half its weight, so the change is the window’s total of the outcome times 2 in the later quarter and -2 in the earlier. as_svydesign() gives its standard error with the cells of the window, which carry the covariance of the PSUs interviewed in both. A design built by hand on the table of stack_periods() has to cross the strata with the panels, the second-phase strata of the activation. Without them it mixes the totals of panels interviewed in one quarter only.
quarters <- execute(master, period = 1:2)
quarters$change <- ifelse(quarters$.period == 2, 2, -2) *
working(quarters$ea_id, quarters$.period)
stacked <- stack_periods(execute(master, period = 1),
execute(master, period = 2))
stacked$change <- ifelse(stacked$period == 2, 1, -1) *
working(stacked$ea_id, stacked$period)
on_stack <- function(strata) {
survey::svydesign(ids = ~ea_id, strata = strata, weights = ~design_weight,
nest = TRUE, data = stacked)
}
changes <- list(
window = survey::svytotal(~change, as_svydesign(quarters)),
stack_by_panel = survey::svytotal(
~change, on_stack(~interaction(region, panel, drop = TRUE))
),
stack_by_region = survey::svytotal(~change, on_stack(~region))
)
tibble(design = names(changes),
change = round(sapply(changes, coef)),
se = round(sapply(changes, survey::SE)))
#> # A tibble: 3 × 3
#> design change se
#> <chr> <dbl> <dbl>
#> 1 window 175173 34849
#> 2 stack_by_panel 175173 40846
#> 3 stack_by_region 175173 204246The three give the same change. Stratified by region alone, the stack’s standard error is several times the others. Crossed with the panels it is above the window’s, since it leaves out the quota blocks. Over 300 masters of this design, with 20 or 40 EAs per region, the window’s standard error was 0.95 to 0.99 times the spread of the change between quarters 1 and 2, or 1 and 4, and the stack’s crossed with the panels 1.10 to 1.30.
20.7 Attrition and refreshment
A household interviewed four times does not always answer four times. Some move, some refuse after the first visit. n_panel() turns a target into the number of households to recruit, given the response at recruitment and the retention from one visit to the next. The rates below are illustrations.
target <- n_prop(p = 0.15, cv = 0.05, deff = 1.6)
n_panel(target, retention = c(0.92, 0.95, 0.95), resp_rate = 0.90,
design = "rotating")
#> Panel recruitment (rotating, 4-wave life)
#> entrants: 1112 per period -> 3627 responding, pooled over 4 cohorts
#> proportion (wald): se = 0.007499, moe = 0.0147, cv = 0.05
#>
#> wave retention n_resp se moe
#> 1 1001 0.01428 0.02798
#> 2 0.92 921 0.01488 0.02917
#> 3 0.95 875 0.01527 0.02993
#> 4 0.95 831 0.01567 0.03071
#>
#> # summary() for the start-up, the loss and per-wave cvA rotating design has a second question: how the first quarter starts. An immediate start fills the sample on the first occasion with panels assigned different remaining lives, as the Rwanda schedule does, and a gradual start recruits one panel per quarter and reaches full size later. design_schedule() turns the plan into a fieldwork manifest (the selection each period draws and the cohorts it opens).
A design can also hold a reserve. It selects more households than it needs, splits them at random into panels, and releases the reserve panels, in every cluster, if response falls short. A release is a probability subsample, and its weights stay exact, which a replacement in the field does not offer (Chapter 12).
release <- data.frame(
panel = rep(1:5, times = 2),
period = rep(1:2, each = 5),
active = c(TRUE, TRUE, TRUE, TRUE, FALSE, rep(TRUE, 5))
)
reserve_master <- sampling_design() |>
stratify_by(stratum) |>
cluster_by(psu) |>
draw(n = 10, method = "pps_systematic", mos = households) |>
execute(rwa_psus(), seed = 11, panels = release)
c(issued = nrow(reserve_master),
main = nrow(execute(reserve_master, period = 1)),
with_reserve = nrow(execute(reserve_master, period = 2)))
#> issued main with_reserve
#> 360 288 360The main release opens four panels of five, and the second opens the reserve as well. Releasing whole reserve panels only where response was poor would make the release depend on the outcome, which the panel weights do not describe. Replacing failed units one at a time from an ordered list keeps the totals unbiased (Section 17.4).
20.8 Following people when households change
A rotating survey returns to the same dwellings and interviews whoever lives there. A longitudinal panel follows people. Between two waves some people die, some leave to set up a household of their own, and children are born, so the households of the second wave are not those sampled at the first. The usual following rule keeps every member of a wave-1 sample household in the panel wherever they move, and interviews everyone living with them at later waves (Smith et al. 2009). A person who joins such a household is interviewed while they live there, but is not followed after they leave.
The weights of a later wave come from the weight share method of Chapter 23. The wave-1 households are the source units. The targets are the people of the households reached at the later wave, and those households are the clusters inside which weight is shared. A link runs from each original member still in the population to their wave-1 household. The multiplicity of a target counts its links in the whole population: 1 for anyone who lived in the population at wave 1, sampled or not, and 0 for a baby or a newcomer. Fieldwork obtains it by asking every member where they lived at wave 1.
The population below has 2,000 households at wave 1. A year later, some people have died or left their household, a few households have a baby, and 40 households have arrived from elsewhere. Person ids carry over from one wave to the next, and household ids do not.
set.seed(1)
size <- 1 + rpois(2000, 1.8)
wave1 <- tibble(person_id = seq_len(sum(size)),
hh_id = rep(1:2000, size),
region = rep(c("north", "south"), 1000)[hh_id],
income = round(rgamma(sum(size), 2, 1 / 500)),
in_w1 = 1L)
# 3% die, incomes grow, and 8% leave to live alone.
wave2 <- wave1 |>
filter(runif(n()) > 0.03) |>
mutate(income = round(income * runif(n(), 1, 1.2)),
hh_id = if_else(runif(n()) < 0.08, 100000L + row_number(), hh_id))
born_in <- unique(wave2$hh_id)[runif(n_distinct(wave2$hh_id)) < 0.05]
arrivals <- 1 + rpois(40, 1.5)
wave2 <- bind_rows(
wave2,
tibble(person_id = 9000L + seq_along(born_in), hh_id = born_in,
region = wave2$region[match(born_in, wave2$hh_id)],
income = 0, in_w1 = 0L),
tibble(person_id = 10000L + seq_len(sum(arrivals)),
hh_id = rep(200000L + 1:40, arrivals),
region = rep(sample(c("north", "south"), 40, TRUE), arrivals),
income = round(rgamma(sum(arrivals), 2, 1 / 500)), in_w1 = 0L))
head(wave2, 4)
#> # A tibble: 4 × 5
#> person_id hh_id region income in_w1
#> <int> <int> <chr> <dbl> <int>
#> 1 1 1 north 1888 1
#> 2 2 1 north 1709 1
#> 3 3 2 south 317 1
#> 4 4 2 south 127 1
bind_rows(wave_1 = wave1, wave_2 = wave2, .id = "wave") |>
summarise(households = n_distinct(hh_id), people = n(),
new_people = sum(in_w1 == 0), income = sum(income), .by = wave)
#> # A tibble: 2 × 5
#> wave households people new_people income
#> <chr> <int> <int> <int> <dbl>
#> 1 wave_1 2000 5555 0 5643223
#> 2 wave_2 2430 5577 204 6097418Each wave is a roster with one row per person. in_w1 marks the people who lived in the population at wave 1. The summary shows the households multiplying as people leave to live alone, and the people born or arrived since wave 1.
The panel is a stratified sample of 60 households per region. Its rows are households, so the original members come from the wave-1 roster of the selected households. follow() builds the targets and links of one wave. Targets and households are keyed by the wave, so that several waves can later be weighted in one call.
panel <- sampling_design() |>
stratify_by(region) |>
cluster_by(hh_id) |>
draw(n = 60) |>
execute(distinct(wave1, hh_id, region), seed = 7)
members <- semi_join(wave1, panel, by = "hh_id") |>
select(person_id, hh_id)
follow <- function(roster, wave) {
alive <- semi_join(members, roster, by = "person_id")
reached <- filter(roster, hh_id %in% hh_id[person_id %in% alive$person_id])
list(targets = mutate(reached, key = paste(wave, person_id), wave,
hh_t = paste(wave, hh_id), income, in_w1,
.keep = "none"),
links = mutate(alive, hh_1 = hh_id,
key = paste(wave, person_id), .keep = "none"))
}
w2 <- follow(wave2, 2)
head(w2$targets, 4)
#> # A tibble: 4 × 5
#> income in_w1 key wave hh_t
#> <dbl> <int> <chr> <dbl> <chr>
#> 1 925 1 2 34 2 2 12
#> 2 1478 1 2 35 2 2 12
#> 3 2382 1 2 103 2 2 36
#> 4 929 1 2 104 2 2 36
head(w2$links, 4)
#> # A tibble: 4 × 2
#> hh_1 key
#> <int> <chr>
#> 1 12 2 34
#> 2 12 2 35
#> 3 36 2 103
#> 4 36 2 104
panel_w2 <- share_weights(panel, targets = w2$targets, links = w2$links,
by = c(hh_id = "hh_1"), to = c(key = "key"),
within = hh_t, multiplicity = in_w1)
survey::svytotal(~income, as_svrepdesign(panel_w2, type = "JKn"))
#> total SE
#> income 5408717 323638The targets are the people of the reached households at wave 2, with the household hh_t inside which weight is shared. The links tie each original member, by the same key, to the wave-1 household hh_1 it was sampled with. A baby or a newcomer has a target row and no link.
When an original member moves in with a person from an unselected household, their new household holds two wave-1 people and receives half the weight of the member’s original household. A baby takes the weight of the household it is born in. Here 1 of the 120 selected households has no member left at wave 2. as_svydesign() refuses such a sample, since that household is still a sampled unit for the variance but contributes no target row. as_svrepdesign() replicates the whole wave-1 design before sharing the weights, and type = "JKn" is the jackknife that survey accepts for a stratified design.
A change needs one more step. Two waves weighted separately give two estimates with no covariance, although they come from the same households. One call over both waves keeps it.
both <- list(follow(wave1, 1), w2)
panel_both <- share_weights(
panel,
targets = bind_rows(lapply(both, \(w) w$targets)),
links = bind_rows(lapply(both, \(w) w$links)),
by = c(hh_id = "hh_1"), to = c(key = "key"),
within = hh_t, multiplicity = in_w1) |>
mutate(change = if_else(wave == 2, income, -income))
reps <- as_svrepdesign(panel_both, type = "JKn")
change <- survey::svytotal(~change, reps)
by_wave <- survey::svyby(~income, ~wave, reps, survey::svytotal)
tibble(estimate = coef(change)[[1]], se = survey::SE(change)[[1]],
se_independent = sqrt(sum(survey::SE(by_wave)^2)),
truth = sum(reachable$income) - sum(wave1$income)) |>
mutate(across(everything(), round))
#> # A tibble: 1 × 4
#> estimate se se_independent truth
#> <dbl> <dbl> <dbl> <dbl>
#> 1 320067 70986 442276 351005The standard error of the change is about a sixth of what two independent samples of the same size would give. The truth here is the change in the population the panel represents, which leaves out the 40 households that arrived after wave 1. No original member lives in them, nor in a household made only of children born since. Their income, 1.7% of the wave-2 total, needs a sample of its own, drawn from a register of new households or by screening a fresh cross-section for households with nobody present at wave 1. The two samples are independent, so their totals and their variances add.
20.9 Virtual survey
rwa_population() builds a synthetic Rwanda in a few seconds. Each of the 3.3 million households of the frame receives labor force members at its district’s participation rate, and each member an unemployment status in four quarters. The status comes from a latent score with a district level at the 2024 rate, an EA effect and a household effect that stay the same from quarter to quarter, and a person effect that carries over with a correlation of 0.6. virtual_panel() draws a master sample of the plan of Chapter 27 1,000 times, splits it into the panels of a schedule, and estimates the national rate of each quarter, the change from the first quarter to the second, and the average of the four.
pop <- rwa_population()
plan <- rwa_plan()
c(psus = nrow(pop$psus), households = length(pop$household_psu),
members = nrow(pop$status))
#> psus households members
#> 23705 3291154 4884765
head(pop$status, 3)
#> [,1] [,2] [,3] [,4]
#> [1,] 0 0 0 0
#> [2,] 0 1 0 0
#> [3,] 0 0 0 0
round(colMeans(pop$status), 3)
#> [1] 0.149 0.149 0.149 0.149
round(cor(pop$status[, 1], pop$status[, 2]), 2)
#> [1] 0.41The population is stored compactly. pop$status has one row per labor force member and one column per quarter, 1 for unemployed. The rate stays near 15% in every quarter, and a person’s status in two consecutive quarters has the correlation printed last. plan gives each stratum its PSUs per quarter, as Chapter 27 sets them.
designs <- list(independent = 0, `2-2-2` = c(0, 1, 4, 5),
`four in a row` = 0:3)
virtual <- lapply(designs, \(offsets)
virtual_panel(pop, plan, rotation_schedule(offsets), reps = 1000,
seed = 2))
bind_rows(virtual, .id = "rotation") |>
filter(estimate %in% c("Q1", "change", "average")) |>
select(rotation, estimate, true_se) |>
tidyr::pivot_wider(names_from = estimate, values_from = true_se) |>
mutate(across(where(is.numeric), \(x) round(x, 5)))
#> # A tibble: 3 × 4
#> rotation Q1 change average
#> <chr> <dbl> <dbl> <dbl>
#> 1 independent 0.00455 0.00647 0.0022
#> 2 2-2-2 0.00442 0.00532 0.00265
#> 3 four in a row 0.00438 0.0046 0.00311The level is equally precise under the three rotations, as the formula says. The change gains with overlap, and the average loses, as the trade-off table predicted. One number differs from the formula. Under 2-2-2, the change has a true standard error of 0.00532, where the formula, with the correlation of a person’s status between two quarters in the synthetic population, 0.41, predicts 0.00574. The rotation keeps the same households in the same PSUs, so the EA and household effects, which do not change from one quarter to the next, also cancel in the difference. The correlation that matters for a cluster sample is that of the cluster estimates, which is larger than the correlation of a person’s answers. A planner who has only a person-level correlation will slightly understate what a rotating panel buys for change.
20.10 How the other surveys repeat
A DHS or a MICS is a repeated cross-section. Each round draws a new sample, often from a new frame, about five years after the last. A change between two rounds is the difference of two independent estimates, with twice the variance of a level, and comparing LGAs between rounds needs that variance. The Malawi IHS adds a panel to its cross-sections, following a subsample of households from one round to the next. The panel serves change, and the cross-section serves the level of each round.
20.11 What to record
The survey uses a 2-2-2 rotation. A household is interviewed in two consecutive quarters, rests for two and is interviewed in two more, so consecutive quarters share half their sample and so do the same quarters of consecutive years. The PSUs of all panels of the next eight quarters form a master sample, selected and listed once, and each quarter’s sample is its four active panels. The weights of a quarter carry the activation of its panels. An annual estimate averages the four quarterly estimates, each quarter with its own weights. Its variance treats the PSUs of a block that share a set of quarters as a stratum, with a ratio adjustment where blocks are merged.
20.12 Exercises
- Compute the overlaps of a 3-9-3 pattern at lags 1 and 12. Which estimand does it favor compared with 4-8-4?
- Rerun the trade-off table with a correlation of 0.8. Which rotation now gives the most precise change, and at what cost to the average?
- Run
virtual_panel()withrwa_population(persistence = 0), so that a person’s status does not carry over beyond the EA and household effects. How much does 2-2-2 still gain for change? - Why does a rotation that keeps the same EAs but takes new households each quarter still gain for change?
- Weight the two waves of the followed panel with two separate calls to
share_weights(). Why can their two variances not give the variance of the change?
design_overlap(design_rotation("3-9-3"))gives 2/3 at lag 1 and 1/2 at lag 12. Against 4-8-4, it gives the monthly change a little less overlap and the yearly change the same, and asks a household six times instead of eight.- The gain for change grows with the correlation, so eight in a row gives the most precise change, and its average loses the most.
- The true standard error of the change is about 0.0059 under 2-2-2 against 0.0063 with independent quarters. The gain is smaller than with a persistence of 0.6 but does not vanish, since the EA and household effects still cancel in the difference of the overlapping panels.
- The EA effect is the same in both quarters, so the cluster estimates of the two quarters are correlated even when the households differ. The gain is smaller than with the same households, since the household and person effects no longer cancel.
- The two estimates come from the same wave-1 households, so they are strongly correlated, and the covariance is not in either shared sample. Adding the two variances treats the waves as independent and gives a standard error of about 442,276, against 70,986 from the single call.