Skip to contents

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.

Usage

compute_starting_points_from_microdata(
  data,
  calibration_start = NULL,
  calibration_end = NULL,
  verbose = TRUE
)

Arguments

data

Stacked PNADC microdata (multiple quarters). Must contain variables for period identification (see pnadc_identify_periods).

calibration_start

Integer. Start of calibration period (YYYYMM). Default NULL uses .PNADC_DATES$DEFAULT_CALIB_START (201301).

calibration_end

Integer. End of calibration period (YYYYMM). Default NULL uses .PNADC_DATES$DEFAULT_CALIB_END (201912).

verbose

Print progress messages.

Value

data.table with columns:

series_name

Character. Series name

mesnotrim

Integer. Month position (1, 2, or 3)

y0

Numeric. Starting point value

Details

This function performs the complete workflow:

  1. Build crosswalk via pnadc_identify_periods()

  2. Calibrate weights via pnadc_apply_periods()

  3. Compute z_ aggregates via compute_z_aggregates()

  4. Fetch SIDRA rolling quarters

  5. Compute starting points via compute_series_starting_points()

Weight Calibration

All months are scaled uniformly to SIDRA monthly population totals.

See also

pnadc_apply_periods for the weight calibration step compute_z_aggregates for the z_ aggregation step compute_series_starting_points for the y0 computation pnadc_identify_periods for period identification

Examples

if (FALSE) { # \dontrun{
# Load stacked PNADC data
stacked <- fst::read_fst("pnadc_stacked.fst", as.data.table = TRUE)

# Compute starting points
y0 <- compute_starting_points_from_microdata(stacked)

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