This is the replication package for the article of the same title (submitted to Social Sciences & Humanities Open). It lets anyone reproduce every model, decomposition, and robustness diagnostic reported in the article from Morocco's PISA 2022 microdata.
This version incorporates a correction found by a second, independent audit of the full submission package: Oster's (2019) stability bound was computed with the two R²-difference terms transposed relative to the source formula, giving δ = 0.003/0.010 instead of the correct δ = 0.020/0.006. The formula, the manuscript, and this package have all been corrected — see docs/codebook_variables.md, Section 6, for the full account.