{ Analytica Model Mortality_estimation, encoding="UTF-8" }
SoftwareVersion 5.3.3
{ System Variables with non-default values: }
Time := Sequence(31-dec-2019, 2-feb-2020)
SampleSize := 1000
TypeChecking := 1
Checking := 1
SaveOptions := 2
SaveValues := 0
{!-50299|DiagramColor Model: 65535,65535,65535}
{!-50299|DiagramColor Module: 65535,65535,65535}
{!-50299|DiagramColor LinkModule: 65535,65535,65535}
{!-50299|DiagramColor Library: 65535,65535,65535}
{!-50299|DiagramColor LinkLibrary: 65535,65535,65535}
{!-50299|DiagramColor Form: 65535,65535,65535}
NodeInfo FormNode: 1,0,0,,0,0,,,,0,,,0
{!-50299|NodeColor Text: 62258,62258,62258}
AskAttribute TableCellDefault,Variable,Yes
Model Mortality_estimation
Title: Early Estimation of Mortality Rate from the Wuhan coronavirus
Description: This model was created in the very early days of the Wuhan coronavirus outbreak of 2020. My interest was in estimating the mortality rate of this new disease given the extremely limited data of the previous two weeks, soon after the initial appearance of the disease, and before very much is known about it.~
~
It was also the basis for a blog posting on the Analytica blog on 2-Feb-2020.
Author: Lonnie Chrisman, Ph.D.~
Lumina Decision Systems
Date: Sun, Feb 2, 2020 12:39 PM
DiagState: 2,31,10,824,509,17
FontStyle: Arial,15
FileInfo: 0,Model Mortality_estimation,2,2,0,0,C:\Users\User\Documents\Analytica\Early Estimation of Mortality Rate from the Wuhan coronavirus.ana
Variable Confirmed_cases
Title: Confirmed cases
Units: People
Description: The actual numbers released in the media each day for the cumulative number of confirmed cases of the Wuhan virus.
Definition: Table(Time)(1,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,45,62,121,198,291,446,579,844,1312,2015,2801,4579,6061,7816,9821,11.948K,14.551K,null)
NodeLocation: 128,64,1
NodeSize: 48,32
DefnState: 2,855,115,449,548,0,DFNM
ValueState: 2,685,236,659,522,1,MIDM
GraphSetup: Att_GraphValueRange Confirmed_cases:1,,,,1~
Att_ContLineStyle Graph_Primary_Valdim:5
XyExpr: @ Time
TableCellDefault: null
Variable Confirmed_growth_rat
Title: Confirmed growth rate
Description: The estimated exponential growth rate for the confirmed cases.~
~
Note: This regression does not include a y-intercept. When I did include it, it came out to be very close to zero, which happens to also match the first confirmed case on 31-dec-2019.
Definition: Regression(ln(Confirmed_cases),@Time-1,Time )
NodeLocation: 264,64,1
NodeSize: 48,32
ValueState: 2,372,457,416,303,,MIDM
Variable Fit_confirmed
Title: Fit confirmed
Definition: Exp( (@Time-1)*Confirmed_growth_rat )
NodeLocation: 400,64,1
NodeSize: 56,24
ValueState: 2,260,267,546,446,1,MIDM
Variable Compare1
Definition: [Confirmed_cases,Fit_confirmed]
NodeLocation: 536,64,1
NodeSize: 48,24
ValueState: 2,442,264,612,498,1,MIDM
GraphSetup: Att_ContLineStyle Graph_Primary_Valdim:5
{!50200|Att_KeyVisState: [Compare1:[1: 1,2: 2]]}
Variable Deaths
Title: Deaths
Units: People
Description: The actual cumulative numbers of deaths from the Wuhav virus reported each day in the media.
Definition: Table(Time)(Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,9,17,25,41,56,80,106,132,170,213,258,304,Null)
NodeLocation: 128,144,1
NodeSize: 48,24
ValueState: 2,734,163,416,303,1,MIDM
TableCellDefault: Null
Variable Death_growth_rate
Title: Death growth rate
Description: This is the exponential growth rate (fitted by regression) for the deaths as a function of number of days. ~
~
The curve here is ~
ln( deaths(t) ) = exp( m * t + b )~
~
this computes both m and b. b is the Death_rate_shift. This can also be rewritten as~
~
ln( deaths(t)) = exp( m * (t - b/m) )~
~
where b/m is the death-rate shift relative to 31-dec-2019.
Definition: Local m;~
(m,Death_rate_shift) := Regression( ln(deaths),@Time-1,time);~
m
NodeLocation: 264,144,1
NodeSize: 48,32
ValueState: 2,374,467,416,303,,MIDM
Variable Death_rate_shift
Title: Death rate shift
Units: days
Description: The time origin for the fitted reported deaths curve.
Definition: ComputedBy(Death_growth_rate)
NodeLocation: 264,224,1
NodeSize: 48,24
ValueState: 2,902,28,416,303,,MIDM
Variable Est__days_from_confi
Title: Est. days from confirm to death
Units: days
Description: This is one way to estimate the latency between a patient being diagnosed and dying.~
~
(The actual estimate here seems implausible to me)
Definition: -Death_rate_shift/Death_growth_rate
NodeLocation: 264,312,1
NodeSize: 48,40
WindState: 2,588,362,720,350
ValueState: 2,889,11,416,303,,MIDM
Variable Fit_deaths
Title: Fit deaths
Definition: Exp( Death_growth_rate * (@Time-1) + Death_rate_shift)
NodeLocation: 400,144,1
NodeSize: 48,24
ValueState: 2,420,427,416,303,1,MIDM
Variable Compare2
Definition: [Deaths,Fit_deaths]
NodeLocation: 536,144,1
NodeSize: 48,24
ValueState: 2,436,388,463,381,1,MIDM
GraphSetup: Att_ContLineStyle Graph_Primary_Valdim:5
{!50200|Att_KeyVisState: [Compare2:[1: 1,2: 2]]}
Variable Diagnosed_that_event
Title: Diagnosed that eventually died
Description: A shifted version of the number of deaths, so that the date of reported death aligns with the date they were most likely diagnosed on.
Definition: Local y := ln(Deaths);~
Exp(LinearInterp( Time, y, Time+d, Time,2))
NodeLocation: 408,368,1
NodeSize: 48,40
ValueState: 2,749,294,579,418,1,MIDM
Variable Estimated_mortality_
Title: Estimated mortality rate
Description: Estimated mortality rate based on the data for each individual day, which each date yielding a different mortality rate estimate.
Definition: Diagnosed_that_event / Confirmed_cases
NodeLocation: 568,328,1
NodeSize: 48,32
ValueState: 2,516,323,618,376,1,MIDM
GraphSetup: Graph_HLabelRotation:30
NumberFormat: 2,%,4,2,0,0,4,0,$,0,"ABBREV",0,,,0,0,15
Variable d
Title: d = Days from confirm to death
Units: days
Description: You can put your own estimate of the average latency between diagnosis and death here, and then see the estimated mortality rate that is computed from this.
Definition: Sequence(0, 8,0.1)
NodeLocation: 264,408,1
NodeSize: 48,40
Variable Compare3
Title: Wuhan Cases & deaths
Units: People
Description: Graph showing confirmed cases and deaths.
Definition: [Confirmed_cases,Deaths]
NodeLocation: 128,232,1
NodeSize: 48,32
ValueState: 2,227,186,591,535,1,MIDM
GraphSetup: Graph_HLabelRotation:30~
Att_GraphValueRange Compare3:1,,,,1~
Att_ContLineStyle Graph_Primary_Valdim:5~
Att_GraphIndexRange Time:1,,0,,,,,42.38281620769203K,42.4K,0
Variable Diagnosed___eventual
Title: Diagnosed & eventual died
Units: People
Description: A graph comparing the repored cases to the shifted reported deaths curve, so that the date indicates the likely date of diagnosis for both.
Definition: [Confirmed_cases,Diagnosed_that_event]
NodeLocation: 408,464,1
NodeSize: 48,32
WindState: 2,630,409,720,350
ValueState: 2,759,106,561,545,1,MIDM
GraphSetup: Att_GraphIndexRange Time:1,,0,,,,,42.388K,42.399968457341194K,0~
Att_ContLineStyle Graph_Primary_Valdim:5~
Att_GraphValueRange Diagnosed___eventual:1,,,,1
ReformVal: [Time,Self]
Att_ResultSliceState: [d,4,Self,1,Time,1]
Objective Estimated_mortality1
Title: Estimated mortality rate
Description: My estimate of the percentage of people diagnosed with Wuhan pnemonia who will die of it.
Definition: Average(Estimated_mortality_,time)
NodeLocation: 568,416,1
NodeSize: 48,32
ValueState: 2,481,192,506,424,1,MIDM
NumberFormat: 2,%,4,2,0,0,4,0,$,0,"ABBREV",0,,,0,0,15
Close Mortality_estimation