The prevented-planting specialization of the unit-to-record matching engine (see identify_cause_of_loss() for the general attribution primitive). Pools are restricted to those covered by the prevented-planting provision (pp_adm) and containing at least one Prevented stage; the cascade then resolves each claimed unit by exact financial match, sole claimant, or sole peril, with the remainder unresolved.

identify_pp_units(
  sobtpu,
  colsom,
  stage_listing,
  pp_adm,
  plans = c(1:3, 90),
  crops = NULL,
  exclude_cat = TRUE,
  prorate = TRUE,
  pp_pattern = "Prevented",
  buyup_map = c(PF = "05", PT = "10")
)

Arguments

sobtpu

Unit-level Summary of Business (modern rfcip names).

colsom

Cause-of-loss records matched to the Summary of Business.

stage_listing

Stage-code listing (stage_code, stage_code_description); joined for completeness of the taxonomy.

pp_adm

Prevented-planting actuarial records; its identifier columns define the pools where the provision exists.

plans

Insurance plan codes retained.

crops

Optional commodity codes to retain; NULL keeps all crops present in pp_adm.

exclude_cat

Drop catastrophic coverage.

prorate

Prorate unresolved pools by residual indemnity shares.

pp_pattern

Regular expression identifying prevented-planting stages in stage_code_description.

buyup_map

Named character vector mapping buy-up stage codes to election labels ("05", "10"); Prevented stages not in the map are basic.

Value

A data.table with the filtered sobtpu rows plus pp_status, pp_status_label, is_pp, pp_share_acres, pp_05pct_buy_up_share, pp_10pct_buy_up_share, and (if prorate) pp_share_indem.

Details

pp_status records HOW a unit was resolved (see pp_status_labels); is_pp records the verdict (TRUE PP, FALSE other peril, NA unresolved). pp_share_acres is the pool-level share of determined acres in Prevented stages. When prorate = TRUE, pp_share_indem carries the unit's PP indemnity share (verdict for resolved units, pool prorate for unresolved). Buy-up elections are recovered from the stage codes in buyup_map (defaults: PF = 5 percent, PT = 10 percent): pp_05pct_buy_up_share and pp_10pct_buy_up_share follow the same resolution logic, and nest inside pp_share_indem so the basic-only share is recoverable by subtraction.