Evaluates how the composite nexus index changes as the weight of one dimension varies from 0 to its maximum feasible value, with remaining weight distributed equally among the other four dimensions.

nexus_sensitivity(
  water_score,
  energy_score,
  food_score,
  nutrient_score,
  carbon_score,
  treatment_names = NULL,
  steps = 20,
  verbose = TRUE
)

Arguments

water_score

Numeric vector. Water scores (0 to 1).

energy_score

Numeric vector. Energy scores (0 to 1).

food_score

Numeric vector. Food scores (0 to 1).

nutrient_score

Numeric vector. Nutrient scores (0 to 1).

carbon_score

Numeric vector. Carbon scores (0 to 1).

treatment_names

Character vector. Treatment labels.

steps

Integer. Number of weight steps to evaluate. Default 20.

verbose

Logical. If TRUE, prints a message. Default TRUE.

Value

A data frame with columns: dimension, weight, treatment, and nexus_index showing how the index changes as each dimension's weight varies.

Examples

# \donttest{
sa <- nexus_sensitivity(
  water_score = c(0.9, 0.5), energy_score = c(0.6, 0.8),
  food_score = c(0.8, 0.7), nutrient_score = c(0.7, 0.6),
  carbon_score = c(0.5, 0.9),
  treatment_names = c("CA", "CT"), steps = 10
)
#> Sensitivity analysis: 11 weight steps x 5 dimensions x 2 treatments.
head(sa)
#>   dimension weight treatment nexus_index
#> 1     Water    0.0        CA       0.650
#> 2     Water    0.0        CT       0.750
#> 3     Water    0.1        CA       0.675
#> 4     Water    0.1        CT       0.725
#> 5     Water    0.2        CA       0.700
#> 6     Water    0.2        CT       0.700
# }