## parameters to epistep (similar default except mu != 0)
true <- list(b = 0.00218, k = 0.1, nu = 0.4, mu = 0.1)
SIR <- list(S=700, I=200, R=100)
## examine the distribution of the outputs of epistep
T <- 1000
na <- rep(NA, T)
out <- data.frame(rem=na, rec=na, infect=na, dead=na)
for(t in 1:T) {
out[t,] <- epistep(SIR=SIR, true=true)
}
## make histograms of the output
par(mfrow=c(2,2))
hist(out$rem)
hist(out$rec)
hist(out$infect)
hist(out$dead)
Run the code above in your browser using DataLab