Bayesian workflow: fake social contact data example
Bayesian workflow
negative binomial
social contact
This post is my attempt to follow along a Bayesian Workflow by Gelman et al and create examples for better understanding. While my ultimate goal is to study infectious disease transmission using a dynamic model following…
Learning ChatGPT 4: Universal Approximation Theorem
Universal Approximation Theorem
Neural network
Arbitrary-Width
Arbitrary-Depth
Neural networks can approximate any function according to the Universal Approximation Theorem. A more precise statement of the theorem is that neural networks with a single hidden layer…
Basic reproduction number: An algorithmic approach
Basic reproduction number
Mathematica
algorithmic approach
next generation matrix
A recent article published in Mathematics discusses an approach to calculating \(\mathcal{R}_0\). Since I have previously written a post about calculating \(\mathcal{R}_0\) using Sympy, I wanted to explore a new approach proposed by the…
Learning ChatGPT 1: Probabilities for the next word
GPT-2
ChatGPT
Wolfram
Inspired by the blog post by Stephen Wolfram about the workings of the GPT-2 system, I decided to learn a bit about ChatGPT myself. Luckily, GPT-2 is now available for R. My first task is simply to learn to run the model and generate the probability table for the words that can follow the text, “The best thing about…
Logistic function in R
Logistic function
indirect vaccine effectiveness
oral cholera vaccine
The logistic function, represented as: \[
f(x) = \frac{L}{1+e^{-k(x-x_0)}}
\] , where \(x_{0}, L\), and \(k\) represent tht value of the function’s midpoint, the supremum of the values of the function…
Waning vaccine efficacy on susceptibility
Vaccine
waning
SEIR
Erlang distribution
In this article, I examined the process of modifying the disease transmission model (for instance, the \(SEIR\) model) to include vaccination and the waning of vaccine-induced immunity as it might happen in a clinical trial. A straightforward method to represent this…
Waning of vaccine effectiveness
vaccine efficacy
clinical trial
SEIR
The protection derived from vaccination often wanes over time and require the second or the third doses (so-called booster doses). For example, the study showed the efficacy of cholera vaccines over five years. The vaccine efficacy (VE) over the period seems to indicate that the VE wanes over time. In this…
Vaccine effectiveness
SEIR
vaccine efficacy
direct
indirect
total
overall
Vaccine efficacy and effectiveness (VE) is generally estimated as one minus some measure of relative risk (RR) in the vaccinated group compared to the unvaccinated group Hal…
Counterintuitive effects in disease transmission dynamics
Infectious diseases
nonlinearity
transmission dynamics
An article by Heesterbeek et al. provides a few examples on the counterintuitive behavior of a dynamical system of…
감염병의 대유행 가능성
probability of a large outbreak
reproduction number
감염병 인류 라는 책을 재미있게 읽는 중이다. 136페이지에는 기초감염재생산지수와 대유행의 가능성에 대한 간단한 수식이 나온다. \[\text{대유행의 가능성} = 1 - \frac{1}{R_0}\]
Modeling the waning of the vaccine-derived immunity in the ODE model
vaccine-derived immunity
waning
cholera
ODE
exponential
Gamma
The use of ordinary differential equation (ODE) models to simulate disease spread and…
Mass-action assumption: density- vs. frequency-dependent transmission
mass action
frequency-dependent
density-dependent
In models of transmission of directly transmitted pathogens, e.g., COVID-19, the transmission is assumed to occur via so-called mass action principle. It means the rate of newly infected people per unit area, per unit of time is proportional to the product between the numbers (or densities) of susceptible and…
LabelledArrays and NamedTupleTools make it easy to use the ODE model in Julia
julia
ODE
LabelledArrays
NamedTupleTools
SEIR
The LabelledArrays pa…
SIR model benchmarks: deSolve, odin, and diffeqr
ODE
R
deSolve
odin
diffeqr
C++
Julia
Euler method was implemented
diffeqr: R interface to the Julia’s DifferentialEquations.jl
differential equation
julia
DifferentialEquations.jl
diffeqr
Julia DifferentialEquations.jl provides an impressive collection of differential equation solvers. The DE…
Universal differential equation using Julia
universal differential equation
julia
sub-exponential growth
The UDE refers to an approach to embed the machine learning into differential equations. The resulting UDE has some parts of the equation replaced by universal approximators i.e., neural network (NN). The UDE model approach allows us to approximate a wide, if not infinite, variety of functional relationships. As an example, I will test how well…
Critical vaccination threshold
vaccine
population immunity
critical vaccination threshold
The following article by Fine provides a great introduction to the critical vaccination threshold.
Generation interval
generation interval
reproduction number
Although not published, I wrote a correspondence to Lancet to commenting the article. In the article, the authors stated that the generation interval is the sum of the incubation period and the infectious period. I argued that this statement holds only for…
Idiosyncrasies and generalities
ecology
idiosyncransy
generality
COVID-19
Debates in the population ecology Bjørnstad and Grenfell.
Estimating a time-to-event distribution from right-truncated data
right truncation
exponential growth
Poisson process
Seamen writes: Data on time to an event are said to be right truncated if they come from a set of individuals who have been…
Estimating serial interval for a growing epidemic
R
serial interval
interval censoring
In this case, the above likelihood function may be modified as follows:
Estimating serial interval: interval cenoring
R
serial interval
interval censoring
MLE
Suppose dates of onsets of infectors, \(t^{A}\), and infectees, \(t^{B}\), are given…
Branching process model 2
R
branching process
final epidemic size
In the branching process model, the number of secondary infections is realized as a random number (e.g., Poission or Negative binomial).
Final epidemic size: uniroot vs. optimize
epidemic
size
R
uniroot
optimize
Miller 2012 shows that the…
SEIR model
SEIR
deterministic
stochastic
Gillespie's algorithm
SEIR 모형은 잠복기가 어느 정도 긴 감염병 (예를 들어 코로나19)의 전파를 모형하는 데 사용한다. 이번 포스트에서는 SEIR 모형을 만드는 방법을 알아본다. 결정론적 (deterministic) 그리고 확률론적 (stochastic) 방법으로 SEIR 모형을 R언어로 만들어 본다.
Branching process model
R
branching process
final epidemic size
In the branching process model, the number of secondary infections is realized as a random number (e.g., Poission or Negative binomial).
Confidence interval using profile likelihood
SEIR
profile likelihood
likelihood ratio
수리 모형을 이용하여 연구를 하게되면 관찰값을 이용하여 모형의 모수를 보정하는 과정을 거치게 된다. 이 과정을 소위 결과 (관찰값)로 부터 원인 (모형)을 알아내는 과정이라 하여 inverse problem 이라 부르기도 한다. 이 글에서는 \(SEIR\) 모형과 중국 우한 에서의 초기 코로나-19 발열자 자료를 이용하여 모형의 모수 (기초재감염지수)와 신뢰구간을 구해본다. 모수는 푸아송 (Poisson) 분포를 이용한 최대 우도 (maximum likelihood) 방법으로 그리고…
Polygon 면적 구하기: sf 와 raster 패키지
R
shapefile
ggplot2
sf
raster
RColorBrewer
shapefile
에 담겨져 있는 polygon의 면적을 구해보자 raster
패키지의 area
혹은 sf
패키지의 st_area
함수를 이용할 수 있다.
Writing a paper: Start with an outline
writing
paper
연구자의 업무 중에 연구 만큼 중요한 것이 글쓰기, 특히 논문 쓰기이다. 논문으로 쓰여지지 못한 연구는 타인에게는 존재하지 않는 것이나 다름 없는 것이다.. Writing a paper by George M. Whitesides 에 논문 쓰기에 유용한 팁이 있어 여기에 기록으로 남긴다. 한 마디로 요약하면 outline (개요)을 이용하는 것이다. 개요를 연구과제의 초기에 작성하여 연구의 계획표로 활용하며 공저자 (주로 제 1저자와 책임저자) 간에 논문에 대한 의견 교환시 개요를 사용하는…
Important figures from the book, How to avoid a climate diaster? by Bill Gates
parameter estimation
R
maximum likelihood
profile likelihood
How to Avoid a Climate Disaster: The Solutions We Have and the Breakthroughs We Need by Bill Gates is a comprehensive and accessible guide on how to tackle the urgent issue of climate change. Gates begins by laying out the scope of the problem, explaining…
Regression toward the mean
parameter estimation
R
maximum likelihood
profile likelihood
In his lecture Joseph Blitzstein talks about two basic statistical…
Survivor bias
parameter estimation
R
maximum likelihood
profile likelihood
In his lecture titled “The Soul…
Estimating the instantaneous reproduction number using the particle filter
particle filter
COVID-19
파티클 필터 (particle filter) 를 이용하여 잠재 변수 (latent variable)를 추정하는 과정을 지난 글에서 다루었다. 관찰값들이 코로나 19 일별 감염자일때 감염병 수리 모형을 이용하여 일별 감염재생산지수 (\((R_t\)) 를 추정한다. 아래 글은 2020년 Kucharski et al. 논문에 사용되었던 방법을 차용하였다. 이해를 돕기 위해 모형을 단순화 하였고 가상의 데이타를 만들어 내는 과정을 더하였다. 우선 SEIR 모형을 이용해서 가상의 데이타 (일별 감염자 수)를 만든다. 누적 감염자 (cumulative…
Maximum Likelihood and Profile Likelihood for the SEIR model
parameter estimation
R
maximum likelihood
profile likelihood
통계학은 많은 부분 확률모형의 모수를 추정하는 (inferential statistics) 과정이고 모수 추정방법으로 가장 많이 사용되는 방법이 maximum likelihood (ML)이다. 이번 포스트는 2014년 출간된 Cole et al.의 Maximum Likelihood, Profile…
Origins of major human infectious diseases
infectious disease
emergence
density
Major human infecious disease are believed to have arisen after agriculture revolutionOrigins of major human infectious diseases. By the way, this emergence of infectious diseases are one reason that agricultural revolution is callled one of the…
No matching items