Converts the unit-level loss attribution from identify_cause_of_loss() into peril probabilities at the pseudo-producer cell (state_code x county_code x commodity_code x type_code x practice_code). The two loss-type blocks come from FIXED source levels with no fallback:

build_peril_probabilities(unit_cause_shares)

Arguments

unit_cause_shares

List from identify_cause_of_loss() (rbind of per-year calls is fine): units, cause_shares, and optionally buyup_shares.

Value

Long data.table: pooling, commodity_year (NA for climatology rows), cell keys, cause, is_buyup, occurrence, severity.

Details

  • PP block (|pp causes + the buy-up pseudo-causes pp_05pct_buyup / pp_10pct_buyup, flagged is_buyup): county x practice level (state_code x county_code x practice_code, pooled across commodities) – prevented planting is driven by county-wide planting conditions, but differs by practice (e.g. irrigated vs not).

  • Prod block (|prod causes): county x commodity x practice level (state_code x county_code x commodity_code x practice_code, pooled across types).

Two measures per cause, computed at the block's source level: occurrence – the liability-weighted probability the cause strikes (liability on units with a positive indemnity share for the cause, over the level's total liability) – and severity – the damage rate given a strike (the cause's indemnity dollars over that hit liability). Their product is the cause's loss cost. Both are computed at two poolings: "year" (per commodity_year, realized experience) and "climatology" (all years pooled). Cells whose source level has no attributed experience simply get no rows (zeros after the wide attach; a zero severity there means "no data", not "harmless").