123
123
# > Susceptible-Infected-Recovered (SIR)
124
124
# > It features 100000 agents, 1 virus(es), and 0 tool(s).
125
125
# > The model has 3 states.
126
- # > The final distribution is: 822 Susceptible, 415 Infected, and 98763 Recovered.
126
+ # > The final distribution is: 1209 Susceptible, 499 Infected, and 98292 Recovered.
127
127
```
128
128
129
129
Visualizing the outputs
@@ -140,8 +140,8 @@ summary(sir)
140
140
# > Number of entities : 0
141
141
# > Days (duration) : 50 (of 50)
142
142
# > Number of viruses : 1
143
- # > Last run elapsed t : 62 .00ms
144
- # > Last run speed : 79.47 million agents x day / second
143
+ # > Last run elapsed t : 66 .00ms
144
+ # > Last run speed : 74.96 million agents x day / second
145
145
# > Rewiring : off
146
146
# >
147
147
# > Global events:
@@ -158,12 +158,12 @@ summary(sir)
158
158
# > - Transmission rate : 0.7000
159
159
# >
160
160
# > Distribution of the population at time 50:
161
- # > - (0) Susceptible : 99000 -> 822
162
- # > - (1) Infected : 1000 -> 415
163
- # > - (2) Recovered : 0 -> 98763
161
+ # > - (0) Susceptible : 99000 -> 1209
162
+ # > - (1) Infected : 1000 -> 499
163
+ # > - (2) Recovered : 0 -> 98292
164
164
# >
165
165
# > Transition Probabilities:
166
- # > - Susceptible 0.91 0.09 0.00
166
+ # > - Susceptible 0.92 0.08 0.00
167
167
# > - Infected 0.00 0.70 0.30
168
168
# > - Recovered 0.00 0.00 1.00
169
169
```
@@ -229,7 +229,7 @@ summary(model_seirconn)
229
229
# > Days (duration) : 100 (of 100)
230
230
# > Number of viruses : 2
231
231
# > Last run elapsed t : 15.00ms
232
- # > Last run speed : 64.01 million agents x day / second
232
+ # > Last run speed : 65.69 million agents x day / second
233
233
# > Rewiring : off
234
234
# >
235
235
# > Global events:
@@ -368,24 +368,24 @@ rn <- get_reproductive_number(model_logit)
368
368
(1 : n %in% rn $ source )
369
369
) | > prop.table())[, 2 ]
370
370
# > 0 1
371
- # > 0.12984 0.14201
371
+ # > 0.13466 0.14878
372
372
```
373
373
374
374
``` r
375
375
376
376
# Looking into the agents
377
377
get_agents(model_logit )
378
378
# > Agents from the model "Susceptible-Infected-Removed (SIR) (logit)":
379
- # > Agent: 0, state: Recovered (2 ), Has virus: no, NTools: 0i NNeigh: 8
380
- # > Agent: 1, state: Recovered (2 ), Has virus: no, NTools: 0i NNeigh: 8
381
- # > Agent: 2, state: Recovered (2 ), Has virus: no, NTools: 0i NNeigh: 8
382
- # > Agent: 3, state: Recovered (2 ), Has virus: no, NTools: 0i NNeigh: 8
383
- # > Agent: 4, state: Recovered (2 ), Has virus: no, NTools: 0i NNeigh: 8
384
- # > Agent: 5, state: Recovered (2 ), Has virus: no, NTools: 0i NNeigh: 8
385
- # > Agent: 6, state: Recovered (2 ), Has virus: no, NTools: 0i NNeigh: 8
386
- # > Agent: 7, state: Recovered (2 ), Has virus: no, NTools: 0i NNeigh: 8
379
+ # > Agent: 0, state: Susceptible (0 ), Has virus: no, NTools: 0i NNeigh: 8
380
+ # > Agent: 1, state: Susceptible (0 ), Has virus: no, NTools: 0i NNeigh: 8
381
+ # > Agent: 2, state: Susceptible (0 ), Has virus: no, NTools: 0i NNeigh: 8
382
+ # > Agent: 3, state: Susceptible (0 ), Has virus: no, NTools: 0i NNeigh: 8
383
+ # > Agent: 4, state: Susceptible (0 ), Has virus: no, NTools: 0i NNeigh: 8
384
+ # > Agent: 5, state: Susceptible (0 ), Has virus: no, NTools: 0i NNeigh: 8
385
+ # > Agent: 6, state: Susceptible (0 ), Has virus: no, NTools: 0i NNeigh: 8
386
+ # > Agent: 7, state: Susceptible (0 ), Has virus: no, NTools: 0i NNeigh: 8
387
387
# > Agent: 8, state: Susceptible (0), Has virus: no, NTools: 0i NNeigh: 8
388
- # > Agent: 9, state: Recovered (2 ), Has virus: no, NTools: 0i NNeigh: 8
388
+ # > Agent: 9, state: Susceptible (0 ), Has virus: no, NTools: 0i NNeigh: 8
389
389
# > ... 99990 more agents ...
390
390
```
391
391
@@ -477,20 +477,20 @@ head(ans$total_hist)
477
477
# > 1 1 0 1 Susceptible 990
478
478
# > 2 1 0 1 Infected 10
479
479
# > 3 1 0 1 Recovered 0
480
- # > 4 1 1 1 Susceptible 971
481
- # > 5 1 1 1 Infected 29
480
+ # > 4 1 1 1 Susceptible 974
481
+ # > 5 1 1 1 Infected 26
482
482
# > 6 1 1 1 Recovered 0
483
483
```
484
484
485
485
``` r
486
486
head(ans $ reproductive )
487
487
# > sim_num virus_id virus source source_exposure_date rt
488
- # > 1 1 0 COVID-19 943 9 0
489
- # > 2 1 0 COVID-19 40 9 0
490
- # > 3 1 0 COVID-19 6 9 0
491
- # > 4 1 0 COVID-19 973 8 0
492
- # > 5 1 0 COVID-19 495 9 0
493
- # > 6 1 0 COVID-19 480 8 0
488
+ # > 1 1 0 COVID-19 77 10 0
489
+ # > 2 1 0 COVID-19 970 8 0
490
+ # > 3 1 0 COVID-19 895 8 0
491
+ # > 4 1 0 COVID-19 866 8 0
492
+ # > 5 1 0 COVID-19 811 8 0
493
+ # > 6 1 0 COVID-19 752 8 0
494
494
```
495
495
496
496
``` r
@@ -522,8 +522,9 @@ citation("epiworldR")
522
522
# >
523
523
# > And the actual R package:
524
524
# >
525
- # > Meyer D, Vega Yon G (????). _epiworldR: Fast Agent-Based Epi Models_.
526
- # > R package version 0.3-2, <https://github.com/UofUEpiBio/epiworldR>.
525
+ # > Meyer D, Pulsipher A, Vega Yon G (2024). _epiworldR: Fast Agent-Based
526
+ # > Epi Models_. R package version 0.6.0.0,
527
+ # > <https://github.com/UofUEpiBio/epiworldR>.
527
528
# >
528
529
# > To see these entries in BibTeX format, use 'print(<citation>,
529
530
# > bibtex=TRUE)', 'toBibtex(.)', or set
0 commit comments