% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PNADCperiods-package.R
\docType{package}
\name{PNADCperiods-package}
\alias{PNADCperiods}
\alias{PNADCperiods-package}
\title{PNADCperiods: Identify Reference Periods in Brazil's PNADC Survey Data}
\description{
The PNADCperiods package provides tools to identify the exact reference
period (month, fortnight, or week) of Brazil's quarterly official household
survey, PNADC (Pesquisa Nacional por Amostra de Domicilios Continua - IBGE),
allowing for analyzing the survey data at sub-quarterly temporal granularity.
}
\details{
The package offers four main capabilities:
\enumerate{
\item \strong{Reference period identification}: Determines which temporal
period (month, fortnight, or week) within each quarter each survey
observation refers to, using IBGE's "Parada Técnica" rules and
respondent birthdates. The identification is \strong{nested by construction}:
fortnights require months, and weeks require fortnights.
\item \strong{Period-specific weight calibration}: Adjusts survey weights
for sub-quarterly estimates using adaptive hierarchical rake weighting
(4/2/1 cell levels for month/fortnight/week respectively)
\item \strong{Experimental strategies}: Probabilistic assignment and UPA
aggregation to boost fortnight/week determination rates for sensitivity
analysis
\item \strong{SIDRA series mensalization}: Converts IBGE's rolling quarterly
(trimestre móvel) aggregate series to exact monthly estimates
}

\strong{Determination rates (strict, full series 2012-2025):}
\itemize{
\item Monthly: ~97\\%, ~98\\% with annual anchor
\item Fortnight: ~9\\%
\item Week: ~3\\%
}

With smaller datasets, rates may differ (e.g., 8 quarters: ~94\\% monthly).
Experimental strategies (probabilistic + UPA aggregation) further improve
these determination rates.

The package is highly optimized for large datasets (~450,000 rows/sec).
Uses pre-computed lookup tables for 20x faster date creation.

\strong{Note:} Strict fortnight and week determination rates are inherently low
because they cannot leverage cross-quarter aggregation like months can. Only
birthday constraints within a single quarter are available to narrow the
interview window.

The main functions are:
\itemize{
\item \code{\link{pnadc_identify_periods}}: Builds a crosswalk containing
month, fortnight, and week reference periods with IBGE calendar-based dates
\item \code{\link{pnadc_apply_periods}}: Applies the crosswalk to any
PNADC dataset and optionally calibrates weights
\item \code{\link{pnadc_experimental_periods}}: Applies experimental strategies
(probabilistic, UPA aggregation) for improved fortnight/week determination
\item \code{\link{get_sidra_series_metadata}}: Lists 86+ available PNADC
rolling quarter series from SIDRA
\item \code{\link{fetch_sidra_rolling_quarters}}: Downloads rolling quarterly
data from IBGE SIDRA API
\item \code{\link{mensalize_sidra_series}}: Converts rolling quarters to exact
monthly estimates
}
}
\references{
HECKSHER, Marcos. "Valor Impreciso por Mes Exato: Microdados e Indicadores
Mensais Baseados na Pnad Continua". IPEA - Nota Tecnica Disoc, n. 62.
Brasilia, DF: IPEA, 2020.
\url{https://portalantigo.ipea.gov.br/portal/index.php?option=com_content&view=article&id=35453}

HECKSHER, M. "Cinco meses de perdas de empregos e simulacao de um incentivo
a contratacoes". IPEA - Nota Tecnica Disoc, n. 87. Brasilia, DF: IPEA, 2020.

HECKSHER, Marcos. "Mercado de trabalho: A queda da segunda quinzena de marco,
aprofundada em abril". IPEA - Carta de Conjuntura, v. 47, p. 1-6, 2020.

IBGE. Manual Basico da Entrevista PNADC (methodology on "Parada Tecnica").
}
\seealso{
Useful links:
\itemize{
  \item \url{https://antrologos.github.io/PNADCperiods/}
  \item \url{https://github.com/antrologos/PNADCperiods}
  \item Report bugs at \url{https://github.com/antrologos/PNADCperiods/issues}
}

}
\author{
Rogerio Barbosa \email{rogerio.barbosa@iesp.uerj.br} (R package, dashboard, and website; Ceres-IESP/UERJ)

Marcos Hecksher \email{mdhecksher@gmail.com} (mensalization methodology; Ipea)
}
\keyword{internal}
