ciTools icon indicating copy to clipboard operation
ciTools copied to clipboard

Reuse simulation data

Open jthaman opened this issue 6 years ago • 2 comments

For certain methods like add_pi.glm and add_quantile.glm, a small parametric bootstrap is performed to generate the desired statistic. Presently if these two methods are used, a separate simulation is run for each method. If the number of replicates (nSims) and new data (tb) are not changed, it would be nice to store and reuse the simulation data.

The benefits of storing simulation data are twofold:

  1. We can speed up our computations if many methods are run in sequence
  2. add_pi, add_qauntile, and add_probs will be consistent within an analysis --- each statistic calculated on the same simulation data.

Though we could just handle the second point by setting a seed.

jthaman avatar Mar 16 '18 15:03 jthaman

Returning the simulations to the user would also have a great utility for plotting outcomes. Hrm....

jebyrnes avatar Sep 30 '20 13:09 jebyrnes

See http://imachordata.com/2020/09/24/simulating-posterior-predictions-from-non-bayesian-fits/

jebyrnes avatar Sep 30 '20 13:09 jebyrnes