3 What are replicate weights
AMPLab does not use a simple random sample of students. Instead, students are selected through a complex multi-stage sampling design involving schools, classrooms and students. As a result, observations are not statistically independent and standard formulas for standard errors are inappropriate.
If we ignored the sampling design and analysed the data using ordinary weighted statistics, point estimates such as means would often remain similar, but standard errors would usually be underestimated.
The idea behind replicate weights
Replicate weights provide a practical way of estimating sampling variance.
Rather than calculating standard errors directly from information about strata and primary sampling units, AMPL supplies a series of alternative weights known as replicate weights. Each replicate weight reflects a slightly modified version of the original sample.
The statistic of interest is calculated repeatedly:
- Once using the final weight.
- Once for each replicate weight.
The variation across these replicate estimates is then used to calculate the sampling variance.
Replicate weights in AMPL
AMPL uses the paired jackknife replication method.
In statistical resampling, the delete-one jackknife (leave-one-out) omits a single observation per iteration, generating n subsamples. The paired jackknife (delete-groups) omits predefined clusters or pairs of observations together. Delete-one is standard for simple, small datasets; the paired approach is essential for complex, stratified survey data where dropping single random observations would destroy the correlation structures and clustering inherent in the data. For practical purposes, this means that the replicate weights supplied in the AMPL dataset should be used as-is. Researchers do not need to create or modify them.
The student-level dataset contains:
| Dataset | Final weight | Replicate weights |
|---|---|---|
| AMPL | fwgt | rwgt1-rwgt135 |
The final weight (fwgt) is used to produce population estimates. The replicate weights are used to estimate standard errors.
Fortunately, researchers do not need to perform these calculations manually. R packages such as Rrepest and Stata’s survey commands perform these calculations automatically.
The paired jackknife variance estimator can be written as:
\[ \mathrm{Var}(\hat{\theta}) = \sum_{r=1}^{R} (\hat{\theta}_r - \hat{\theta})^2 \]
where
\(\hat{\theta}\) is the estimate using the final weight fwgt
\(\hat{\theta}_r\) is the estimate using replicate weight \(r\) (rwgt1-rwgt135)
\(R\) is the number of replicate weights (\(R = 135\)).
The standard error is \(\sqrt{\mathrm{Var}(\hat{\theta})}\)
Because age is an observed variable, only this sampling variance is needed — there is no imputation variance to combine.
3.1 Worked example: mean age in The Gambia (Grade 3)
The following example estimates the weighted mean age (s_age) of Grade 3 students in The Gambia, excluding missing values coded as \(9999\). Each mean is calculated using the final weight or one of the \(135\) paired jackknife replicate weights.
Step 1: Calculate the weighted mean using fwgt:
\[ \hat{\theta} = 10.7444 \]
Step 2: Calculate the weighted mean using each replicate weight \(\hat{\theta}_r\).
| Mean | |
|---|---|
| rwgt1 | 10.74426 |
| rwgt2 | 10.74374 |
| rwgt3 | 10.74488 |
| rwgt4 | 10.74812 |
| \(\vdots\) | \(\vdots\) |
| rwgt135 | 10.74445 |
The first and last few replicates are shown below; the same calculation is repeated for all 135 replicate weights.
Step 3: For each replicate, calculate the squared deviation from the final estimate:
| \(\hat{\theta}_r\) | \((\hat{\theta}_r - \hat{\theta})^2\) | |
|---|---|---|
| rwgt1 | 10.74426 | 0.00000003 |
| rwgt2 | 10.74374 | 0.00000049 |
| rwgt3 | 10.74488 | 0.00000019 |
| rwgt4 | 10.74812 | 0.00001352 |
| \(\vdots\) | \(\vdots\) | \(\vdots\) |
| rwgt135 | 10.74445 | 0.00000000 |
The replicate means are all very close to \(\hat{\theta}\), so each squared deviation is small.
Step 4: The sampling variance is the sum of the squared deviations across all 135 replicates
\[ \mathrm{Var}(\hat{\theta}) = \sum_{r=1}^{135} (\hat{\theta}_r - \hat{\theta})^2 = 0.001125 \]
(with AMPL’s JK2 variance factor equal to 1).
Step 5: Standard error
\[ SE = \sqrt{0.001125} = 0.0335 \]
Summary
| Quantity | Symbol | Value |
|---|---|---|
| Point estimate | \(\hat{\theta}\) | 10.74 |
| Sampling variance | \(\mathrm{Var}(\hat{\theta})\) | 0.0011 |
| Standard error | \(SE\) | 0.03 |
The estimated mean age is \(10.74\) years with a standard error of \(0.03\)
years. This matches the result obtained using repest or Rrepest in
the Stata and R chapters, where the jackknife calculation is carried out
automatically.