Forcasting COVID-19 Deaths

A simple model for the estimation of the maximum percentage of deaths due to COVID-19.

NOTE: I’m not an epidiomiologist.

The prediction based on a simple logistic model and:

70% of SARS-CoV-2 exposure
10% Infection efficacy ie. 10% of the exposure subjects turns into a Covid-19 case
1% of Mortality

For each country we will use the urban population

I’ll estimate the death rates based on current trends fitted to the logistic function.
The last 14 days will be used for the peak estimations. Peak estimations will be done using:

If the data has not reached the peak the plots will show estimations based on:

  1. The last reported 14 observations
  2. 14 observations from the last week
  3. 14 observations ending two weeks ago
  4. 14 observations ending three weeks ago
  5. 14 observations ending four weeks ago

If the data reached the peak the plots will show:

  1. all the points after one week before the peak
  2. 14 observations before one week prior the peak
  3. 14 observations ending two weeks prior the peak
  4. 14 observations ending three week prior the peak
  5. 14 observations ending four week prior the peak

We are also providing optimistic models. We assume that the # of fatalities is one third the expected.

Notes:

  1. If the current observations does not mach the estimated CDF, do not trust the predictions.
  2. If predicted CDF does not reach 1.0, then there is the potential for more infection in the future or COVID-19 is not as deadly as I estimated

Source code:

https://github.com/joseTamezPena/COVID_Forecasting

# The expetec %  of deaths in each country

expectedtotalFatalities = 0.7*0.1*0.01
optGain <- 3
# The number of observations used for the trends
daysWindow <- 14
currentdate <- "April 12:" 

Loading the data

The data is the training set from: Kaggle: COVID19 Global Forecasting (Week 4)

https://www.kaggle.com/c/covid19-global-forecasting-week-4/data

Ploting some trends

Country_Region <- names(table(trainCountry$Country_Region))
totaldeaths <- numeric()
for (ctr in Country_Region)
{
   totaldeaths <- append(totaldeaths,max(trainCountry[trainCountry$Country_Region == ctr,"Fatalities"]))
}
names(totaldeaths) <- Country_Region
totaldeaths <- totaldeaths[order(-totaldeaths)]

plot(trainCountry[trainCountry$Country_Region == names(totaldeaths[1]),"PerFatalities"],main="% Fatalities",xlab="Days",ylab=" % Fatalities")
for (ctr in names(totaldeaths[1:25]))
{
  linp <- trainCountry[trainCountry$Country_Region == ctr,"PerFatalities"]
  lines(linp)
  text(length(linp)-1,linp[length(linp)],ctr)
}



totaldeaths  <- totaldeaths[totaldeaths > 100]

Estimating the peaks

Estimation by Province or State

Estimating the State/Province Peaks