Impact of R0 on Cases
In this simulation we model the impact of R0 on the total case count. You can adjust the parameters on the right for a different country, state or city.
When the virus broke out in Wuhan, the approximate R0 was about 2.3. Under strict quarantine practices and social distancing countries have brought it down to 1.5 quickly. By my own estimates the US is at around 1.9 right now. Once we get R0 under 1, then we can contain the disease.
You can play around with the future R0 values to see how they would impact the total case count and deaths.
Sample an outcome from the outcomes array based on the corresponding probabilities in the probabilities array.
Creates a radio button parameter with name and have each option in the options array selectable. Returns the selected option.
Create a textbox parameter with name and a required default value. Returns the value of the textbox.
scatter_graph(data, xlabel, ylabel)
Create a graph based on a data array and plot (data.xlabel, data.ylabel) on it. Can also pass xmin=null, xmax=null, ymin=null, ymax=null as added arguments.
Calling this function, stops the simulation.
Returns the average of the values in the array. It can be handy to store the values of metrics from each simulation run and average it across all runs to obtain an estimate of the metric.
Returns the estimated error (1.96 x standard error) of the average of the values at 95% confidence. In simple terms, you can assume that the estimate average(values) has error bounds +/- error_average(values). It can be handy to store the values of metrics from each simulation run and estimate both the average and the error of the average across all runs.
Returns the standard deviation of the values in the passed in array.