Skip to content
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

Support delays in compare #137

Open
richfitz opened this issue Aug 31, 2023 · 0 comments
Open

Support delays in compare #137

richfitz opened this issue Aug 31, 2023 · 0 comments

Comments

@richfitz
Copy link
Member

Starting from the base sir model in examples

r_SI <- beta * S * I / N
deriv(S) <-  -r_SI
deriv(I) <- r_SI - sigma * I
deriv(R) <- sigma * I 
initial(S) <- N - I0
initial(I) <- I0
initial(R) <- 0
N <- 1e7
I0 <- user(1)
beta <- user(24)
sigma <- 12
delta <- 1 / 5

add cumulative infections

initial(total_infected) <- 0
deriv(total_infected) <- r_SI

and from that, we want to do a comparison against data for which we have incidence

incidence_observed <- data()
compare(incidence_observed) ~ poisson(incidence_modelled + rexp(exp_noise))
exp_noise <- 1e8

which means we need an incidence measure, which we could write as

incidence_modelled <- total_infected - delay(total_infected, 7) # with t in days, this is weekly incidence
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant