View source: R/mensalize-sidra-series.R
| compute_z_aggregates | R Documentation |
Computes monthly z_ aggregates from PNADC microdata using calibrated monthly weights, with options for different population scaling approaches.
compute_z_aggregates(calibrated_data, verbose = TRUE)
calibrated_data |
PNADC microdata output from |
verbose |
Print progress messages. |
This function creates z_ indicator variables and aggregates them using the
calibrated weight_monthly from pnadc_apply_periods().
The pnadc_apply_periods() function implements the calibration
methodology as follows:
All months are scaled uniformly to SIDRA monthly population totals.
This function simply aggregates the indicators using the already-calibrated weights.
data.table with columns:
Integer YYYYMM month
Numeric weighted aggregates for each series (one column per series)
pnadc_apply_periods for the calibration step
compute_series_starting_points for the y0 computation
## Not run:
crosswalk <- pnadc_identify_periods(stacked_data)
calibrated <- pnadc_apply_periods(stacked_data, crosswalk,
weight_var = "V1028",
anchor = "quarter",
calibration_unit = "month")
z_agg <- compute_z_aggregates(calibrated)
rq <- fetch_sidra_rolling_quarters()
y0 <- compute_series_starting_points(z_agg, rq)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.