meghapsimatrix / simhelpers

Helper package to assist in running simulation studies
10 stars 3 forks source link

allow multiple estimates and true_params in the calc_*() functions #13

Closed manchen07 closed 7 months ago

manchen07 commented 3 years ago

It would be super helpful if the calc_*() functions can take multiple estimates of one parameter or multiple estimates of multiple parameters as input and return corresponding performance criteria.

FBartos commented 3 years ago

Yes, especially since the documentation is missleading: true_param name of the column containing the true parameters.

The fix is easy, e.g., in calc_coverage function, the true_param <- true_param[1] needs to be ommited.

meghapsimatrix commented 3 years ago

The functions in simhelpers are meant to be used with pmap and purrr and furrr packages like: https://meghapsimatrix.github.io/simhelpers/articles/simulation_workflow.html#experimental-design-revisit-1

Where the simulation is done for each set of design parameters ~ where the true effect would be just the same value for for the results for that whole condition.

But I hear you all about allowing the multiple estimates and params. Right now my suggestion is to use a mix of pivot_longer() and group_by() and group_modify() if you have multiple columns of estimates each with a different param.

Updating my package to allow multiple columns of estimates is on my to-do list but right now I have lots of other things on my plate so won't get to this for a while.

Also will try to clean up the language in the documentation! Thanks for bringing up these comments and using and exploring my package!