Skip to contents

Draw Monte Carlo sample parameter matrices for costs, flood hazard return periods, hydraulic efficiency, and damage impacts, prefixed by the nominal parameter values.

Usage

sa_draw_parameter(sa_input, base)

Arguments

sa_input

A list of prepared sensitivity analysis inputs as returned by prepare_sa().

base

Optional 1-row matrix containing nominal parameter values as returned by sa_calculate_nominal(). If missing, it is calculated automatically.

Value

A numeric matrix of dimensions (n + 1) x p, where p is the total number of sampled parameters. The first row contains the nominal values, followed by n randomly sampled parameter vectors. Column names match the parameter names (cost_*, period_*, hydraulic_*, impact_*).

Details

This function samples n random realizations for all uncertain parameters defined in sa_input:

  • cost parameters from sa_input[["cost"]],

  • flood return periods (period) from sa_input[["flood"]],

  • hydraulic efficiency bounds (hydraulic) from sa_input[["flood"]],

  • damage multipliers (impact) from sa_input[["impact"]].

Sampling is performed via draw_parameter().

If base is not supplied, it is computed via sa_calculate_nominal(). The nominal baseline parameter values (the first row of base, truncated to the number of parameters p) are prepended as row 1 of the returned matrix, followed by the n drawn sample rows. Column names are aligned with those of base.

Author

Frédéric Grelot, frederic.grelot.1994_cran@m4x.org