When to set seeds #776
Replies: 3 comments 1 reply
-
There is nothing in the model code about random number generation, so I'm unsure what is happening here. |
Beta Was this translation helpful? Give feedback.
-
There are tests for the behavior in I double checked how When Each solve uses independent seed based on the initial seed selected + the simulation id number. Afterwards it increments the initial seed by the number of simulation subjects. The only issue I noticed reviewing the code is this is not used in dop853, it calls the rxode2 seed in whatever state it is in. Were you using If so perhaps that is the issue. A reproducible example would really help here. |
Beta Was this translation helpful? Give feedback.
-
I apologize. I'm not sure what I was doing wrong before but I moved it right after the model definition and it's working now. Sorry. |
Beta Was this translation helpful? Give feedback.
-
Hello I was working on some simulations and I was using both
set.seed
andrxSetSeed
set to the same value. I was calling it right before I calledrxSolve()
, but it didn't seem to take effect (repeated running of the script was giving me different results). However when I placed the seed setting commands before the rxode2 model function definition it seemed to work. Am I imagining this? Or does the seed need to be set before the model function definition to work?Beta Was this translation helpful? Give feedback.
All reactions