[R-sig-dyn-mod] to model the cross-diffusion term
胡艺
@tevenhuyi @ending from gm@il@com
Thu Dec 13 03:19:15 CET 2018
Sorry, guys. I intended to use a SIR model, so the code is
SIR2D <- function (t, y, parms) {
S <- matrix(y[1:N^2], N, N)
I <- matrix(y[N^2 + 1:N^2], N, N)
R <- matrix(y[2*(N^2) + 1:N^2], N, N)
infect <- beta * I * S
recovr <- nu * I
dS <- -infect +tran.2D(S, dx = dx, dy = dy, D.x = D1, D.y = D1)$dC
+ tran.2D(I, dx = dx, dy = dy, D.x = D2, D.y = D2)$dC
dI <- infect - recovr + tran.2D(I, dx = dx, dy = dy, D.x = D3, D.y =
D3)$dC
dR <- recovr + tran.2D(R, dx = dx, dy = dy, D.x = D4, D.y = D4)$dC
list(c(dS, dI, dR))
}
Yi
--
Yi Hu, MD, PhD, Lecturer
Dept.of Epidemiology and Biostatistics, School of Public Health, Fudan
University
Office:Room 443, Building 8
Address:No. 130 Dong'an Road,Shanghai,China
Postcode:200032
[[alternative HTML version deleted]]
More information about the R-sig-dynamic-models
mailing list