# seairmobility

**Mobility-Based SEAIR Epidemic Models**

`seairmobility` provides tools for simulating, analysing, and fitting
mobility-based SEAIR (Susceptible–Exposed–Asymptomatic–Infectious–
Recovered) compartmental epidemic models with heterogeneous
individual mobility.

Each individual in the population carries a fixed mobility trait
`m ∈ (0, 1)` that scales both susceptibility and infectiousness via
a rank-one kernel. The infectious period is split into an
asymptomatic stage with relative infectiousness `α` and a
symptomatic stage with mobility-reduction factor `δ`.

The package extends the mobility-based SIR framework of
Jiang, Chu, and Li (2025,
*SIAM J. Appl. Math.* 85(5), 2355–2375,
doi:10.1137/24M1691557).

## Features

- `seair_solve()` — numerical solver for the mobility-based SEAIR
  PDE system (method-of-lines discretisation + `deSolve`).
- `R0_seair()` — closed-form basic reproduction number.
- `final_size()` / `final_size_general()` — final epidemic size via
  the scalar fixed-point equation.
- `fit_mobility()` — parametric (Beta-mixture) least-squares fit of
  the mobility distribution from an observed symptomatic time series.

## Minimal example

``` r
library(seairmobility)

pars <- seair_params(beta = 1.5, sigma = 0.3, kappa = 0.2,
                     gamma_A = 0.1, gamma_I = 0.13,
                     alpha = 0.5, delta = 0.3)

m    <- seq(0, 1, length.out = 101)
f    <- dbeta(m, 2, 2)
init <- seair_init(m, f, I_seed = 1e-4)

sol  <- seair_solve(init, pars, times = seq(0, 80, by = 1))
plot_seair(sol, which = c("S", "I", "R"))

R0_seair(pars, f, m_grid = m)
final_size(pars, f, m_grid = m)
```

## License

MIT
