Closed Mouvoh closed 4 years ago
In order to improve my comprehension of the script I've been checking the SEIR Indian age structured but these 3 syntaxes are a bit difficult to understand. CH, CW, CS, are contact structure for House Work and school but please what are their values ? How can I modify them ? Also Is_0[4:12]=3; Is_0[3:4]=1 does it mean 3 infected for the age classes numbered 4,5...12 ? At last I do not really understand this syntax below : for i in range(M): IC += data['X'][:,3*M+i]
@Mouvoh this is a good question. The contact matrices CH, CW, CS and CO have been obtained from a previous work by Prem et al: Projecting social contact matrices in 152 countries using contact surveys and demographic data, Kiesha Prem, Alex R. Cook, Mark Jit, PLOS Computational Biology, (2017)
As far as the code is concerned, you can use any contact matrix which is of the size M x M. In this example the contact matrix passed for the integration is a simple sum,
C = CH+CW+CS+CO.
You could use
C = aH*CH+aW*CW+aS*CS+aO*CO.
Then vary the constants aH, aW, aS, aO...
See also examples in the folder contactMatrix
and control
at https://github.com/rajeshrinet/pyross/tree/master/examples.
Yes, Is_0[4:12]=3 mean 3 infected for the age classes numbered 4,5...11 at the start of the simulation.
The data for the SEIR model is stored as: first M points is S, then E, then Ia and then Is. So if you want to plot Is, you need to see points starting from 3*M. If you are interested in the net number of infections, then you have to sum it over all M age-groups. This is done by
for i in range(M):
IC += data['X'][:,3*M+i]
Hope this is helpful.
Thanks, all has been clarified but the first point is still misunderstood. After some research, I found the studies about contact Matrix I guess it has some empiric values. But in the script I see pyross.contactMatrix.(The country)() so where are theses contact matrix in the different folders ? what if I want for example for France which file should I import in the database ?
@Mouvoh you can now import contacts matrices for France as
import pyross
CH, CW, CS, CO = pyross.contactMatrix.France()
To do it for some other country:
import pandas as pd
import numpy as np
CW=np.array(pd.read_excel(os.path.join(curDir,'data/contact_matrices_152_countries/MUestimates_work_1.xlsx'), sheet_name='France'))
here curDir
is the path of the pyross/examples folder
Thanks a lot
Re Hello, thanks to you I made a lot of things since the beginning. About the covid-cases is there a syntax to import for any countries ? Because I've been on the site worlmeters but the data are not shaped as in the pyross data. Also about CW=np.array(pd.read_excel(os.path.join(curDir,'data/contact_matrices_152_countries/MUestimates_work_1.xlsx'), sheet_name='France')), do I do the same for CH , CS & CO ?
Yes, you do the same for CH, CS, CO.
Thanks What can I do to obtain covid data cases from a country which is not in the data folder please ?
Requirement already satisfied: pytz in /home/kazuki/anaconda3/lib/python3.7/site-packages (2020.1) Please I am now in my pyross environment but havaing an issue with panda. I do not know why there is an error because i installed this module in my pyross environment once this issue raised. I see the issue come from Python 3.8
Solved just put import panda before pyross
Hello, for my traineeship I have to use the seairq model. I definitely understood the concept of age structure but I have some problems to catch the syntaxes of how import the data. For example in this SEAIRQ script. What should I do If I want to import the matrix contact ?