View source: R/BASS_cost_ben.R
calculate_inclusion_probs | R Documentation |
Calculate the cost-benefits and inclusion probabilities.
calculate_inclusion_probs(
benefits,
costs,
hex_id = hex_id,
stratum_id = NULL,
omit_flag = NULL,
benefit_weight = 0.5
)
benefits |
Spatial Data frame. Benefits associated with each hexagon
(output of |
costs |
Data frame. Costs for each hexagon in a RawCost format. |
hex_id |
Column. Identifies hexagon IDs (e.g., default |
stratum_id |
Column. Identifies larger area (e.g., |
omit_flag |
Column identifying hexes to omit (e.g., water hexes). |
benefit_weight |
Numeric. Weight assigned to benefit in the selection probabilities. 0.5 is equal weighting of cost and benefits. 1.0 is zero weighting to cost. Default 0.5. |
A data frame with full inclusion probabilities for each hex.
b <- calculate_benefit(land_hex = psu_hexagons,
samples = psu_samples)
inc <- calculate_inclusion_probs(
benefits = b,
costs = psu_costs)
# Omit water hexes (identified by column `water`)
inc <- calculate_inclusion_probs(
benefits = b,
costs = psu_costs,
omit_flag = water)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.