svy on Brazil’s TIC Domicílios 2025
svy validation, TIC Domicílios, CETIC.br, bootstrap replicate weights, Canty-Davison, Rao-Wu, svyciprop, Python survey analysis, Brazilian household survey, complex survey analysis Python
Summary
In April 2026, Thiago Meireles (CETIC.br) published an independent comparison of svy against R’s survey package using microdata from Brazil’s TIC Domicílios 2025. After aligning the bootstrap scale convention used by each implementation, the two libraries produce numerically identical results.
The exercise stress-tests two practical details that matter on production microdata:
- The bootstrap scale convention — Canty-Davison (R default) vs. Rao-Wu (svy default), with the producer’s own scale recoverable via
repdesign$scale. - The distinction between
svymeanon an indicator (Taylor-linearized SE) andsvyciprop(logit-scale SE recommended for proportions near 0 or 1) — relevant for any binary outcome.
Background
The TIC Domicílios survey is conducted annually by CETIC.br, the Regional Center for Studies on the Development of the Information Society at NIC.br, to measure ICT access and use across Brazilian households. The survey uses a complex multi-stage probability design with bootstrap replicate weights published by the producer.
What the analysis covers
The comparison reproduces a representative set of TIC Domicílios indicators in both R and Python, focusing on:
- Bootstrap variance estimation, including the distinction between the Canty-Davison scale convention used by R’s
survey(extracted fromrepdesign$scaleafter replicate construction) and the Rao-Wu scale convention used internally bysvy. - Proportion estimation, comparing the Taylor-linearized indicator approach (
svymean) with the logit-scale approach (svyciprop) recommended for proportions near 0 or 1. - Domain estimation by geographic area.
After aligning the bootstrap scale convention, the two implementations agree to machine precision.
Why this matters
TIC Domicílios is a production national survey at a producer-set bootstrap scale, not a textbook example. Confirming that svy reproduces R’s results on real producer microdata — once the variance conventions are made explicit — is the right kind of stress test for an analytical package. The exercise also surfaces a practical point for users: producer-published replicate weights carry scale information that downstream tools must respect.
Read the full post
→ Comparação entre survey (R) e svy (Python) — Thiago Meireles
Help make svy the standard for survey analysis in Python
If rigorous, design-based survey inference in Python matters to you, starring the repository helps signal demand and prioritize validation and stability work.