svy on Brazil’s TIC Domicílios 2025

Validation
Community
Brazil
Bootstrap
A community-led validation of svy against R’s survey package on Brazilian national ICT household microdata, covering bootstrap scale conventions and proportion estimation.
Author
Affiliation

Thiago Meireles

CETIC.br / NIC.br

Published

April 24, 2026

Modified

May 11, 2026

Keywords

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

TipTL;DR

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 svymean on an indicator (Taylor-linearized SE) and svyciprop (logit-scale SE recommended for proportions near 0 or 1) — relevant for any binary outcome.

Read the original post (Portuguese)

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 from repdesign$scale after replicate construction) and the Rao-Wu scale convention used internally by svy.
  • 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


TipCommunity signal

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.

Star svy on GitHub

Back to top