Open gxtchenry opened 3 years ago
@mirjamkretzschmar
Hi gxtchenry,
thanks for looking at my code so carefully, that is very useful! I will check it again, but let me say what the idea is. The index case is diagnosed and found positive on day i of his infectious period. By that time, he/she has already infected a contact, who is now (on the day of diagnosis of the index) on day j since acquiring infection. Then it takes still some time before this contact is found and isolated (that is the delay vd). Once the contact is isolated, the remaining infectivity is prevented. That means for computing Re, the infected contact is weighted by the fraction of its infectivity up to time j+vd-1 (the -1 to make it simultaneous with the day of diagnosing the index). So to summarise, j should be the day since acquisition of infection by the contact on day i of the index's infectious period.
Mirjam
Hi @mirjamkretzschmar,
Thanks for your reply and explanation! I think I got your idea, but based on the equation you have in the code
pd[[ds, i, j - i + 1]]*cv*transmissionweights[[j + vd - 1]]
Let me clarify something, and correct me if I am wrong. The i and j are representing the following on index case's timeline:
...... i ....................j ............. j + vd - 1
^ ^ ^
| | |
infected contact index diagnosed tracing happens due to delay vd
Because of this, the first part pd[[ds, i, j - i + 1]]
makes sense, i.e. probability of being diagnosed on day j
, if one has not been diagnosed up to day i
. Now for the second part, the infected contact is weighted by the fraction of its infectivity, but the infection happens on day i
, if we use j + vd - 1
that means it happens on day 1
. Thus, i feel (based on the diagram), the time frame for the infected contact to be infectious should be from day i
to j + vd - 1
(in terms of the days on index cases) which would result in sth like transmissionweights[[j - i + vd]
.
Please let me your thoughts, and let know if i misunderstand some part of it.
Thanks, gxtchenry
Hi,
the timeline you made is not completely correct. In my code, i is the day of the infectious period of the index case on which diagnosis occurs. On this day, the infected contact is on day j since acquisition of infection.
Hi Mirjam,
Thanks for your reply!
If that is the case, the following seems a bit inconsistent.
As in the summation,
j
goes from i
to sth definitely larger than i
(min[i - 1 + Length[pd[[ds, i]]], i + timewindow]
), if i - j
is the transmission day then it will be a negative number. Moreover, what does the j - i + 1
mean in this case?
Hi @mirjamkretzschmar, any thoughts on my previous comment?
When it computes the probtrace
probtrace[vd_, cv_, fa_]
in rzero_corona_final.nb, it uses the transmissionweights is the following way:But as the transmissionweights is applied to the infected contact person, and
j
here is the day on the index case, should it be:Same question for the very bottom equation on the page 7 of the supplemental material. Not sure if this could lead to incorrect r0 estimation, or it is not a problem.
Thanks.