Description Usage Arguments Value Examples
This function gives a rough estimation of of the transmission rate alpha and used to improve the estimation of alpha.
1 |
data |
data of A (active confirmed), R(Recovered confirmed), D(Confirmed Deceased) |
country |
a list include betas, infect, populationdynamic, travelin_compartments, travelout_compartments |
a sequence of estimating values of alpha
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ## Not run:
library(CONETTravel)
library(rlist)
data = datas_3travel[[1]][,3:5]
betas = betafunc(data)
x = c(9999620, 250,130,0,0,0)
P= sum(x)
durationtravel = 84
w21= travelout_3dat[1,1]/(travelout_3dat[1,1] + travelout_3dat[1,3])
w31= travelout_3dat[1,1]/(travelout_3dat[1,1] + travelout_3dat[1,2])
out21 = travelout_3dat[,2]
out31 = travelout_3dat[,3]
total_in = out21*w21 + out31*w31
total_out = travelout_3dat[,1]
country = list(P =P, total_in = total_in, total_out= total_out,durationtravel=durationtravel)
populationdynamic = populationdynamicfunc(country)
infect = c(infectfunc(data, x),0)
travelin_compartments = matrix(0,nrow=country$durationtravel,6)
travelout_compartments = matrix(0,nrow=country$durationtravel,6)
S_in = round(total_in*.97,digits=0)
I_in = round(total_in*.03,digits=0)
travelin_compartments[,1] = S_in
travelin_compartments[,2] = I_in
S_out = round(total_out*.99,digits=0)
I_out = round(total_out*.01,digits=0)
travelout_compartments[,1] = S_out
travelout_compartments[,2] = I_out
country =list.append(country, betas = betas, populationdynamic=populationdynamic,
infect= infect, travelout_compartments = travelout_compartments,
travelin_compartments = travelin_compartments)
alphafunc(data,country)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.