← Back to all sparks
S

SimInf

ANALYTICS
Velocity0.0

A Framework for Data-Driven Stochastic Disease Spread Simulations

SimInf 10.0 turns an epidemic simulator into a tool that fits models to real time series

epidemiologystochastic-simulationbayesian-inferencer-packageparticle-filter
Current state
SimInf simulates stochastic disease spread over networks of nodes, with a model parser that compiles user-specified transitions to C. Version 10.0.0 was a deliberate major break: the SimInf_pfilter S4 class and the bootstrap filtering interface were redesigned, a replicates slot was added to SimInf_model, a multi-particle variant of the split-step solver arrived, and the package gained Particle Markov Chain Monte Carlo fitting against observed time series. The follow-up 10.1.0 is a single zero-length memcpy fix found by CRAN's M1 checks.
Where it's heading
The package has been moving from simulation toward inference for several releases. The 9.x line built the input side — utilities for cleaning raw individual event data, variables and enumeration constants in the model parser — and 10.0.0 closed the loop by making the simulator fittable to data through PMCMC. The version number was incremented precisely because that required breaking the particle filter interface.
Prediction
Fitting machinery this new usually needs a second pass on usability, so the next releases most likely focus on diagnostics and documentation around PMCMC rather than on the simulation core, which has been stable across the whole 9.x and 10.x history.

Recent moves

  1. 9mo ago

    Avoid memcpy on zero-length continuous state vector

    Fixes access to a zero-length R vector uncovered by CRAN's M1 Mac checks, five days after the 10.0.0 release. A platform-specific correctness fix, not a functional change.

    View source ↗
  2. 9mo ago

    PMCMC fitting arrives; particle filter interface redesigned

    ⚡ SPARK

    The breaking release that adds inference: PMCMC fitting to time series data, a redesigned SimInf_pfilter class and bootstrap filtering interface, a replicates slot on SimInf_model, and a multi-particle split-step solver variant. The 9.x work on event data cleaning and the model parser was the groundwork for this.

    View source ↗
  3. 2y ago

    Documentation link anchors; parser dependency fix

    Adds package anchors to external Rd links and fixes the model parser's resolution of transition variable dependencies when several have no dependencies. Small correctness work in the parser plus CRAN documentation compliance.

    View source ↗
  4. 2y ago

    Model parser gains variables and enumeration constants

    Lets transitions define variables reusable in propensity calculations, generates enumeration constants for parameter indices in the emitted C code, and adds node_events() for preparing raw individual event data. Makes hand-written models both more readable and easier to feed real data into.

    View source ↗
  5. 2y ago

    individual_events() added for raw event data cleaning

    Adds individual_events() to turn raw individual-level event records into the form SimInf consumes. The first of the two data-preparation utilities that made fitting to observed data a realistic goal.

    View source ↗
  6. 3y ago

    Configure script uses R to locate the compiler

    Build configuration fix so the compiler is found through R rather than independently. Install-time only.

    View source ↗