Skip to content

The effect of the distribution of transition rate on dynamics #198

Answered by kingaa
Fuhan-Yang asked this question in Q&A
Discussion options

You must be logged in to vote

You seem to suppose that the two computations will yield similar results. On what basis do you suppose this?

The Euler method applied to the differential equation you implement in your "deSolve" version is not equivalent to Euler steps applied to the deterministic map you supply in your "Euler-multinomial" version, is it?

However, the two should become closer with smaller step sizes. For example, in the following, I have replaced the timestep of 1 day with a timestep of 1/100 day.

library(pomp)
library(dplyr)

sirs_init <- Csnippet("
  S = N-300;
  I1 = 300;
  I2 = 0;
  R1 = R2 = R3 = 0;
  J = 0;
")

sirs_det_step <- Csnippet("
  double pR = 1-exp(-3/pi*dt);
  double pI = 1-exp(-2*mu_IR*…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Fuhan-Yang
Comment options

@kingaa
Comment options

@Fuhan-Yang
Comment options

Answer selected by Fuhan-Yang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants