-
Notifications
You must be signed in to change notification settings - Fork 77
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
SSM for SIR-Model #54
Comments
Hi,
Then you get particles of dimension two (instead of 4). As for the multivariate extension, I guess there are two possibilities:
Hope this helps ps: why do you have a |
Thanks for your answer.
And a new question(solved): Edit: Just one structured array of the length of timepoints and column names referring to the compartments is what worked. And regarding the |
Ah, sorry, my bad. One way to fix my code :
where basically I replaced The current version of MvNormal does not allow for a covariance matrix that varies across the particles. I implemented this for a colleague, but I don't like it so much because there is a loop over
Since this is the second time someone is asking for something like this, I am going to open an issue and try to think of ways to make the above code more efficient (numba?). |
I'm going to close this issue, but feel free to re-open it or open another one in case you have other questions. As for the multivariate Gaussian issue, see #55. |
Dear all,
My goal is to do parameter inference for the SIR-model, which I described with the following SDE system:
For$X=(S,I)^T$ this can be written as
with
The symmetric product of the diffusion coefficient would then be the positive definite matrix
I use a simple Euler-scheme discretisation to make it accesable as an autoregressive process of order 1, such that I can specify it in terms of distributions.
whith$Z_1, Z_2\sim\mathcal{N}(0,1)$ being independent.$X=(S,I)^T$ as being multivariate normal distributed.
Or in different notation one can write
$$
X_t\sim \text{MultiNormal}(X_{t-1}+\mu(X_{t-1})dt, \sigma(X_{t-1})\sqrt{(dt)})
$$
Since particle MCMC methods would be my favourite choice to perform inference I tried to implement this model as a SSM and ended up with:
This approach worked (at least for the simulation, did not try the ifnerence yet), but it increases the dimension of the vector$x$ by the number of transitions in the system.
Since my overall goal is to perform inference for multivariate models with a far öarger number of compartments and transitions, I would like to avoid this.
So my question is, whether there is a smarter way to implement this multivariate process as a state-space model based on multivariate normal distributions or something else.
Thanks for any advice
Vincent
The text was updated successfully, but these errors were encountered: