Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
SEIR-Modell
#!/usr/bin/env Rscript # Epidemiologie SEIR Modell library(data.table) pEI <- 0.5 # probability to get infectuous after being expoesed pIR <- 0.2 # probability to recover Tn <- 150 # Number of iterations Population <- 83200000 # Population at start R0 <- 3 * pIR # Reproduction value at start Person / day infectuous options ( digits = 4 ) SEIR <- data.table( S = c( Population - 1 ,rep(0,Tn-1)) , E = c( 1 ,rep(0,Tn-1)) , I = rep( 0 , Tn ) , R = rep( 0 , Tn ) ) for (i in 2:Tn) { SEIR$R[i] <- SEIR$R[i-1] + SEIR$I[i-1] * pIR SEIR$I[i] <- SEIR$I[i-1] * ( 1 - pIR ) + SEIR$E[i-1] * pEI Infect <- R0 * SEIR$S[i-1] / Population * SEIR$I[i-1] if (Infect > SEIR$S[i-1] ) { Infect = SEIR$S[i-1] } SEIR$E[i] <- SEIR$E[i-1] * ( 1 - pEI ) + Infect SEIR$S[i] <- SEIR$S[i-1] - Infect } plot(SEIR$S , type="l" , col = "blue" , ylab = "Anzahl" , xlim = c( 50, Tn) , ylim = c(0, Population) , main = "SEIR Modell" ) par ( new = TRUE ) plot(SEIR$E , type="l" , xlim = c( 50, Tn) , ylab = "" , ylim = c(0, Population) ) par ( new = TRUE ) plot(SEIR$I , type="l" , col = "green" , xlim = c( 50, Tn) , ylab = "" , ylim = c(0, Population) )
run
|
edit
|
history
|
help
0
Implied Volatility Surface
Correlação
jcruet_crickets and temp
17-08-2020SitemaEqLin
Gab1B
Condição de alinhamento entre três pontos
Efeito-Runge-18-03-2021
Ex15-12
Chi Square Tests - Goodness of Fit Test [Coffee drinkers]
As1-1