File:Simple SIR model.svg
From Wikimedia Commons, the free media repository
Jump to navigation
Jump to search
Size of this PNG preview of this SVG file: 800 × 450 pixels. Other resolutions: 320 × 180 pixels | 640 × 360 pixels | 1,024 × 576 pixels | 1,280 × 720 pixels | 2,560 × 1,440 pixels | 1,440 × 810 pixels.
Original file (SVG file, nominally 1,440 × 810 pixels, file size: 665 KB)
File information
Structured data
Captions
Summary
[edit]DescriptionSimple SIR model.svg |
English: The proportion of the infected population and the basic reproduction number. They are described by the simple SIR model
|
Date | |
Source | Own work |
Author | ARAKI Satoru |
library(deSolve)
library(ggplot2)
library(latex2exp)
sir<-function(t, init, parms) {
with(as.list(c(init, parms)), {
# nondimensional form
ds <- -R0*s*i
di <- R0*s*i - i
list(c(ds, di))
})
}
s0 <- 1 - 10^(-7)
T <- 100
init <- c(s=s0, i=1-s0)
times <- seq(0, T, by=.01)
df <- function(R0) {
parms <- c(R0=R0)
out <- ode(init, times, sir, parms)
df <- data.frame(t=out[,1], i=out[,3], R0=R0)
df
}
data <- do.call(rbind, lapply(seq(1.0, 3.0, by=.2), df))
p <- ggplot(data, aes(color=sprintf("%1.1f", R0))) +
geom_path(aes(x=t, y=i)) +
scale_x_continuous(limits=c(0, T), breaks=seq(0, T, by=10)) +
scale_y_continuous(limits=c(0, .31), breaks=seq(0, .31, by=.05)) +
labs(
x=TeX("$\\gamma\\mathit{t}$"),
y=TeX("$\\mathit{I}/\\mathit{N}$"),
color=TeX("$\\beta\\mathit{N}/\\gamma$")
) +
scale_fill_brewer("Spectral") +
theme_minimal(base_family = "Times")
svg(filename="infected.svg", width=16, height=9)
plot(p)
dev.off()
Licensing
[edit]I, the copyright holder of this work, hereby publish it under the following license:
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 03:50, 3 August 2020 | 1,440 × 810 (665 KB) | ARAKI Satoru (talk | contribs) | Changed fonts | |
20:40, 19 April 2020 | 1,440 × 810 (650 KB) | ARAKI Satoru (talk | contribs) | Corrected a legend. | ||
18:27, 19 April 2020 | 1,440 × 810 (646 KB) | ARAKI Satoru (talk | contribs) | Uploaded own work with UploadWizard |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
File usage on other wikis
The following other wikis use this file:
- Usage on ja.wikipedia.org
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Width | 1152pt |
---|---|
Height | 648pt |