-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting initial conditions as functions of model parameters #14
Comments
As an alternative to starting the system in equilibrium, you could start the system with a long period of time before sampling so that it has time to equilibrate in the period you are interested in. Starting the simulation with an initially small number of infections will also insure that lineages coalesce before reaching time zero; in practice this gives more sensible results, since it reverts to an unstructured constant Ne coalescent of lineages are not yet coalesced at time zero. If you really want to proceed with S(0)=1/R0, I think you can achieve something like this, but I would set S to be on a natural scale, not proportional scale, because the ratio of lineages to size of each deme is important. PhyDyn/examples/ebola/ebolaSEIRhet.xml Line 432 in fc81194
I think your variable for initial S would need to appear in both the "rates" and "trajparams" blocks of the model spec, but I'm not 100% sure this would work. As always, for every parameter that is estimated, you should make sure there is an initial state, prior, operator, and logger. |
Thank you so much for the detailed answer, that's really helpful. I realised only later that I could start simulations long before sampling. Thanks also for the additional insights. |
Hello,
is there any way to set initial values of deme and nondeme compartments depending on model parameters? Let me consider for example a SEIR model at endemic equilibrium; I would like$S(t=0) = 1/R_0$ where $R_0$ is the basic reproductive number and is a function of transmission and recovery rates.
Thanks in advance!
The text was updated successfully, but these errors were encountered: