
Generate sample parameter matrix for sensitivity analysis
sa_draw_parameter.RdDraw Monte Carlo sample parameter matrices for costs, flood hazard return periods, hydraulic efficiency, and damage impacts, prefixed by the nominal parameter values.
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) fromsa_input[["flood"]],hydraulic efficiency bounds (
hydraulic) fromsa_input[["flood"]],damage multipliers (
impact) fromsa_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