MyNixOS website logo
Description

Identify Reference Periods in Brazil's PNADC Survey Data.

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>.

PNADCperiods

CRAN status CRAN downloads R-CMD-check pkgdown codecov Lifecycle: experimental License: MIT

Convert Brazil's quarterly PNADC survey data into sub-quarterly time series (monthly, fortnightly, weekly) and mensalize IBGE SIDRA aggregate series.

Installation

Install the released version from CRAN:

install.packages("PNADCperiods")

Or the development version from GitHub:

# install.packages("remotes")
remotes::install_github("antrologos/PNADCperiods")

Main Features

  • Microdata mensalization: Identify reference months, fortnights, and weeks in PNADC microdata
  • SIDRA mensalization: Convert 86+ rolling quarterly IBGE series to exact monthly values
  • Weight calibration: Hierarchical raking to IBGE population totals
  • ~97% monthly determination with full data stacking; experimental strategies improve fortnight/week rates further

Interactive Dashboard

Explore 86+ official PNADC series with an interactive dashboard -- no R required:

https://antrologos.shinyapps.io/PNADCperiods-dashboard/

The dashboard is built on top of this package and lets you visualize mensalized series, compare strategies, and download monthly time-series as CSV.

Basic Usage

Microdata Mensalization

library(PNADCperiods)

# Build crosswalk identifying reference periods
crosswalk <- pnadc_identify_periods(pnadc_stacked)

# Apply to data with weight calibration
result <- pnadc_apply_periods(pnadc, crosswalk, weight_var = "V1028", anchor = "quarter")

SIDRA Series Mensalization

# Fetch rolling quarterly data from SIDRA
rolling <- fetch_sidra_rolling_quarters(theme = "labor_market")

# Convert to exact monthly series
monthly <- mensalize_sidra_series(rolling)

Key Functions

Microdata

FunctionDescription
pnadc_identify_periods()Build crosswalk: identify months/fortnights/weeks
pnadc_apply_periods()Apply crosswalk + calibrate weights
pnadc_experimental_periods()Boost rates with probabilistic strategies
validate_pnadc()Validate input columns

SIDRA Series

FunctionDescription
get_sidra_series_metadata()List 86+ available PNADC series
fetch_sidra_rolling_quarters()Download rolling quarter data from SIDRA
mensalize_sidra_series()Convert rolling quarters to exact monthly
fetch_monthly_population()Fetch population totals from SIDRA

Documentation

Authors

  • Rogerio J. Barbosa (Ceres-IESP/UERJ) -- R package, dashboard, and website
  • Marcos Hecksher (Ipea) -- Mensalization methodology

Credits

Original PNADC data is collected by the Brazilian Institute of Geography and Statistics (IBGE). The mensalization methodology was developed by Marcos Hecksher (Ipea) --- see Hecksher (2020, IPEA Nota Tecnica Disoc n. 62 and n. 87; Carta de Conjuntura v. 47). The R package, interactive dashboard, and documentation website were developed by Rogerio J. Barbosa at the Center for the Study of Wealth and Social Stratification (Ceres - IESP/UERJ).

Citation:

Barbosa, Rogerio J; Hecksher, Marcos. (2026). PNADCperiods: Identify Reference Periods in Brazil's PNADC Survey Data. R package version 0.1.1. https://CRAN.R-project.org/package=PNADCperiods

citation("PNADCperiods")

Getting Help

License

MIT.

Metadata

Version

0.1.2

License

Unknown

Platforms (80)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows