Skip to contents

Given a MEM model configuration estimate the global effect of parameter sensitivity.

Usage

memc_sensrange(config, t, pars, parRange, dist, ...)

Arguments

config

a memc model configuration object, either one of the pre-built configurations listed in model_configs or created using configure_model

t

vector of the time steps to run the model at

pars

vector of the parameters that will be varied

parRange

data frame of the min/max parameter values

dist

str for the distribution according to which the parameters will be sampled from, options" "unif" (uniformly random samples), "norm", (normally distributed random samples), "latin" (latin hypercube distribution), and "grid" (parameters arranged on a grid).

...

additional arguments passed to FME::sensRange

Value

the results of the FME::sensRange

See also

Other sensitivity: format_sensout(), memc_sensfunc()

Examples

if (FALSE) {
# Test the sensitivity of the MEND output for V.p, K.p, V.m
pars <- c("V.d" = 3.0e+00,"V.p" = 1.4e+01,"V.m" = 2.5e-01)
prange <- data.frame(min = pars - pars * 0.75,
max = pars + pars * 0.75)
t <- floor(seq(0, 365, length.out = 10))
out <- memc_sensrange(config = MEND_model, t = t, pars = pars,
parRange = prange, dist = "latin", num = 10)
plot(summary(out))
# Using the helper functions.
to_plot <- format_sensout(out)
ggplot(data = to_plot) +
   geom_line(aes(time, Mean)) +
   geom_ribbon(aes(time, ymin = Min, ymax = Max), alpha = 0.5) +
   facet_wrap("variable", scales = "free")
}