# Define the parameter steps you want to explore. This is a minimal example.
# A more realistic one follows below.
param_values = list(w_FGA = c(0, 0.5, 1),
w_FGB = c(0, 0.5, 1),
NI = c(0.5, 0.9)
)
# Create all valid combinations of the defined steps
create_combinations(param_values)
# More realistic example for an initial exploration of parameter space,
# where we suspect that functional groups A and B should be more prevalent
# than C and D. This produces 54 parameter combinations, which is a number
# of model evaluations that can run within a reasonable timeframe
# (depending on your system).
param_values = list(w_FGA = seq(0, 1, 0.33),
w_FGB = seq(0, 1, 0.33),
w_FGC = seq(0, 0.7, 0.33),
w_FGD = seq(0, 0.7, 0.33),
NI = seq(0.5, 1.0, 0.25)
)
length(create_combinations(param_values))
# The default value for *eps* made sure that combinations of 0.33 + 0.66 =
# 0.99 etc. are considered "valid". If we make *eps* too small, no valid
# combinations can be found:
length(create_combinations(param_values, eps = 1e-3))
Run the code above in your browser using DataLab