Skip to content

PNADCperiods

Identify Reference Periods in Brazil's PNADC Survey Data

v0.1.2 · Apr 28, 2026 · MIT + file LICENSE

Description

Identifies reference periods (months, fortnights, and weeks) in Brazil's quarterly PNADC (Pesquisa Nacional por Amostra de Domicilios Continua) survey data and computes calibrated weights for sub-quarterly analysis. The core algorithm uses IBGE (Instituto Brasileiro de Geografia e Estatistica) 'Parada Tecnica' (technical break) rules combined with respondent birthdates to determine which temporal period each survey observation refers to. Period identification follows a nested hierarchy enforced by construction: fortnights require months, weeks require fortnights. Achieves approximately 97% monthly determination rate with the full series (2012-2025). Strict fortnight and week rates are approximately 9% and 3% respectively, as they cannot leverage cross-quarter panel aggregation. Experimental strategies (probabilistic assignment and UPA (Primary Sampling Unit) aggregation) further improve these determination rates. The package provides adaptive hierarchical weight calibration (4/2/1 cell levels for month/fortnight/week) with period-specific smoothing to produce survey weights calibrated to SIDRA (Sistema IBGE de Recuperacao Automatica) population totals. Also includes a SIDRA mensalization module that converts 86+ official rolling quarter series from the IBGE SIDRA API (Application Programming Interface) into exact monthly estimates, without requiring access to microdata. Hecksher (2020) <https://repositorio.ipea.gov.br/handle/11058/9859>.

Downloads

471

Last 30 days

7524th

786

Last 90 days

786

Last year

Trend: +49.5% (30d vs prior 30d)

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE May 3, 2026
ERROR 9 OK · 0 NOTE · 0 WARNING · 3 ERROR · 0 FAILURE Apr 26, 2026
ERROR r-devel-linux-x86_64-debian-gcc

tests

Running ‘testthat.R’ [154s/357s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additiona
...[truncated]...
t(expr, classes, parentenv, handlers)
   5.         └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   6.           └─value[[3L]](cond)
  
  [ FAIL 16 | WARN 18 | SKIP 12 | PASS 1482 ]
  Error:
  ! Test failures.
  Execution halted
ERROR r-devel-linux-x86_64-fedora-gcc

tests

Running ‘testthat.R’ [203s/552s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additiona
...[truncated]...
 fetch from SIDRA API. Check internet connection.
    Error: Timeout was reached [apisidra.ibge.gov.br]:
    Connection timed out after 10002 milliseconds
  
  [ FAIL 22 | WARN 18 | SKIP 12 | PASS 1472 ]
  Error:
  ! Test failures.
  Execution halted
ERROR r-release-linux-x86_64

tests

Running ‘testthat.R’ [142s/384s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additiona
...[truncated]...
 fetch from SIDRA API. Check internet connection.
    Error: Timeout was reached [apisidra.ibge.gov.br]:
    Connection timed out after 10002 milliseconds
  
  [ FAIL 22 | WARN 18 | SKIP 12 | PASS 1472 ]
  Error:
  ! Test failures.
  Execution halted
OK 8 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 22, 2026

Dependency Network

Dependencies Reverse dependencies data.table checkmate sidrar (>= 0.2.9) lubridate PNADCperiods

Version History

updated 0.1.2 ← 0.1.1 diff Apr 28, 2026
new 0.1.1 Apr 21, 2026