Package: PNADCperiods 0.1.2

Rogerio Barbosa

PNADCperiods: 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 and Barbosa (2026) <https://osf.io/preprints/socarxiv/fra5u_v1>.

Authors:Rogerio Barbosa [aut, cre], Marcos Hecksher [aut]

PNADCperiods_0.1.2.tar.gz
PNADCperiods_0.1.2.zip(r-4.7)PNADCperiods_0.1.2.zip(r-4.6)PNADCperiods_0.1.2.zip(r-4.5)
PNADCperiods_0.1.2.tgz(r-4.6-any)PNADCperiods_0.1.2.tgz(r-4.5-any)
PNADCperiods_0.1.2.tar.gz(r-4.7-any)PNADCperiods_0.1.2.tar.gz(r-4.6-any)
PNADCperiods_0.1.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
PNADCperiods/json (API)

# Install 'PNADCperiods' in R:
install.packages('PNADCperiods', repos = c('https://antrologos.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/antrologos/pnadcperiods/issues

Pkgdown/docs site:https://antrologos.github.io

Datasets:

On CRAN:

Conda:

6.63 score 11 stars 2 scripts 469 downloads 12 exports 32 dependencies

Last updated from:34d35ba3df. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK255
source / vignettesOK226
linux-release-x86_64OK236
macos-release-arm64OK182
macos-oldrel-arm64OK200
windows-develOK185
windows-releaseOK177
windows-oldrelOK171
wasm-releaseOK156

Exports:clear_sidra_cachecompute_series_starting_pointscompute_starting_points_from_microdatacompute_z_aggregatesfetch_monthly_populationfetch_sidra_rolling_quartersget_sidra_series_metadatamensalize_sidra_seriespnadc_apply_periodspnadc_experimental_periodspnadc_identify_periodsvalidate_pnadc

Dependencies:askpassbackportscheckmateclicpp11curldata.tablegenericsgluehttrjsonlitelifecyclelubridatemagrittrmimeopensslpillarpkgconfigR6rjsonrlangrvestselectrsidrarstringistringrsystibbletimechangeutf8vctrsxml2

Applied Examples: Monthly vs Quarterly Labor Market Analysis
Introduction | Prerequisites | Preparing the Data | Step 1: Load and Mensalize Your Data | Step 2: Create Labor Market Variables | Step 3: Create Quarterly Series | Step 4: Create Monthly Series | 1. COVID-19 Unemployment: The True Peak | 2. The 2014-2017 Recession: Tracking Month-by-Month Deterioration | 3. Minimum Wage Adjustments: Validating Mensalization | Preparing the Minimum Wage Data | The Smoking Gun: January 2013 Transition | A Harder Test: The 2020 Double Adjustment | The Full Picture: 2012-2025 | Summary: What Monthly Data Reveals | 4. Beyond Monthly: Fortnightly and Weekly Analysis | Determination Rates and Experimental Strategies | Sub-Monthly Calibration Workflow | Example: COVID-19 Lockdown at Fortnightly Resolution | Example: Carnival Week Labor Market Effects | Practical Guidelines | See Also | References

Last update: 2026-05-04
Started: 2026-01-09

Complex Survey Design with Monthly Weights
Introduction | Why Standard Errors Matter | Prerequisites | Loading and Preparing Data | Strategy 1: Linearization with Strata and PSU | Setting Up a Survey Design | Monthly Time Series with Confidence Intervals | Strategy 2: Replication Weights | Comparing Strategies | Practical Example: Gender Gap in Labor Force Participation | Computing the Gender Gap | Visualizing the Results | Practical Tips | Singleton Strata | Subpopulation Analysis | Summary | References | Further Reading

Last update: 2026-05-04
Started: 2026-01-14

Download and Prepare PNADC Data
Introduction | Prerequisites | Required Packages | System Requirements | Understanding PNADC Data | Step 1: Set Up Your Environment | Step 2: Define Which Quarters to Download | Step 3: Download the Data | Step 4: Stack the Quarterly Files | Step 5: Apply Mensalization | Step 6: Explore the Results | Step 7: Save and Use the Results | Memory and Performance Tips | File Size Reference | Extending to Full History | Troubleshooting | Next Steps | References

Last update: 2026-05-04
Started: 2026-01-11

From Rolling Quarters to Monthly Estimates: SIDRA Mensalization Guide
Overview | Why Rolling Quarters Are Problematic | Quick Start | Understanding the Output | Discovering Available Series | Data Flow | Step 1: Fetching Rolling Quarter Data | Step 2: The Mensalization Transform | Step 3: Using Monthly Estimates | Population Data for Weighting | Working with Series | Fetching by Theme | Fetching Specific Series | Excluding Derived Series | Selecting Output Columns | The Mensalization Methodology | The Core Concept | The Mensalization Formula | The Role of Starting Points ($y_0$) | Assumptions and Limitations | Practical Considerations | API Caching | Common Errors | Data Quality Notes | Custom Starting Points | Option A: All-in-One Function | Option B: Step-by-Step | Validating Custom Starting Points | Case Study: COVID-19 Unemployment | Series Naming Conventions | Function Reference | References | Further Reading

Last update: 2026-05-04
Started: 2026-02-04

Get Started with PNADCperiods
Overview | Installation | Microdata Mensalization | Required Columns | Step 1: Build the Crosswalk | Step 2: Apply Crosswalk and Calibrate Weights | Step 3: Compute Monthly Estimates | Build Once, Apply Many | Monthly Series from SIDRA — No Microdata Needed | Quick Start | Discovering Available Series | Visualizing Monthly vs Rolling Quarter Data | Improving Determination Rates | Annual Data | Function Overview | Next Steps | References

Last update: 2026-05-04
Started: 2026-01-07

How PNADCperiods Works
Introduction | Why Stacked Data Matters | The Algorithm Explained | Shared Computation (Steps 1-3) | Step 1: Valid Interview Saturdays (IBGE Rules) | Step 2: Birthday Constraints | Step 3: Date to Period Position | Month Identification Pipeline (Steps 4-7) | Step 4: UPA-Panel Aggregation | Step 5: Cross-Quarter Aggregation | Step 6: Dynamic Exception Detection | Step 7: Final Assignment | Fortnight and Week Identification | Experimental Strategies | Probabilistic Strategy | UPA Aggregation Strategy | Output Columns | Caveats | Weight Calibration | 1. Fetches Monthly Population from SIDRA API | 2. Applies Hierarchical Rake Weighting | 3. Calibrates to Monthly Population Totals | Weight Smoothing | Handling Indeterminate Observations | Performance | Benchmarks | Determination Rates by Year | Tips and Best Practices | Further Reading | References

Last update: 2026-05-04
Started: 2026-01-13

Monthly Poverty Analysis with Annual PNADC Data
Introduction | Prerequisites | Complete Workflow | Step 1: Create Mensalization Crosswalk | Step 2: Load Annual PNADC Data | Step 2b: Standardize Column Names | Step 3: Apply Crosswalk and Calibrate Weights | Step 4: Construct Per Capita Income | Step 5: Apply Deflation | Step 6: Define Poverty Line | Analysis Examples | Helper Functions | Example 1: Monthly FGT Poverty Measures | Summary | Further Reading | References

Last update: 2026-05-04
Started: 2026-01-14