Skip to main content

Table 2 Algorithm of g-measure indicator function, I(t)

From: Modelling the association between COVID-19 transmissibility and D614G substitution in SARS-CoV-2 spike protein: using the surveillance data in California as an example

input: discretized prevalence time series, p1:T; dominance prevalence threshold, θ (>  0).
initialization: parameter for recoding the zero-prevalence time point, ξ = 1, parameter for recoding excess time point, σ = 0, I1:T = 0.
for t in 1:T do
If pt == 0, set ξ = t.
If (pt ≥ θ & ξ > σ), I(ξ + 1):(t − 1) = 1, σ = t.
end for
output: discretized indicator time series, I1:T.