You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/rsv/index.qmd
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -223,7 +223,7 @@ Three custom modules: `init_attrs` (one-shot setup of per-node intervention stat
223
223
224
224
```r
225
225
for (kin1:2) { # <1>
226
-
el<-dat$run$el[[k]]
226
+
el<-get_edgelist(dat, network=k)
227
227
if (is.null(el) || nrow(el) ==0) next
228
228
229
229
head<-el[, 1]; tail<-el[, 2]
@@ -251,7 +251,7 @@ for (k in 1:2) { # <1>
251
251
252
252
Per-step transmission probability per discordant edge is built up from:
253
253
254
-
1.**Per-layer iteration.**With `tergmLite = TRUE`, each network layer's current edgelist is in `dat$run$el[[k]]`. We walk each layer separately rather than calling `discord_edgelist()`, because we want different transmission rates on the family vs community layer.
254
+
1.**Per-layer iteration.**`get_edgelist(dat, network = k)` returns the current edgelist for layer `k`. We walk each layer separately rather than calling `discord_edgelist()`, because we want different transmission rates on the family vs community layer.
255
255
2.**NPI community-edge thinning.** When NPIs are active, we drop a fraction of community edges on the fly (representing reduced contact intensity).
256
256
3.**Asymptomatic infectiousness multiplier.** Each row's transmission probability is halved if the infectious partner is in state `"ia"`.
257
257
4.**Vaccine / prophylaxis efficacy on the susceptible side.** Looking up the susceptible's `vax_status` lets us apply leaky reductions for the two age-targeted interventions.
Copy file name to clipboardExpand all lines: examples/sir-time-varying-vaccination/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ The same pattern generalizes to any time-varying or state-dependent intervention
62
62
63
63
### Infection Module (`infect`)
64
64
65
-
Standard S to I transmission along discordant edges, plus an optional `import.rate` parameter for exogenous (external) introductions. Vaccine-immune individuals are excluded automatically because `discord_edgelist()` only pairs `"s"` with `"i"`. Records `si.flow` and `im.flow`.
65
+
Standard S to I transmission along discordant edges, plus an optional `exog.inf.prob` parameter that adds an external (exogenous) force of infection: each active susceptible has that per-timestep probability of being infected from outside the modeled network (spillover from an unmodeled reservoir, environmental exposure, off-network contacts). This is distinct from importation, which describes already-infected individuals arriving in the population and is properly modeled as an arrivals process in a vital-dynamics module. Vaccine-immune individuals are excluded automatically because `discord_edgelist()` only pairs `"s"` with `"i"`. Records `si.flow` and `exog.flow`.
66
66
67
67
### Recovery Module (`recov`)
68
68
@@ -88,7 +88,7 @@ Records `vax.active` (0/1 indicator), `vax.flow`, `sv.flow`, `vs.flow`, and `v.n
88
88
|`act.rate`| Acts per partnership per timestep | 1 |
Copy file name to clipboardExpand all lines: examples/sir-time-varying-vaccination/index.qmd
+21-20Lines changed: 21 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -82,7 +82,7 @@ nsteps_endemic <- 1000
82
82
83
83
### Infection Module
84
84
85
-
Standard S to I transmission along discordant edges, plus an optional `import.rate` parameter that lets the user model exogenous (external) introductions of the disease. Vaccine-immune individuals (`status == "v"`) are excluded automatically because `discord_edgelist()` only pairs `"s"` with `"i"`.
85
+
Standard S to I transmission along discordant edges, plus an optional `exog.inf.prob` parameter that adds an **external (exogenous) force of infection**. At each timestep every active susceptible has probability `exog.inf.prob` of being infected by a source outside the modeled network: spillover from an unmodeled reservoir, environmental exposure, or contacts with individuals not represented in the simulated network. This is distinct from *importation*, which describes already-infected individuals arriving in the population and is properly modeled as an arrivals process in a vital-dynamics module. Here the population is closed and existing susceptibles transition to infectious at a constant background hazard, independent of in-population prevalence. Vaccine-immune individuals (`status == "v"`) are excluded automatically because `discord_edgelist()` only pairs `"s"` with `"i"`.
1.`discord_edgelist()` only considers nodes with status `"s"` or `"i"`. Vaccine-immune individuals (`"v"`) and recovered individuals (`"r"`) never appear and are therefore protected without any explicit exclusion logic.
148
-
2.Imports model exogenous introductions of the disease (travel-related cases, spillover events, etc.). Setting `import.rate = 0` gives a purely closed population.
148
+
2.The exogenous force of infection adds a constant per-step Bernoulli hazard to every susceptible (e.g. spillover from an unmodeled reservoir, environmental exposure, off-network contacts). Setting `exog.inf.prob = 0` gives a purely network-driven model. This is not importation, which would describe already-infected individuals arriving in the population and is properly handled by an arrivals module.
0 commit comments