% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mensalize-sidra-series.R
\name{compute_starting_points_from_microdata}
\alias{compute_starting_points_from_microdata}
\title{Compute Starting Points from Raw PNADC Microdata}
\usage{
compute_starting_points_from_microdata(
  data,
  calibration_start = NULL,
  calibration_end = NULL,
  verbose = TRUE
)
}
\arguments{
\item{data}{Stacked PNADC microdata (multiple quarters). Must contain variables
for period identification (see \code{\link{pnadc_identify_periods}}).}

\item{calibration_start}{Integer. Start of calibration period (YYYYMM).
Default NULL uses .PNADC_DATES$DEFAULT_CALIB_START (201301).}

\item{calibration_end}{Integer. End of calibration period (YYYYMM).
Default NULL uses .PNADC_DATES$DEFAULT_CALIB_END (201912).}

\item{verbose}{Print progress messages.}
}
\value{
data.table with columns:
\describe{
\item{series_name}{Character. Series name}
\item{mesnotrim}{Integer. Month position (1, 2, or 3)}
\item{y0}{Numeric. Starting point value}
}
}
\description{
Complete workflow to compute y0 starting points from raw PNADC microdata.
This is a convenience wrapper that combines period identification, weight
calibration, z_ aggregation, and starting point computation.
}
\details{
This function performs the complete workflow:
\enumerate{
\item Build crosswalk via \code{pnadc_identify_periods()}
\item Calibrate weights via \code{pnadc_apply_periods()}
\item Compute z_ aggregates via \code{compute_z_aggregates()}
\item Fetch SIDRA rolling quarters
\item Compute starting points via \code{compute_series_starting_points()}
}
}
\section{Weight Calibration}{

All months are scaled uniformly to SIDRA monthly population totals.
}

\examples{
\dontrun{
stacked <- fst::read_fst("pnadc_stacked.fst", as.data.table = TRUE)

y0 <- compute_starting_points_from_microdata(stacked)

bundled <- pnadc_series_starting_points
comparison <- merge(y0, bundled, by = c("series_name", "mesnotrim"))
}

}
\seealso{
\code{\link{pnadc_apply_periods}} for the weight calibration step
\code{\link{compute_z_aggregates}} for the z_ aggregation step
\code{\link{compute_series_starting_points}} for the y0 computation
\code{\link{pnadc_identify_periods}} for period identification
}
