Modelling the effect of lockdown

This note models the effect of the lockdown during the first wave of COVID-19. We use SEIR type of model with a certain time lag between infection and becoming infectious. Firstly we compare the timing of the change of the coefficient of infection, growth rate of confirmed cases corresponds to the change of mobility index, and secondly we assume the change of the coefficient of infection, activity index $beta$ (analogous to $R_0$) and fit the parameter to reproduce the actual number of confirmed cases. Finally, we assume that the activity index $beta$ is proportional to the square of the mobility and fit the parameters. The curves in various cuontries fits reasonably well in any cases, but estimating $beta$ from various parameters (including temperature) remains as an important task.


INTRODUCTION
Due to the worldwide pandemic of COVID-19, many countries are trying to slow down the spreading of the virus, and lockdown is a very powerful option for that. Therefore, it would be meaningful to estimate the effect of the lockdown on the dynamics of COVID-19 cases.
We use roughly two types of models for the number of patients, one is ordinary SEIR type of model as in [1], in which transfer from one state to another is proportional to the number of original state, and another is SEIR type of model which includes the effect of time delay [2]. In this model, once someone gets infected, they will become contagious and later quarantined after fixed period of time 1 . Using the actual number of patients [5] and the activity data from smartphones[6], we wish to know which type of model better describes the reality.
In the second section, we briefly describe the structure of two types of models, and in the third section we will see the overview of the model and fitting of the models with the real data. In the final section we will examine the result and possible future developments.

MODEL
Let me describe the model of contagion. The ordinary SEIR type of model consists of 5(or 4 for simplicity) states. 1 In reality, we know that the time infected person becomes contagious is rather fixed [3], and also it will take a while since patients go to a doctor till they receive the result of PCR testing. Therefore we expect the model with time delay will describe the dynamics better. S: susceptible (not infected), E: Exposed (infected but not yet contagious) I:Infected (infected and contagious) Q:Quarantined(infected but separated from others) R:Recovered(infected but recovered and no more contagious). Naturally the population of those 5 states adds up to the total number of population N. We assume that the transfer from state S to state E is proportional to S and I, because the infection happens via the contact of people in these two states. We further assume the transfer from E to I is proportional to the number of E (therefore it is somewhat similar to the decay of a particle to another state), and transfer from I to Q and I to R are also proportional to the number of people in state I.
The parameter in the model can be estimated by following clinical consideration; Since it is known one will be infectious after 3 to 5 days after the infection, the time scale for transferring from E to I can be estimated to be around 4 2 . Time scale for transfer from I to Q can be 2 The time from infection till one becomes mptomatic is around 5 days as in the study in Diamond Princess [3] and it is also known that one can be infectious 1 ∼ 2 days before one becomes symptomatic [8]. Therefore time scale for this process is  [4], but expected to vary from country to country. The transfer parameter from state I to state R is expected to be around 1/14, because it is considered it takes about two weeks for COVID-19 to be cured (to become not infectious). Another type of model is SEIR type of model with delay in time and the equations are given as below.
In reality, once you get infected with coronavirus, becoming symptomatic and being tested positive happens after certain amount of time rather than happening at certain probability. Thus, we have a heuristic reason to believe the latter model better describes the reality. In the later discussion in this note, we will focus on the delayed SEIR model. If transfer from to happens at time t, transfer from state to state happens at time + , where ∼ 4 , and assuming that state I will proceed to state Q with probability a and to state R with probability (1 − ), we further assume that the transfer from state to state will happen at time − 2 and to at time − 3 .

DATA AND ANALYSIS 3.1 Data
We use the data for the confirmed cases from ourworlddata.org[5] and mobility data from apple mobility report [6]. The apple mobility report records how many times people searched for certain path using apple map, and the number of search is counted for car, walk and transit respectively.

First Analysis
In the first analysis, we wish to know the time lag from infection to quarantine ( 2 ) heuristically. If the value of β and is constant, the growth rate 3 of should be proportional to β. Therefore, naively, we could expect that the growth rate of Q should be the same, so we might expect that the value of β and growth rate of ̇ (= daily around 4 and γ should be around 0.25. 3 We computed the slope of confirmed cases with respect to time as the growth rate. 4 In the original database, the amount of search people performed through apple map for walk, drive, transit are recorded and we just took the average of these confirmed cases) is proportional. We have changed the value of 2 and performed the linear regression of growth rate of ̇( ) with respect to ( − 2 ), and computed pvalue for each regression. As an example of countries which had a successful lockdown, please take a look at figures for Austria as in Figure 2.
First figure shows the number of confirmed cases, and the second shows the growth rate of the number of confirmed cases and activity index taken by [6] 4 . In the third figure, growth rate in confirmed cases and activity 12 days before was plotted. You can see that the growth rate changes in response to the change of activity index with around 10 days of delay. We have also performed linear regression on growth rate of confirmed cases and activity index, changing the time lag τ . As a result, we will have p-value for the regression and we have plotted the log(p-value) in the Figure 3. If we interpret the location of minimum pvalue as the most probable model 5 , we can conclude τ ∼ 12.

Second Analysis
In the next step, let's perform simulation with SEIR type model with delay. In this part, we simplify the model for ease of analysis. Here we ignore the state because it indices as activity index.   is a bit hard to know the ratio of patients who will not quarantined but be cured without any treatment.
For the former model, we have variables the number of people for , , , , and total number of people , and transfer coefficients , are given by medical consideration. We will fit the model to the data by tuning 0 ( at certain time), and the value of . We naively expect the value of to be proportional to activity index, but then it will not match the observation. We then assume that the time dependence of is similar to that of activity index. That is, as in Figure 4, we first approximate the dynamics of activity index as constant for < 1 and < 2 , and linearly decrease for 1 < ≦ 2 . We then assume that is constant for < 1 and < 2 , and linearly decrease for 1 < ≦ 2 .
In the delayed SEIR model, we instead have and from clinical consideration, because it is known that the time period from infection till one gets infectious is considered to be around 4 days. We then fit the model to daily confirmed cases and obtain 2 , 0 , 1 , I 0 .
If we wish to see log(̇), 0 corresponds to the intercept of the line, 0 corresponds to the slope of the line, 2 corresponds to the time of lockdown, and 1 corresponds to the slope of the line after lockdown, so it is not so hard to estimate the value of the parameters. Here we adjust those parameters by hand and saw the value of ̇ for actual and model. Here we show plot of those together with the plot of . For Australia, the parameter for the delayed model is, 0 = 1.0 , 1 = 0.04 0 , = 4 , 2 = 12 , I 0 = 0.01 , t 0 = 2/2 , t 1 = 3/12 , t 2 = 3/23 . For Austria, the parameter for the delayed model is 0 = 0.7 , 1 = 0.07 0 , = 4 , 2 = 14 , I 0 = 6 , t 0 = 3/1 , t 1 = 3/7 , t 2 = 3/15 . Here t 0 denotes the time when the number of confirmed cases became more than or equal to 10 for the first time (and we set the day to t=0 when we draw the graph for the number 6 That actually makes sense, because if we assume for example, only 20% of people go out and the rest stay home, both S and I will be multiplied by 20% and effectively becomes square of 20%. 7 It is also claimed from purely analysing the data in Japan in some twitter of patients). Considering the fact that the value of the activity became 20% of that due to lockdown in Australia, and 30% in Austria, the decline in were much more drastic compared to the decline in the value of the activity. From the fact that the ratio of 1 to 0 is close to the square of ratio of activity index, we can guess that the value of might just be proportional to square of activity index 6 . Let's try to fit the delayed model for the rest of the countries which experienced successful lockdown. With respect to each country, the estimated parameters would be as in The ratios of activity index before and after the lockdown are respectively roughly 30% for Czech, 40 ∼ 50% for Norway, and 40% for Switzerland, and square of those numbers roughly correspond to the ratio of before and after lockdown, again for those countries 7 .

Third analysis
We will improve the analysis in the previous subsection in two ways; Firstly, we have seen that the contact coefficient is roughly proportional to ( ) 2 , and then we reverse the logic and assume this proportionality relationship to derive the value of . We will again use [6], and use two possible mobility indices, one is average of mobility indices of three transportation (driving, transit, walking) 8 , and the other is mobility index for transit. Secondly, in the previous subsection, we have assumed fixed period of time one requires from the time of infection till the period one gets infectious, , and from the time of infection till the period one gets tested and quarantined, 2 . Here instead we assume Weibull   [3], the distribution of the time period from the infection to starting to be symptomatic is, Weibull distribution with mean 6.4 and standard deviation 2.3. Considering the fact one becomes infectious 2 ∼ 3 days before one becomes symptomatic [8], we could pretend that the distribution of the time period from the infection to starting to be infectious is Weibull distribution with mean 4 and standard deviation 2.3. This amounts to Weibull distribution with parameter k ∼ 1.8 and λ ∼ 4.5 9 .
Furthermore, in case of Japan, the distribution from the time of becoming symptomatic and the time of getting tested is known [9], and adding typical time from infection till one gets tested, which is 6.4 days, to this distribution, the distribution of time from infection till getting tested can be approximated as another Weibull distribution, with k = 3.3 and λ = 13.3. We assume that for the corresponding distribution in other countries, the value of k is 3, and fit the λ parameter for this distribution (denote as 2 ). As a result, fitting the curve by using = (mobility of public transportation) 2 seems to be the best fit. Moreover, we here assume a = 0, considering generalization to a = 0 will not change the dynamics qualitatively. The parameter for fitting is given as in table 2.

CONCLUSION AND DISCUSSION
In the above discussion, as a crude data analysis, we have seen that growth rate of confirmed cases of COVID-9 Remember that Weibull distribution is ( ) = ( / )( ) −1 exp{ −( / )} 19 is roughly linear in activity index, with time delay around 10 ± 5 days. In a more refined data analysis, we have tried to fit to the data with SEIR model with time delay and it can reproduce the data during lockdown. In that analysis, we saw that the ratio of the value of contact coefficient β before and after lockdown, β1/β0, is roughly equal to the ratio of square of mobility index before and after lockdown, so in the third analysis of this note, we have tried to fit the data with the assumption = ( ) 2 , using two different definition of mobility.
We have confirmed that the data roughly fits this assumption, although the true value of contact coefficient should be in between the result expected by using average mobility, and the one by transit mobility. We need further investigation to know more rigorous relationship between the mobility and the contact coefficient for modelling the number of confirmed cases of COVID-19. In particular, if we wish to fit the parameters for the number of confirmed cases, we might not be able to fit well with the data for the second wave, or third wave of covid-19, so it seems we need other parameters than mobility to explain the dynamics of confirmed cases. In Japanese case, temperature could be a promising candidate for the explanatory parameter, because in the mid-late summer we saw the decrease in the number of confirmed cases.