Generates a menu of insurance options (none, group/area, individual/APH) for a given farm dataset, year, and desired protection levels.

construct_menu_option_fcip(
  farmdata,
  farm_identifiers = NULL,
  year = 2020,
  protection_level = c("individual", "group", "none"),
  premium_subsidy_control = NULL,
  control = rfcipPackage_controls()
)

Arguments

farmdata

A data.table of farm-level input. contain at least all columns required by rfcipCalcPass::fcip_calculator()

farm_identifiers

column name(s) that uniquely identify each record/farm/producer. If NULL, a "producer_id" column is created.

year

Numeric scalar giving the target insurance crop year (e.g. 2024). Default is 2020.

protection_level

Character vector specifying which menus to include. Can include any of "individual", "group", and "none". Default is all.

premium_subsidy_control

A named list of adjustment functions, typically created using rfcipCalcPass::premium_subsidy_control_functions(). If NULL, the default adjustment functions are used.

control

a list of control parameters passed to rfcipCalcPass::fcip_calculator(); see rfcipPackage_controls and rfcipCalcPass::fcip_calculator()

Value

A data.table: Each row corresponds to one farm & unit structure, insurance plan, coverage type, and coverage level combination, with columns for premium rate, subsidy rate, user defind farm identifier in farm_identifiers and all fields in rfcipCalcPass::FCIP_INSURANCE_POOL and rfcipCalcPass::FCIP_INSURANCE_ELECTION.

Details

Internally this:

  1. Ensures farmdata is a data.table and tags it with commodity_year.

  2. Creates a producer_id if no identifiers provided.

  3. Checks for required columns (rate_yield, approved_yield, FCIP_INSURANCE_POOL) and errors out if missing.

  4. Builds the none menu (zero premium & full subsidy).

  5. If "group" requested, pulls area-based rating data (using different datasets for 2011-2016 vs. 2017+), averages rates, merges in index values and subsidy percentages, and computes final premium & subsidy.

  6. If "individual" requested, pulls APH eligibility & rate-differential tables, reshapes to unit structures (OU/BU/EU), then calls rfcipCalcPass::fcip_calculator() per election to compute premium & subsidy.

  7. Binds all selected menus together and returns the combined table.

See also

Other FCIP Menu Calibration: simulate_menu_revenue_fcip()