Formula to calculate reproduction number R

New Topic
This topic has been archived, and won't accept reply postings.
 elsewhere 13 May 2020

Funnily enough despite all the news coverage I've not previously seen how it's calculated.

R=(M1+M2+M3+M4)/(M5+M6+M7+M8)

M - daily measure of Covid19

1 to 8 represent day of measurement - 1 day earlier, 2 days earlier, 3 days earlier...

Basically it's how the measure changes on a timescale representing the 4 days when somebody might be infectious. Choice of 4 days and averaging over 4 days presumably not written in stone as you would use months or years for something much longer term like HIV.

I interpret the formula as a 4 day timescale for disease and 4 day averaging rather than 8 day disease timescale.

If you use too short a timescale you underestimate changes making R closer to 1, if you use too long a timescale you overestimate change and make R further from 1.

If the timescale too short/long it will still correctly give R=1 when the measure is static.

Saw this on German news, starting at 02:35 in the video below. The graphics at 03:22 might be understandable without understanding German.

 http://www.tagesschau.de/multimedia/sendung/ts-37053.html 

I do not know what formula the UK uses to calculate R or which of the multiple possible measures it uses. I don't know if the UK is testing a representative random sample.

So far I've not said what M is.

I think the official calculation in Germany comes from Robert Koch Institut and I think the measure I've written as M is hospital admissions (I didn't get that from the video, a German contributor to UKC mentioned it in passing).

The actual German formula is 

R=(M4+M5+M6+M7)/(M8+M9+M10+M11)

because the latest 3 measures M1, M2 & M3 are provisional and subject to change (my understanding of the video).

Anyway, if you have the data (eg URL below for example) you can calculate R with Excel etc for yourself. 

https://www.gov.uk/government/publications/slides-to-accompany-coronavirus-... 

Which M for R=(M1+M2+M3+M4)/(M5+M6+M7+M8)?

I calculated for UK daily deaths which I think lags ON AVERAGE about 3 weeks behind day of infection plus a bit for use of 7 rolling sum, this is currently about R=0.86 reflecting what was happening 3-4 weeks ago.

For more up to date information I calculated R for Hospital admissions (E+W) which I think lags ON AVERAGE about 10 days behind day of infection. This is currently R=0.89 and fluctuates more, perhaps needs a 7 day average too. 

I calculated R for People in hospital for English regions & Scotland, Wales, NI. I think that is appropriate but I may be wrong. It has multiple timescales as it depends on admissions, discharges & deaths. I think R=0.88 to 0.93 for all of them now. 

I've taken then government spreadsheet (yesterday) and calculated R using the latest data. The columns I've added are red text, I've not changed the other data (unless I miss-typed somewhere) but you can download that for yourself anyway.

You can see R was much higher before the lockdown. 

https://gofile.io/d/VqQtqQ <-- my version of government spreadsheet, my additions to calculate R in red. 

PS my background is NOT medical related 

Post edited at 14:28
 HansStuttgart 13 May 2020
In reply to elsewhere:

> I think the official calculation in Germany comes from Robert Koch Institut and I think the measure I've written as M is hospital admissions (I didn't get that from the video, a German contributor to UKC mentioned it in passing).

In case this refers to one of my posts: I mentioned that it is possible to calculate R0 from hospital admissions, not that the Germans do it this way.

The German R0 calculation is based on the detected cases. They are ordered based on the date of the start of the symptoms.

OP elsewhere 13 May 2020
In reply to HansStuttgart:

> In case this refers to one of my posts: I mentioned that it is possible to calculate R0 from hospital admissions, not that the Germans do it this way.

Yes, it must have been you.

> The German R0 calculation is based on the detected cases. They are ordered based on the date of the start of the symptoms.

That might explain the thermometer on the graphics, I probably missed it in what the reporter said.

It's a mystery here how it's calculated here, I don't think anybody has said and I don't think anybody has asked.

 jimtitt 13 May 2020
In reply to HansStuttgart:

Indeed, the RKI take the date the infection is reported then move the date back 4 days to get the date the patient was infected. Then 4 days forwards for the symptoms of the next infected person to be detected. The R number is rolling roughly 10 days behind.

Post edited at 15:54
 HansStuttgart 13 May 2020
In reply to jimtitt:

I assumed they actually asked the patients?

 jimtitt 13 May 2020
In reply to HansStuttgart:

Asked them what? The RKI  take the day the positive test was reported and subtract 4 days, simple or crude as that.

 krikoman 13 May 2020
In reply to HansStuttgart:

> In case this refers to one of my posts: I mentioned that it is possible to calculate R0 from hospital admissions, not that the Germans do it this way.

What if the majority of deaths are in care homes, and they never make it to hospital? The calculations would then be way off.

 HansStuttgart 13 May 2020
In reply to jimtitt:

> Asked them what? The RKI  take the day the positive test was reported and subtract 4 days, simple or crude as that.

When the symptoms started. All the persons I know who got the virus were asked. This date for example determined the end of my two-week quarantine. I don;t know whether it is passed on to the RKI though

The data for reported cases and cases by date of symptoms look different. The RKI must at least average out a lot of weekly fluctuations...

 HansStuttgart 13 May 2020
In reply to krikoman:

> What if the majority of deaths are in care homes, and they never make it to hospital? The calculations would then be way off.


Not really. Because those patients would still be detected as cases and included in the list.

The largest systematic error is actually the young people who mostly don't get symptoms and are tested much less. So if the proportion of infected young people changes, this skews the result. It is not really important though, it would just mean that the number R0 would be a bit smaller/larger. That does not affect the relevant metrics: cases with symptoms, cases with hospitalization, cases leading to deaths. Because those determine the level of effort required by the government to protect the people.

In reply to elsewhere:

Apparently the results of tests being done by the outsourced private contractors to get to the famous 100k test target aren't being reported to Public Health England and only the NHS administered tests are going in the official new infections count that gets reported by government.

This would go a long way to explaining why the UK is doing far more tests but the number of new infections is staying pretty much flat.

https://www.hsj.co.uk/coronavirus/exclusive-test-data-from-commercial-labs-...

Could they organise a piss up in a brewery?

Post edited at 19:02
 wintertree 13 May 2020
In reply to elsewhere:

Using 4- or 8- days is sketchy as a lot of reporting has weekend associated “bunching” in the numbers.  I’d tend to a 7-day measure over successive weeks but there’s no “proper” way to do it and barely an ideal way.

What I’d probably do is a 15-point 3rd order savitsky golay filter on the M dataset for both the data and its derivative then plot (1+ filtered dM/dT) / (filtered M) as a nicely filtered version of R.  If I get a chance I’ll do that and come back with a graph - will need to tick my “become UKC supporter” todo item first...

 FactorXXX 13 May 2020
In reply to HansStuttgart:

> In case this refers to one of my posts: I mentioned that it is possible to calculate R0 from hospital admissions, not that the Germans do it this way.
> The German R0 calculation is based on the detected cases. They are ordered based on the date of the start of the symptoms.

Isn't R0 the reproduction value of the virus in a population that has no prior immunity and with no counter measures taken?

OP elsewhere 13 May 2020
In reply to wintertree:

I think you have to use 4 day timescale defined by the virus. That's the time taken for the average person to infect the people they end up infecting.

The R from deaths is based on 7 day running sum.

Hospital occupancy at any time is determined by admissions in previous 5-12 days (average duration of hospital stay) which smooths out most weekly variations.

For most of the R values the day to day fluctuations only in 2nd decimal place.

 wintertree 13 May 2020
In reply to elsewhere:

You could do a 7-day rolling average and compare rolling averages numbers 4 days apart.  This smooths out weekend effects.  There are 2 datasets for the UK kicking about one by reporting day and one by day of test, the later being less affected by weekends.

Post edited at 20:04

New Topic
This topic has been archived, and won't accept reply postings.
Loading Notifications...