Open davidanthoff opened 5 years ago
@davidanthoff Just checking the intended functionality: this would break the rule that compute_scc
always returns the same type, right? Depending on the value of n
, it might return a Float64
or a Vector
. If we are okay with this, then I would propose also deleting the additional compute_scc_mm
functions we created and instead add a keyword option for return_mm = true
for returning a NamedTuple of (scc, MarginalModel). We originally created the additional function in order to not have the function return different types.
Good point... Maybe we should instead add a compute_mc_scc
function instead? I kind of like the idea that each function returns the same thing always...
@davidanthoff is there a reason that you want the default n
to be nothing
instead of just 1? Would you want n=1
to still prompt a simulation to run with a random sample, but only one trial?
Yes, I think if it is a number, then it should sample, even if the number is 1
. If it is nothing
, it uses the best guess value.
This is not strictly a Mimi issue, but given that it affects multiple models, seems easier to track here.
The idea would be that we add a named keyword argument to
compute_scc
calledn
. Ifn=nothing
the function returns the SCC as computed today, ifn
is some integer, it would run a monte carlo simulation with that many runs and return a vector of SCCs.