lisphilar / covid19-sir

CovsirPhy: Python library for COVID-19 analysis with phase-dependent SIR-derived ODE models.
https://lisphilar.github.io/covid19-sir/
Apache License 2.0
109 stars 44 forks source link

[Discuss] Control Parameters for All Countries #426

Closed Aminolroaya closed 3 years ago

Aminolroaya commented 3 years ago

Summary of question

Thanks for your code. I know that the country name should be specified or the theoretical country can be used for the scenario. I want to know if it is possible to control the model parameters for all countries at the same time? I know one solution would be to specify the names of the countries one by one, but in this case, I think we do not consider the effects of spread in countries on one another. The most important output for me is to be able to simulate the dynamics (timeline) of the spread to all counties.

Thanks, Zahra

lisphilar commented 3 years ago

Thank you for using CovsirPhy and creating an issue! Let me make sure I understand your question correctly. You mean your analysis needs total number of infected/recovered/fatal cases in all countries?

Inglezos commented 3 years ago

No, I think she means spatial distribution of COVID-19 with SIR model. In CovsirPhy we only capture the time varying part, analyzing individually each country, but not the spatial characteristics as a whole. https://pubmed.ncbi.nlm.nih.gov/27796478/ https://en.wikipedia.org/wiki/Spatial_epidemiology

Aminolroaya commented 3 years ago

Thanks for your responses. @Inglezos mentioned correctly. I want to simulate the worldwide spatiotemporal spread considering the control of parameters. For example, based on real data, the disease first was reported in China in Dec 2019. Then, Japan and Taiwan reported the disease, I think, about Jan 2020, and so on. In the real case, the spread in countries is related to each other and we do not consider countries independent. The timeline of reported cases in space and time based on countries is important for me.

Due to the responses, I think in the current version, this feature is not provided. For using the current version, if I run the simulation for all countries one by one and then consider them all together, can it be close to the simulation of worldwide spread? I also guess that I cannot simulate with control parameters (e.g., lockdown) for real countries as it is only available for the theoretical country. Am I right? Any suggestion? For example, changing the population or start date of theoretical data corresponding to the countries' population and real data start date, so that it can become close to the simulation with the parameter control for real countries?

lisphilar commented 3 years ago

Spatial analysis: Spatial analysis is necessary to understand the situations deeply because travel is a key factor of outbreak. However, as you noticed, this is not implemented in CovsirPhy version 2.13.2 and we have many steps to implement this feature. For example, we will find solutions to apply injections to SIR-F model. Spatial analysis will be discussed in forum #437.

For using the current version, if I run the simulation for all countries one by one and then consider them all together, can it be close to the simulation of worldwide spread?

Yes. We have PolicyMeasures class to estimate parameter values in all countires, but this is a very time-consuming task (as mentioned in #435). Documentation of this class is in https://lisphilar.github.io/covid19-sir/usage_policy.html

I also guess that I cannot simulate with control parameters (e.g., lockdown) for real countries as it is only available for the theoretical country.

Theoritical data is unnecessary for this analysis. We can change the parameter values in future phases (dates) with Scenario.add() method. This means we can simulate the number of cases with user-defined parameter values in the future phases.

# Create a new scenario named "Medicine"
snl.clear(name="Medicine")
# Add a new future phase (30 days) with sigma = 0.0618 for example
snl.add(name="Medicine", days=30, sigma=0.0618)
# Simulation
snl.simulate()
# Compare the scenarios
snl.history("sigma")
snl.describe()

(We need to update https://lisphilar.github.io/covid19-sir/usage_quick.html#Simulate-another-scenario to document the details of this usage.)

Aminolroaya commented 3 years ago

Thanks for your comprehensive answers @lisphilar.