본문으로 건너뛰기
cccskills
무료GitHub에 공개

compartmental-models

Infectious disease modeling with SIR/SEIR models — R0, fitting, forecasting, and intervention scenarios.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md5.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Overview

compartmental-models covers the workhorse models of infectious-disease dynamics: SIR, SEIR, and their extensions. It focuses on building models that inform decisions — estimating R0, projecting under interventions, and communicating uncertainty — rather than on mathematical novelty. A model is a decision tool; its value is measured in better decisions, not in fit statistics.

When to use

  • Estimating R0/Rt from early outbreak data.
  • Projecting epidemic trajectories under different intervention scenarios.
  • Evaluating interventions: vaccination coverage, NPIs, test-and-trace.
  • Understanding herd-immunity thresholds and final-size relations.
  • Fitting models to case/hospitalization data with proper uncertainty.
  • Communicating model results and limits to decision-makers.

Core concepts

  • SIR structure. Susceptible → Infectious → Recovered, with transmission rate β and recovery rate γ. dS/dt = −βSI/N, dI/dt = βSI/N − γI, dR/dt = γI. Simple, interpretable, and the foundation everything else extends.
  • SEIR and extensions. Add Exposed (latent period) for SEIR; add compartments for asymptomatic (A), hospitalized (H), quarantined (Q), vaccinated (V), or waning immunity (SIRS) as the question demands. Every compartment needs a justification — complexity must earn its keep in better decisions.
  • R0, Re, Rt. R0 = β/γ: expected secondary cases in a fully susceptible population. Re/Rt: effective reproduction number given immunity and interventions. Rt > 1 means growing. Estimate from the early exponential growth rate (r) via the generation-interval distribution — R0 ≈ 1 + r×Tg for simple models, but use the proper estimator (EpiEstim/cori for Rt).
  • Herd immunity threshold. 1 − 1/R0 — the immune fraction at which Re < 1 without interventions. It's a threshold for decline, not eradication, and it assumes homogeneous mixing — heterogeneity (superspreading, structured contacts) changes it substantially.
  • Homogeneous mixing is the big lie. Real populations have age structure, households, networks, and superspreading. Age-structured contact matrices (POLYMOD-style) are the minimum realism for policy models; overdispersion (k parameter) matters for outbreak probability and control strategy.
  • Fitting. Fit to the most reliable data stream (hospitalizations/deaths over cases, which depend on testing). Use Bayesian inference (MCMC) or likelihood-based methods with proper observation models (negative binomial for overdispersed counts, reporting delays modeled explicitly). Fit to multiple streams jointly when possible.
  • Forecasting discipline. Short-term forecasts (1-4 weeks) with quantified uncertainty (prediction intervals, ensemble approaches); scenario projections (not predictions) for policy — "if X, then Y" with X explicit. Evaluate past forecasts honestly (coverage of prediction intervals).
  • Intervention modeling. Vaccination (reduce susceptibility/infectiousness by coverage × efficacy), NPIs (reduce β or contacts), test-trace-isolate (reduce infectious period or remove infecteds). Model the intervention as actually implementable — 100% compliance scenarios are fantasies.

Practical workflow

  1. Question. What decision does this model inform? (Not "model the epidemic" — a specific choice with options.)
  2. Structure. Simplest model that captures the decision-relevant mechanism; justify each compartment.
  3. Parameters. Literature values with sources and ranges; estimate the rest from data; document every number.
  4. Fit. Bayesian/MCMC with observation model; check convergence, posterior predictive fits, and sensitivity to priors.
  5. Scenarios. Baseline + intervention options with explicit assumptions; present as ranges across parameter uncertainty, not point trajectories.
  6. Validate. Backtest on held-out periods; compare against simple baselines (a naive model that beats your SIR is telling you something).
  7. Communicate. Assumptions up front, uncertainty as intervals, scenarios labeled as scenarios. Never present a single trajectory as "the prediction."

Example (Python sketch):

from scipy.integrate import odeint
def seir(y, t, N, beta, sigma, gamma):
    S, E, I, R = y
    return [-beta*S*I/N, beta*S*I/N - sigma*E, sigma*E - gamma*I, gamma*I]

Common pitfalls

  • Fitting to case counts without modeling testing/reporting changes.
  • Ignoring reporting delays (recent data are always incomplete — nowcasting needed).
  • Homogeneous-mixing models for policy without age/behavior structure.
  • Presenting scenarios as predictions.
  • Overconfident narrow intervals (models are usually overconfident — widen honestly).
  • Parameters from a different pathogen/population without adjustment.
  • No validation against held-out data or simple baselines.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Master 1Password: vaults, Watchtower, passkeys, SSH agent, CLI, and family/team administration. Use when getting full value from 1Password personally or administering it for others.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aicodedecode/awesome-muse-skills252026년 10월 10일 업데이트

Create 3D visuals with modeling, texturing, lighting, rendering, and optimization for web and product.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aicodedecode/awesome-muse-skills252026년 10월 10일 업데이트

Create 3D web experiences: scene setup, models, materials, lighting, animation, scroll-driven scenes, and performance budgets. Use when adding 3D to websites beyond basic demos.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aicodedecode/awesome-muse-skills252026년 10월 10일 업데이트

Writing abstracts that get papers read — structured content, the 5-sentence core, and journal-specific constraints.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aicodedecode/awesome-muse-skills252026년 10월 10일 업데이트

Learn effectively from courses and academies: choosing programs, studying actively, and converting courses into skills. Use when investing time/money in structured learning.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aicodedecode/awesome-muse-skills252026년 10월 10일 업데이트

Audit designs for accessibility with WCAG checklists covering color, type, focus, motion, and content.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aicodedecode/awesome-muse-skills252026년 10월 10일 업데이트

aicodedecode의 스킬 모두 보기

이 스킬의 문제 신고