R/05a_probabilistic_analysis_functions.R
generate_psa_params.Rdgenerate_psa_params generates PSA input dataset by sampling decision
model parameters from their distributions. The sample of the calibrated
parameters is a draw from their posterior distribution obtained with the
IMIS algorithm.
generate_psa_params(n_sim = 1000, seed = 20190220)Number of PSA samples. Default = 1000, the size of the
posterior sample of the calibrated parameters stored in
m_calib_post.
Seed for reproducibility of Monte Carlo sampling. Use
NULL to sample from the current state of the random number
generator, for instance when the seed is set by the calling script.
A data frame with n_sim rows and 15 columns of parameters for PSA.
Each row is a parameter set sampled from distributions that characterize
their uncertainty
df_psa_input <- generate_psa_params(n_sim = 10)
dim(df_psa_input)
#> [1] 10 15