-
Notifications
You must be signed in to change notification settings - Fork 0
/
1_model_code.R
1954 lines (1688 loc) · 153 KB
/
1_model_code.R
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
source("0_mixing_matrix_gmix.R")
## Model flows
## The subsaripts denote the number of times someone as been exposed through either infection or vaccination
COVID_sero_vax <- function(t, x, parms){
#####Unvaccinated####
# Unvaccinated and unexposed
Scr0v0 =x[1]; Scu0v0 =x[2]; Sar0v0 =x[3]; Sau0v0 =x[4]; Ser0v0 =x[5]; Seu0v0 =x[6] #S0
Ecr1v0 =x[7]; Ecu1v0 =x[8]; Ear1v0 =x[9]; Eau1v0 =x[10]; Eer1v0 =x[11]; Eeu1v0 =x[12] #E1
Acr1v0 =x[13]; Acu1v0 =x[14]; Aar1v0 =x[15]; Aau1v0 =x[16]; Aer1v0 =x[17]; Aeu1v0 =x[18] #A1
Icr1v0 =x[19]; Icu1v0 =x[20]; Iar1v0 =x[21]; Iau1v0 =x[22]; Ier1v0 =x[23]; Ieu1v0 =x[24] #I1
Hcr1v0 =x[25]; Hcu1v0 =x[26]; Har1v0 =x[27]; Hau1v0 =x[28]; Her1v0 =x[29]; Heu1v0 =x[30] #H1
Rpcr1v0=x[31]; Rpcu1v0=x[32]; Rpar1v0=x[33]; Rpau1v0=x[34]; Rper1v0=x[35]; Rpeu1v0=x[36] #Immune after first exposure and seropositive
Rncr1v0=x[37]; Rncu1v0=x[38]; Rnar1v0=x[39]; Rnau1v0=x[40]; Rner1v0=x[41]; Rneu1v0=x[42] #Immune after first exposure and seronegative
Dcr1v0 =x[43]; Dcu1v0 =x[44]; Dar1v0 =x[45]; Dau1v0 =x[46]; Der1v0 =x[47]; Deu1v0 =x[48] #D1
# Unvaccinated and exposed once through infection
Spcr1v0=x[49]; Spcu1v0=x[50]; Spar1v0=x[51]; Spau1v0=x[52]; Sper1v0=x[53]; Speu1v0=x[54] #S1 part sussceptible after first exposure & seropositive
Sncr1v0=x[55]; Sncu1v0=x[56]; Snar1v0=x[57]; Snau1v0=x[58]; Sner1v0=x[59]; Sneu1v0=x[60] #S1 part sussceptible after first exposure & seronegative
Ecr2v0 =x[61]; Ecu2v0 =x[62]; Ear2v0 =x[63]; Eau2v0 =x[64]; Eer2v0 =x[65]; Eeu2v0 =x[66] #E2 infection among those with first prior exposure
Acr2v0 =x[67]; Acu2v0 =x[68]; Aar2v0 =x[69]; Aau2v0 =x[70]; Aer2v0 =x[71]; Aeu2v0 =x[72] #A2
Icr2v0 =x[73]; Icu2v0 =x[74]; Iar2v0 =x[75]; Iau2v0 =x[76]; Ier2v0 =x[77]; Ieu2v0 =x[78] #I2
Hcr2v0 =x[79]; Hcu2v0 =x[80]; Har2v0 =x[81]; Hau2v0 =x[82]; Her2v0 =x[83]; Heu2v0 =x[84] #H2
Rpcr2v0=x[85]; Rpcu2v0=x[86]; Rpar2v0=x[87]; Rpau2v0=x[88]; Rper2v0=x[89]; Rpeu2v0=x[90] #Rp2 Immune after second exposure and seropos
Rncr2v0=x[91]; Rncu2v0=x[92]; Rnar2v0=x[93]; Rnau2v0=x[94]; Rner2v0=x[95]; Rneu2v0=x[96] #Rn2 Immune after second exposure and seroneg
Dcr2v0 =x[97]; Dcu2v0 =x[98]; Dar2v0 =x[99]; Dau2v0 =x[100];Der2v0 =x[101]; Deu2v0=x[102] #D2
#Unvaccinated and exposed twice through infection
Spcr2v0=x[103]; Spcu2v0=x[104]; Spar2v0=x[105]; Spau2v0=x[106]; Sper2v0=x[107]; Speu2v0=x[108] #S2 part sussceptible after second exposure & seropositive
Sncr2v0=x[109]; Sncu2v0=x[110]; Snar2v0=x[111]; Snau2v0=x[112]; Sner2v0=x[113]; Sneu2v0=x[114] #S2 part sussceptible after second exposure & seronegative
Ecr3v0 =x[115]; Ecu3v0 =x[116]; Ear3v0 =x[117]; Eau3v0 =x[118]; Eer3v0 =x[119]; Eeu3v0 =x[120] #E3 infection among those with second prior exposure
Acr3v0 =x[121]; Acu3v0 =x[122]; Aar3v0 =x[123]; Aau3v0 =x[124]; Aer3v0 =x[125]; Aeu3v0 =x[126] #A3
Icr3v0 =x[127]; Icu3v0 =x[128]; Iar3v0 =x[129]; Iau3v0 =x[130]; Ier3v0 =x[131]; Ieu3v0 =x[132] #I3
Hcr3v0 =x[133]; Hcu3v0 =x[134]; Har3v0 =x[135]; Hau3v0 =x[136]; Her3v0 =x[137]; Heu3v0 =x[138] #H3
Rpcr3v0=x[139]; Rpcu3v0=x[140]; Rpar3v0=x[141]; Rpau3v0=x[142]; Rper3v0=x[143]; Rpeu3v0=x[144] #Rp3 Immune after third exposure and seropos
Rncr3v0=x[145]; Rncu3v0=x[146]; Rnar3v0=x[147]; Rnau3v0=x[148]; Rner3v0=x[149]; Rneu3v0=x[150] #Rn3 Immune after third exposure and seoneg
Dcr3v0 =x[151]; Dcu3v0 =x[152]; Dar3v0 =x[153]; Dau3v0 =x[154]; Der3v0 =x[155]; Deu3v0 =x[156] #D3
#####One dose of vaccination####
# Vaccinated once and unexposed
Spcr0v1 =x[157]; Spcu0v1 =x[158];Spar0v1 =x[159];Spau0v1 =x[160];Sper0v1 =x[161];Speu0v1 =x[162] #Sp0v1
Sncr0v1 =x[163]; Sncu0v1 =x[164];Snar0v1 =x[165];Snau0v1 =x[166];Sner0v1 =x[167];Sneu0v1 =x[168] #Sp0v1
Ecr1v1 =x[169]; Ecu1v1 =x[170]; Ear1v1 =x[171]; Eau1v1 =x[172]; Eer1v1 =x[173]; Eeu1v1 =x[174] #E1
Acr1v1 =x[175]; Acu1v1 =x[176]; Aar1v1 =x[177]; Aau1v1 =x[178]; Aer1v1 =x[179]; Aeu1v1 =x[180] #A1Good morning, is this still available?
Icr1v1 =x[181]; Icu1v1 =x[182]; Iar1v1 =x[183]; Iau1v1 =x[184]; Ier1v1 =x[185]; Ieu1v1 =x[186] #I1
Hcr1v1 =x[187]; Hcu1v1 =x[188]; Har1v1 =x[189]; Hau1v1 =x[190]; Her1v1 =x[191]; Heu1v1 =x[192] #H1
Rpcr1v1=x[193]; Rpcu1v1=x[194]; Rpar1v1=x[195]; Rpau1v1=x[196]; Rper1v1=x[197]; Rpeu1v1=x[198] #Immune after first exposure and seropositive
Rncr1v1=x[199]; Rncu1v1=x[200]; Rnar1v1=x[201]; Rnau1v1=x[202]; Rner1v1=x[203]; Rneu1v1=x[204] #Immune after first exposure and seronegative
Dcr1v1 =x[205]; Dcu1v1 =x[206]; Dar1v1 =x[207]; Dau1v1 =x[208]; Der1v1 =x[209]; Deu1v1 =x[210] #D1
# Vaccinated once and exposed once through infection
Spcr1v1=x[211]; Spcu1v1=x[212]; Spar1v1=x[213]; Spau1v1=x[214]; Sper1v1=x[215]; Speu1v1=x[216] #S1 part sussceptible after first exposure & seropositive
Sncr1v1=x[217]; Sncu1v1=x[218]; Snar1v1=x[219]; Snau1v1=x[220]; Sner1v1=x[221]; Sneu1v1=x[222] #S1 part sussceptible after first exposure & seronegative
Ecr2v1 =x[223]; Ecu2v1 =x[224]; Ear2v1 =x[225]; Eau2v1 =x[226]; Eer2v1 =x[227]; Eeu2v1 =x[228] #E2 infection among those with first prior exposure
Acr2v1 =x[229]; Acu2v1 =x[230]; Aar2v1 =x[231]; Aau2v1 =x[232]; Aer2v1 =x[233]; Aeu2v1 =x[234] #A2
Icr2v1 =x[235]; Icu2v1 =x[236]; Iar2v1 =x[237]; Iau2v1 =x[238]; Ier2v1 =x[239]; Ieu2v1 =x[240] #I2
Hcr2v1 =x[241]; Hcu2v1 =x[242]; Har2v1 =x[243]; Hau2v1 =x[244]; Her2v1 =x[245]; Heu2v1 =x[246] #H2
Rpcr2v1=x[247]; Rpcu2v1=x[248]; Rpar2v1=x[249]; Rpau2v1=x[250]; Rper2v1=x[251]; Rpeu2v1=x[252] #Rp2 Immune after second exposure and seropos
Rncr2v1=x[253]; Rncu2v1=x[254]; Rnar2v1=x[255]; Rnau2v1=x[256]; Rner2v1=x[257]; Rneu2v1=x[258] #Rn2 Immune after second exposure and seroneg
Dcr2v1 =x[259]; Dcu2v1 =x[260]; Dar2v1 =x[261]; Dau2v1 =x[262]; Der2v1 =x[263]; Deu2v1=x[264] #D2
#Vaccinated once and exposed twice through infection
Spcr2v1=x[265]; Spcu2v1=x[266]; Spar2v1=x[267]; Spau2v1=x[268]; Sper2v1=x[269]; Speu2v1=x[270] #S2 part sussceptible after second exposure & seropositive
Sncr2v1=x[271]; Sncu2v1=x[272]; Snar2v1=x[273]; Snau2v1=x[274]; Sner2v1=x[275]; Sneu2v1=x[276] #S2 part sussceptible after second exposure & seronegative
Ecr3v1 =x[277]; Ecu3v1 =x[278]; Ear3v1 =x[279]; Eau3v1 =x[280]; Eer3v1 =x[281]; Eeu3v1 =x[282] #E3 infection among those with second prior exposure
Acr3v1 =x[283]; Acu3v1 =x[284]; Aar3v1 =x[285]; Aau3v1 =x[286]; Aer3v1 =x[287]; Aeu3v1 =x[288] #A3
Icr3v1 =x[289]; Icu3v1 =x[290]; Iar3v1 =x[291]; Iau3v1 =x[292]; Ier3v1 =x[293]; Ieu3v1 =x[294] #I3
Hcr3v1 =x[295]; Hcu3v1 =x[296]; Har3v1 =x[297]; Hau3v1 =x[298]; Her3v1 =x[299]; Heu3v1 =x[300] #H3
Rpcr3v1=x[301]; Rpcu3v1=x[302]; Rpar3v1=x[303]; Rpau3v1=x[304]; Rper3v1=x[305]; Rpeu3v1=x[306] #Rp3 Immune after third exposure and seropos
Rncr3v1=x[307]; Rncu3v1=x[308]; Rnar3v1=x[309]; Rnau3v1=x[310]; Rner3v1=x[311]; Rneu3v1=x[312] #Rn3 Immune after third exposure and seoneg
Dcr3v1 =x[313]; Dcu3v1 =x[314]; Dar3v1 =x[315]; Dau3v1 =x[316]; Der3v1 =x[317]; Deu3v1 =x[318] #D3
#####Two dose of vaccination####
# Vaccinated twice and unexposed
Spcr0v2 =x[319];Spcu0v2 =x[320];Spar0v2 =x[321];Spau0v2 =x[322];Sper0v2 =x[323];Speu0v2 =x[324] #S0
Sncr0v2 =x[325];Sncu0v2 =x[326];Snar0v2 =x[327];Snau0v2 =x[328];Sner0v2 =x[329];Sneu0v2 =x[330] #S0
Ecr1v2 =x[331]; Ecu1v2 =x[332]; Ear1v2 =x[333]; Eau1v2 =x[334]; Eer1v2 =x[335]; Eeu1v2 =x[336] #E1
Acr1v2 =x[337]; Acu1v2 =x[338]; Aar1v2 =x[339]; Aau1v2 =x[340]; Aer1v2 =x[341]; Aeu1v2 =x[342] #A1
Icr1v2 =x[343]; Icu1v2 =x[344]; Iar1v2 =x[345]; Iau1v2 =x[346]; Ier1v2 =x[347]; Ieu1v2 =x[348] #I1
Hcr1v2 =x[349]; Hcu1v2 =x[350]; Har1v2 =x[351]; Hau1v2 =x[352]; Her1v2 =x[353]; Heu1v2 =x[354] #H1
Rpcr1v2=x[355]; Rpcu1v2=x[356]; Rpar1v2=x[357]; Rpau1v2=x[358]; Rper1v2=x[359]; Rpeu1v2=x[360] #Immune after first exposure and seropositive
Rncr1v2=x[361]; Rncu1v2=x[362]; Rnar1v2=x[363]; Rnau1v2=x[364]; Rner1v2=x[365]; Rneu1v2=x[366] #Immune after first exposure and seronegative
Dcr1v2 =x[367]; Dcu1v2 =x[368]; Dar1v2 =x[369]; Dau1v2 =x[370]; Der1v2 =x[371]; Deu1v2 =x[372] #D1
# Vaccinated twice and exposed once through infection
Spcr1v2=x[373]; Spcu1v2=x[374]; Spar1v2=x[375]; Spau1v2=x[376]; Sper1v2=x[377]; Speu1v2=x[378] #S1 part sussceptible after first exposure & seropositive
Sncr1v2=x[379]; Sncu1v2=x[380]; Snar1v2=x[381]; Snau1v2=x[382]; Sner1v2=x[383]; Sneu1v2=x[384] #S1 part sussceptible after first exposure & seronegative
Ecr2v2 =x[385]; Ecu2v2 =x[386]; Ear2v2 =x[387]; Eau2v2 =x[388]; Eer2v2 =x[389]; Eeu2v2 =x[390] #E2 infection among those with first prior exposure
Acr2v2 =x[391]; Acu2v2 =x[392]; Aar2v2 =x[393]; Aau2v2 =x[394]; Aer2v2 =x[395]; Aeu2v2 =x[396] #A2
Icr2v2 =x[397]; Icu2v2 =x[398]; Iar2v2 =x[399]; Iau2v2 =x[400]; Ier2v2 =x[401]; Ieu2v2 =x[402] #I2
Hcr2v2 =x[403]; Hcu2v2 =x[404]; Har2v2 =x[405]; Hau2v2 =x[406]; Her2v2 =x[407]; Heu2v2 =x[408] #H2
Rpcr2v2=x[409]; Rpcu2v2=x[410]; Rpar2v2=x[411]; Rpau2v2=x[412]; Rper2v2=x[413]; Rpeu2v2=x[414] #Rp2 Immune after second exposure and seropos
Rncr2v2=x[415]; Rncu2v2=x[416]; Rnar2v2=x[417]; Rnau2v2=x[418]; Rner2v2=x[419]; Rneu2v2=x[420] #Rn2 Immune after second exposure and seroneg
Dcr2v2 =x[421]; Dcu2v2 =x[422]; Dar2v2 =x[423]; Dau2v2 =x[424]; Der2v2 =x[425]; Deu2v2=x[426] #D2
#Vaccinated twice and exposed twice through infection
Spcr2v2=x[427]; Spcu2v2=x[428]; Spar2v2=x[429]; Spau2v2=x[430]; Sper2v2=x[431]; Speu2v2=x[432] #S2 part sussceptible after second exposure & seropositive
Sncr2v2=x[433]; Sncu2v2=x[434]; Snar2v2=x[435]; Snau2v2=x[436]; Sner2v2=x[437]; Sneu2v2=x[438] #S2 part sussceptible after second exposure & seronegative
Ecr3v2 =x[439]; Ecu3v2 =x[440]; Ear3v2 =x[441]; Eau3v2 =x[442]; Eer3v2 =x[443]; Eeu3v2 =x[444] #E3 infection among those with second prior exposure
Acr3v2 =x[445]; Acu3v2 =x[446]; Aar3v2 =x[447]; Aau3v2 =x[448]; Aer3v2 =x[449]; Aeu3v2 =x[450] #A3
Icr3v2 =x[451]; Icu3v2 =x[452]; Iar3v2 =x[453]; Iau3v2 =x[454]; Ier3v2 =x[455]; Ieu3v2 =x[456] #I3
Hcr3v2 =x[457]; Hcu3v2 =x[458]; Har3v2 =x[459]; Hau3v2 =x[460]; Her3v2 =x[461]; Heu3v2 =x[462] #H3
Rpcr3v2=x[463]; Rpcu3v2=x[464]; Rpar3v2=x[465]; Rpau3v2=x[466]; Rper3v2=x[467]; Rpeu3v2=x[468] #Rp3 Immune after third exposure and seropos
Rncr3v2=x[469]; Rncu3v2=x[470]; Rnar3v2=x[471]; Rnau3v2=x[472]; Rner3v2=x[473]; Rneu3v2=x[474] #Rn3 Immune after third exposure and seoneg
Dcr3v2 =x[475]; Dcu3v2 =x[476]; Dar3v2 =x[477]; Dau3v2 =x[478]; Der3v2 =x[479]; Deu3v2 =x[480] #D3
#####Three dose of vaccination####
# Vaccinated three times and unexposed
Spcr0v3 =x[481];Spcu0v3 =x[482];Spar0v3 =x[483];Spau0v3 =x[484];Sper0v3 =x[485];Speu0v3 =x[486] #S0
Sncr0v3 =x[487];Sncu0v3 =x[488];Snar0v3 =x[489];Snau0v3 =x[490];Sner0v3 =x[491];Sneu0v3 =x[492] #S0
Ecr1v3 =x[493]; Ecu1v3 =x[494]; Ear1v3 =x[495];Eau1v3 =x[496]; Eer1v3 =x[497]; Eeu1v3 =x[498] #E1
Acr1v3 =x[499]; Acu1v3 =x[500]; Aar1v3 =x[501]; Aau1v3 =x[502]; Aer1v3 =x[503]; Aeu1v3 =x[504] #A1
Icr1v3 =x[505]; Icu1v3 =x[506]; Iar1v3 =x[507]; Iau1v3 =x[508]; Ier1v3 =x[509]; Ieu1v3 =x[510] #I1
Hcr1v3 =x[511]; Hcu1v3 =x[512]; Har1v3 =x[513]; Hau1v3 =x[514]; Her1v3 =x[515]; Heu1v3 =x[516] #H1
Rpcr1v3=x[517]; Rpcu1v3=x[518]; Rpar1v3=x[519]; Rpau1v3=x[520]; Rper1v3=x[521]; Rpeu1v3=x[522] #Immune after first exposure and seropositive
Rncr1v3=x[523]; Rncu1v3=x[524]; Rnar1v3=x[525]; Rnau1v3=x[526]; Rner1v3=x[527]; Rneu1v3=x[528] #Immune after first exposure and seronegative
Dcr1v3 =x[529]; Dcu1v3 =x[530]; Dar1v3 =x[531]; Dau1v3 =x[532]; Der1v3 =x[533]; Deu1v3 =x[534] #D1
# Vaccinated three times and exposed once through infection
Spcr1v3=x[535]; Spcu1v3=x[536]; Spar1v3=x[537]; Spau1v3=x[538]; Sper1v3=x[539]; Speu1v3=x[540] #S1 part sussceptible after first exposure & seropositive
Sncr1v3=x[541]; Sncu1v3=x[542]; Snar1v3=x[543]; Snau1v3=x[544]; Sner1v3=x[545]; Sneu1v3=x[546] #S1 part sussceptible after first exposure & seronegative
Ecr2v3 =x[547]; Ecu2v3 =x[548]; Ear2v3 =x[549]; Eau2v3 =x[550]; Eer2v3 =x[551]; Eeu2v3 =x[552] #E2 infection among those with first prior exposure
Acr2v3 =x[553]; Acu2v3 =x[554]; Aar2v3 =x[555]; Aau2v3 =x[556]; Aer2v3 =x[557]; Aeu2v3 =x[558] #A2
Icr2v3 =x[559]; Icu2v3 =x[560]; Iar2v3 =x[561]; Iau2v3 =x[562]; Ier2v3 =x[563]; Ieu2v3 =x[564] #I2
Hcr2v3 =x[565]; Hcu2v3 =x[566]; Har2v3 =x[567]; Hau2v3 =x[568]; Her2v3 =x[569]; Heu2v3 =x[570] #H2
Rpcr2v3=x[571]; Rpcu2v3=x[572]; Rpar2v3=x[573]; Rpau2v3=x[574]; Rper2v3=x[575]; Rpeu2v3=x[576] #Rp2 Immune after second exposure and seropos
Rncr2v3=x[577]; Rncu2v3=x[578]; Rnar2v3=x[579]; Rnau2v3=x[580]; Rner2v3=x[581]; Rneu2v3=x[582] #Rn2 Immune after second exposure and seroneg
Dcr2v3 =x[583]; Dcu2v3 =x[584]; Dar2v3 =x[585]; Dau2v3 =x[586]; Der2v3 =x[587]; Deu2v3=x[588] #D2
#Vaccinated three times and exposed twice through infection
Spcr2v3=x[589]; Spcu2v3=x[590]; Spar2v3=x[591]; Spau2v3=x[592]; Sper2v3=x[593]; Speu2v3=x[594] #S2 part sussceptible after second exposure & seropositive
Sncr2v3=x[595]; Sncu2v3=x[596]; Snar2v3=x[597]; Snau2v3=x[598]; Sner2v3=x[599]; Sneu2v3=x[600] #S2 part sussceptible after second exposure & seronegative
Ecr3v3 =x[601]; Ecu3v3 =x[602]; Ear3v3 =x[603]; Eau3v3 =x[604]; Eer3v3 =x[605]; Eeu3v3 =x[606] #E3 infection among those with second prior exposure
Acr3v3 =x[607]; Acu3v3 =x[608]; Aar3v3 =x[609]; Aau3v3 =x[610]; Aer3v3 =x[611]; Aeu3v3 =x[612] #A3
Icr3v3 =x[613]; Icu3v3 =x[614]; Iar3v3 =x[615]; Iau3v3 =x[616]; Ier3v3 =x[617]; Ieu3v3 =x[618] #I3
Hcr3v3 =x[619]; Hcu3v3 =x[620]; Har3v3 =x[621]; Hau3v3 =x[622]; Her3v3 =x[623]; Heu3v3 =x[624] #H3
Rpcr3v3=x[625]; Rpcu3v3=x[626]; Rpar3v3=x[627]; Rpau3v3=x[628]; Rper3v3=x[629]; Rpeu3v3=x[630] #Rp3 Immune after third exposure and seropos
Rncr3v3=x[631]; Rncu3v3=x[632]; Rnar3v3=x[633]; Rnau3v3=x[634]; Rner3v3=x[635]; Rneu3v3=x[636] #Rn3 Immune after third exposure and seoneg
Dcr3v3 =x[637]; Dcu3v3 =x[638]; Dar3v3 =x[639]; Dau3v3 =x[640]; Der3v3 =x[641]; Deu3v3 =x[642] #D3
##Cumulative trackers
Ecum1v0_cr=x[643]; Ecum1v0_cu=x[644]; Ecum1v0_ar=x[645]; Ecum1v0_au=x[646]; Ecum1v0_er=x[647]; Ecum1v0_eu=x[648]
Ecum2v0_cr=x[649]; Ecum2v0_cu=x[650]; Ecum2v0_ar=x[651]; Ecum2v0_au=x[652]; Ecum2v0_er=x[653]; Ecum2v0_eu=x[654]
Ecum3v0_cr=x[655]; Ecum3v0_cu=x[656]; Ecum3v0_ar=x[657]; Ecum3v0_au=x[658]; Ecum3v0_er=x[659]; Ecum3v0_eu=x[660]
Ecum1v1_cr=x[661]; Ecum1v1_cu=x[662]; Ecum1v1_ar=x[663]; Ecum1v1_au=x[664]; Ecum1v1_er=x[665]; Ecum1v1_eu=x[666]
Ecum2v1_cr=x[667]; Ecum2v1_cu=x[668]; Ecum2v1_ar=x[669]; Ecum2v1_au=x[670]; Ecum2v1_er=x[671]; Ecum2v1_eu=x[672]
Ecum3v1_cr=x[673]; Ecum3v1_cu=x[674]; Ecum3v1_ar=x[675]; Ecum3v1_au=x[676]; Ecum3v1_er=x[677]; Ecum3v1_eu=x[678]
Ecum1v2_cr=x[679]; Ecum1v2_cu=x[680]; Ecum1v2_ar=x[681]; Ecum1v2_au=x[682]; Ecum1v2_er=x[683]; Ecum1v2_eu=x[684]
Ecum2v2_cr=x[685]; Ecum2v2_cu=x[686]; Ecum2v2_ar=x[687]; Ecum2v2_au=x[688]; Ecum2v2_er=x[689]; Ecum2v2_eu=x[690]
Ecum3v2_cr=x[691]; Ecum3v2_cu=x[692]; Ecum3v2_ar=x[693]; Ecum3v2_au=x[694]; Ecum3v2_er=x[695]; Ecum3v2_eu=x[696]
Ecum1v3_cr=x[697]; Ecum1v3_cu=x[698]; Ecum1v3_ar=x[699]; Ecum1v3_au=x[700]; Ecum1v3_er=x[701]; Ecum1v3_eu =x[702]
Ecum2v3_cr=x[703]; Ecum2v3_cu=x[704]; Ecum2v3_ar=x[705]; Ecum2v3_au=x[706]; Ecum2v3_er=x[707]; Ecum2v3_eu=x[708]
Ecum3v3_cr=x[709]; Ecum3v3_cu=x[710]; Ecum3v3_ar=x[711]; Ecum3v3_au=x[712]; Ecum3v3_er=x[713]; Ecum3v3_eu=x[714]
Icum1v0_cr=x[715]; Icum1v0_cu=x[716]; Icum1v0_ar=x[717]; Icum1v0_au=x[718]; Icum1v0_er=x[719]; Icum1v0_eu=x[720]
Icum2v0_cr=x[721]; Icum2v0_cu=x[722]; Icum2v0_ar=x[723]; Icum2v0_au=x[724]; Icum2v0_er=x[725]; Icum2v0_eu=x[726]
Icum3v0_cr=x[727]; Icum3v0_cu=x[728]; Icum3v0_ar=x[729]; Icum3v0_au=x[730]; Icum3v0_er=x[731]; Icum3v0_eu=x[732]
Icum1v1_cr=x[733]; Icum1v1_cu=x[734]; Icum1v1_ar=x[735]; Icum1v1_au=x[736]; Icum1v1_er=x[737]; Icum1v1_eu=x[738]
Icum2v1_cr=x[739]; Icum2v1_cu=x[740]; Icum2v1_ar=x[741]; Icum2v1_au=x[742]; Icum2v1_er=x[743]; Icum2v1_eu=x[744]
Icum3v1_cr=x[745]; Icum3v1_cu=x[746]; Icum3v1_ar=x[747]; Icum3v1_au=x[748]; Icum3v1_er=x[749]; Icum3v1_eu=x[750]
Icum1v2_cr=x[751]; Icum1v2_cu=x[752]; Icum1v2_ar=x[753]; Icum1v2_au=x[754]; Icum1v2_er=x[755]; Icum1v2_eu=x[756]
Icum2v2_cr=x[757]; Icum2v2_cu=x[758]; Icum2v2_ar=x[759]; Icum2v2_au=x[760]; Icum2v2_er=x[761]; Icum2v2_eu=x[762]
Icum3v2_cr=x[763]; Icum3v2_cu=x[764]; Icum3v2_ar=x[765]; Icum3v2_au=x[766]; Icum3v2_er=x[767]; Icum3v2_eu=x[768]
Icum1v3_cr=x[769]; Icum1v3_cu=x[770]; Icum1v3_ar=x[771]; Icum1v3_au=x[772]; Icum1v3_er=x[773]; Icum1v3_eu=x[774]
Icum2v3_cr=x[775]; Icum2v3_cu=x[776]; Icum2v3_ar=x[777]; Icum2v3_au=x[778]; Icum2v3_er=x[779]; Icum2v3_eu=x[780]
Icum3v3_cr=x[781]; Icum3v3_cu=x[782]; Icum3v3_ar=x[783]; Icum3v3_au=x[784]; Icum3v3_er=x[785]; Icum3v3_eu=x[786]
##Gamma waning trackers
W1Rpcr1v0 = x[787]; W2Rpcr1v0 = x[788]; W3Rpcr1v0 = x[789]
W1Rpcu1v0 = x[790]; W2Rpcu1v0 = x[791]; W3Rpcu1v0 = x[792]
W1Rpar1v0 = x[793]; W2Rpar1v0 = x[794]; W3Rpar1v0 = x[795]
W1Rpau1v0 = x[796]; W2Rpau1v0 = x[797]; W3Rpau1v0 = x[798]
W1Rper1v0 = x[799]; W2Rper1v0 = x[800]; W3Rper1v0 = x[801]
W1Rpeu1v0 = x[802]; W2Rpeu1v0 = x[803]; W3Rpeu1v0 = x[804]
##Vax and temporarily immune
Vpcr0v1 = x[805]; Vpcu0v1 = x[806]; Vpar0v1 = x[807]; Vpau0v1 = x[808]; Vper0v1 = x[809]; Vpeu0v1 = x[810]
Vncr0v1 = x[811]; Vncu0v1 = x[812]; Vnar0v1 = x[813]; Vnau0v1 = x[814]; Vner0v1 = x[815]; Vneu0v1 = x[816]
Vpcr0v2 = x[817]; Vpcu0v2 = x[818]; Vpar0v2 = x[819]; Vpau0v2 = x[820]; Vper0v2 = x[821]; Vpeu0v2 = x[822]
Vncr0v2 = x[823]; Vncu0v2 = x[824]; Vnar0v2 = x[825]; Vnau0v2 = x[826]; Vner0v2 = x[827]; Vneu0v2 = x[828]
Vpcr0v3 = x[829]; Vpcu0v3 = x[830]; Vpar0v3 = x[831]; Vpau0v3 = x[832]; Vper0v3 = x[833]; Vpeu0v3 = x[834]
Vncr0v3 = x[835]; Vncu0v3 = x[836]; Vnar0v3 = x[837]; Vnau0v3 = x[838]; Vner0v3 = x[839]; Vneu0v3 = x[840]
##Gamma waning trackers
W1Vpcr0v1 = x[841]; W2Vpcr0v1 = x[842]; W3Vpcr0v1 = x[843]
W1Vpcu0v1 = x[844]; W2Vpcu0v1 = x[845]; W3Vpcu0v1 = x[846]
W1Vpar0v1 = x[847]; W2Vpar0v1 = x[848]; W3Vpar0v1 = x[849]
W1Vpau0v1 = x[850]; W2Vpau0v1 = x[851]; W3Vpau0v1 = x[852]
W1Vper0v1 = x[853]; W2Vper0v1 = x[854]; W3Vper0v1 = x[855]
W1Vpeu0v1 = x[856]; W2Vpeu0v1 = x[857]; W3Vpeu0v1 = x[858]
with(as.list(params),{
# Derived variables
#Rural child
Ncr0v0 = sum(Scr0v0, Ecr1v0, Acr1v0, Icr1v0, Hcr1v0, Rpcr1v0, W1Rpcr1v0,W2Rpcr1v0,W3Rpcr1v0,Rncr1v0) #Unvax and no prior exposure
Ncr1v0 = sum(Spcr1v0, Sncr1v0, Ecr2v0, Acr2v0, Icr2v0, Hcr2v0, Rpcr2v0, Rncr2v0) #Unvax and one prior
Ncr2v0 = sum(Spcr2v0, Sncr2v0, Ecr3v0, Acr3v0, Icr3v0, Hcr3v0, Rpcr3v0, Rncr3v0) #Unvax and two prior
Ncr0v1 = sum(Spcr0v1,Vpcr0v1, W1Vpcr0v1,W2Vpcr0v1,W3Vpcr0v1,Vncr0v1,Sncr0v1, Ecr1v1, Acr1v1, Icr1v1, Hcr1v1, Rpcr1v1, Rncr1v1) #vax 1 dose and no prior exposure
Ncr1v1 = sum(Spcr1v1, Sncr1v1, Ecr2v1, Acr2v1, Icr2v1, Hcr2v1, Rpcr2v1, Rncr2v1) #vax 1 dose and one prior
Ncr2v1 = sum(Spcr2v1, Sncr2v1, Ecr3v1, Acr3v1, Icr3v1, Hcr3v1, Rpcr3v1, Rncr3v1) #vax 1 dose and two prior
Ncr0v2 = sum(Spcr0v2, Vpcr0v2, Vncr0v2,Sncr0v2, Ecr1v2, Acr1v2, Icr1v2, Hcr1v2, Rpcr1v2, Rncr1v2) #vax 2 dose and no prior exposure
Ncr1v2 = sum(Spcr1v2, Sncr1v2, Ecr2v2, Acr2v2, Icr2v2, Hcr2v2, Rpcr2v2, Rncr2v2) #vax 2 dose and one prior
Ncr2v2 = sum(Spcr2v2, Sncr2v2, Ecr3v2, Acr3v2, Icr3v2, Hcr3v2, Rpcr3v2, Rncr3v2) #vax 2 doseand two prior
Ncr0v3 = sum(Spcr0v3, Vpcr0v3, Vncr0v3,Sncr0v3, Ecr1v3, Acr1v3, Icr1v3, Hcr1v3, Rpcr1v3, Rncr1v3) #vax 3 dose and no prior exposure
Ncr1v3 = sum(Spcr1v3, Sncr1v3, Ecr2v3, Acr2v3, Icr2v3, Hcr2v3, Rpcr2v3, Rncr2v3) #vax 3 dose and one prior
Ncr2v3 = sum(Spcr2v3, Sncr2v3, Ecr3v3, Acr3v3, Icr3v3, Hcr3v3, Rpcr3v3, Rncr3v3) #vax 3 dose and two prior
#Urban child
Ncu0v0 = sum(Scu0v0, Ecu1v0, Acu1v0, Icu1v0, Hcu1v0, Rpcu1v0,W1Rpcu1v0,W2Rpcu1v0,W3Rpcu1v0, Rncu1v0) #Unvax and no prior exposure
Ncu1v0 = sum(Spcu1v0, Sncu1v0, Ecu2v0, Acu2v0, Icu2v0, Hcu2v0, Rpcu2v0, Rncu2v0) #Unvax and one prior
Ncu2v0 = sum(Spcu2v0, Sncu2v0, Ecu3v0, Acu3v0, Icu3v0, Hcu3v0, Rpcu3v0, Rncu3v0) #Unvax and two prior
Ncu0v1 = sum(Spcu0v1,Vpcu0v1, W1Vpcu0v1,W2Vpcu0v1,W3Vpcu0v1,Vncu0v1,Sncu0v1, Ecu1v1, Acu1v1, Icu1v1, Hcu1v1, Rpcu1v1, Rncu1v1) #vax 1 dose and no prior exposure
Ncu1v1 = sum(Spcu1v1, Sncu1v1, Ecu2v1, Acu2v1, Icu2v1, Hcu2v1, Rpcu2v1, Rncu2v1) #vax 1 dose and one prior
Ncu2v1 = sum(Spcu2v1, Sncu2v1, Ecu3v1, Acu3v1, Icu3v1, Hcu3v1, Rpcu3v1, Rncu3v1) #vax 1 dose and two prior
Ncu0v2 = sum(Spcu0v2, Vpcu0v2, Vncu0v2,Sncu0v2,Ecu1v2, Acu1v2, Icu1v2, Hcu1v2, Rpcu1v2, Rncu1v2) #vax 2 dose and no prior exposure
Ncu1v2 = sum(Spcu1v2, Sncu1v2, Ecu2v2, Acu2v2, Icu2v2, Hcu2v2, Rpcu2v2, Rncu2v2) #vax 2 dose and one prior
Ncu2v2 = sum(Spcu2v2, Sncu2v2, Ecu3v2, Acu3v2, Icu3v2, Hcu3v2, Rpcu3v2, Rncu3v2) #vax 2 doseand two prior
Ncu0v3 = sum(Spcu0v3, Vpcu0v3, Vncu0v3,Sncu0v3,Ecu1v3, Acu1v3, Icu1v3, Hcu1v3, Rpcu1v3, Rncu1v3) #vax 3 dose and no prior exposure
Ncu1v3 = sum(Spcu1v3, Sncu1v3, Ecu2v3, Acu2v3, Icu2v3, Hcu2v3, Rpcu2v3, Rncu2v3) #vax 3 dose and one prior
Ncu2v3 = sum(Spcu2v3, Sncu2v3, Ecu3v3, Acu3v3, Icu3v3, Hcu3v3, Rpcu3v3, Rncu3v3) #vax 3 dose and two prior
#Rural adult
Nar0v0 = sum(Sar0v0, Ear1v0, Aar1v0, Iar1v0, Har1v0, Rpar1v0,W1Rpar1v0,W2Rpar1v0,W3Rpar1v0, Rnar1v0) #Unvax and no prior exposure
Nar1v0 = sum(Spar1v0, Snar1v0, Ear2v0, Aar2v0, Iar2v0, Har2v0, Rpar2v0, Rnar2v0) #Unvax and one prior
Nar2v0 = sum(Spar2v0, Snar2v0, Ear3v0, Aar3v0, Iar3v0, Har3v0, Rpar3v0, Rnar3v0) #Unvax and two prior
Nar0v1 = sum(Spar0v1,Vpar0v1, W1Vpar0v1,W2Vpar0v1,W3Vpar0v1,Vnar0v1, Snar0v1, Ear1v1, Aar1v1, Iar1v1, Har1v1, Rpar1v1, Rnar1v1) #vax 1 dose and no prior exposure
Nar1v1 = sum(Spar1v1, Snar1v1, Ear2v1, Aar2v1, Iar2v1, Har2v1, Rpar2v1, Rnar2v1) #vax 1 dose and one prior
Nar2v1 = sum(Spar2v1, Snar2v1, Ear3v1, Aar3v1, Iar3v1, Har3v1, Rpar3v1, Rnar3v1) #vax 1 dose and two prior
Nar0v2 = sum(Spar0v2, Vpar0v2, Vnar0v2, Snar0v2, Ear1v2, Aar1v2, Iar1v2, Har1v2, Rpar1v2, Rnar1v2) #vax 2 dose and no prior exposure
Nar1v2 = sum(Spar1v2, Snar1v2, Ear2v2, Aar2v2, Iar2v2, Har2v2, Rpar2v2, Rnar2v2) #vax 2 dose and one prior
Nar2v2 = sum(Spar2v2, Snar2v2, Ear3v2, Aar3v2, Iar3v2, Har3v2, Rpar3v2, Rnar3v2) #vax 2 doseand two prior
Nar0v3 = sum(Spar0v3, Vpar0v3, Vnar0v3,Snar0v3, Ear1v3, Aar1v3, Iar1v3, Har1v3, Rpar1v3, Rnar1v3) #vax 3 dose and no prior exposure
Nar1v3 = sum(Spar1v3, Snar1v3, Ear2v3, Aar2v3, Iar2v3, Har2v3, Rpar2v3, Rnar2v3) #vax 3 dose and one prior
Nar2v3 = sum(Spar2v3, Snar2v3, Ear3v3, Aar3v3, Iar3v3, Har3v3, Rpar3v3, Rnar3v3) #vax 3 dose and two prior
#Urban adult
Nau0v0 = sum(Sau0v0, Eau1v0, Aau1v0, Iau1v0, Hau1v0, Rpau1v0, W1Rpau1v0,W2Rpau1v0,W3Rpau1v0, Rnau1v0) #Unvax and no prior exposure
Nau1v0 = sum(Spau1v0, Snau1v0, Eau2v0, Aau2v0, Iau2v0, Hau2v0, Rpau2v0, Rnau2v0) #Unvax and one prior
Nau2v0 = sum(Spau2v0, Snau2v0, Eau3v0, Aau3v0, Iau3v0, Hau3v0, Rpau3v0, Rnau3v0) #Unvax and two prior
Nau0v1 = sum(Spau0v1,Vpau0v1, W1Vpau0v1,W2Vpau0v1,W3Vpau0v1,Vnau0v1,Snau0v1, Eau1v1, Aau1v1, Iau1v1, Hau1v1, Rpau1v1, Rnau1v1) #vax 1 dose and no prior exposure
Nau1v1 = sum(Spau1v1, Snau1v1, Eau2v1, Aau2v1, Iau2v1, Hau2v1, Rpau2v1, Rnau2v1) #vax 1 dose and one prior
Nau2v1 = sum(Spau2v1, Snau2v1, Eau3v1, Aau3v1, Iau3v1, Hau3v1, Rpau3v1, Rnau3v1) #vax 1 dose and two prior
Nau0v2 = sum(Spau0v2, Vpau0v2, Vnau0v2,Snau0v2, Eau1v2, Aau1v2, Iau1v2, Hau1v2, Rpau1v2, Rnau1v2) #vax 2 dose and no prior exposure
Nau1v2 = sum(Spau1v2, Snau1v2, Eau2v2, Aau2v2, Iau2v2, Hau2v2, Rpau2v2, Rnau2v2) #vax 2 dose and one prior
Nau2v2 = sum(Spau2v2, Snau2v2, Eau3v2, Aau3v2, Iau3v2, Hau3v2, Rpau3v2, Rnau3v2) #vax 2 doseand two prior
Nau0v3 = sum(Spau0v3, Vpau0v3, Vnau0v3,Snau0v3, Eau1v3, Aau1v3, Iau1v3, Hau1v3, Rpau1v3, Rnau1v3) #vax 3 dose and no prior exposure
Nau1v3 = sum(Spau1v3, Snau1v3, Eau2v3, Aau2v3, Iau2v3, Hau2v3, Rpau2v3, Rnau2v3) #vax 3 dose and one prior
Nau2v3 = sum(Spau2v3, Snau2v3, Eau3v3, Aau3v3, Iau3v3, Hau3v3, Rpau3v3, Rnau3v3) #vax 3 dose and two prior
#Rural elderly
Ner0v0 = sum(Ser0v0, Eer1v0, Aer1v0, Ier1v0, Her1v0, Rper1v0,W1Rper1v0,W2Rper1v0,W3Rper1v0, Rner1v0) #Unvax and no prior exposure
Ner1v0 = sum(Sper1v0, Sner1v0, Eer2v0, Aer2v0, Ier2v0, Her2v0, Rper2v0, Rner2v0) #Unvax and one prior
Ner2v0 = sum(Sper2v0, Sner2v0, Eer3v0, Aer3v0, Ier3v0, Her3v0, Rper3v0, Rner3v0) #Unvax and two prior
Ner0v1 = sum(Sper0v1,Vper0v1, W1Vper0v1,W2Vper0v1,W3Vper0v1,Vner0v1, Sner0v1, Eer1v1, Aer1v1, Ier1v1, Her1v1, Rper1v1, Rner1v1) #vax 1 dose and no prior exposure
Ner1v1 = sum(Sper1v1, Sner1v1, Eer2v1, Aer2v1, Ier2v1, Her2v1, Rper2v1, Rner2v1) #vax 1 dose and one prior
Ner2v1 = sum(Sper2v1, Sner2v1, Eer3v1, Aer3v1, Ier3v1, Her3v1, Rper3v1, Rner3v1) #vax 1 dose and two prior
Ner0v2 = sum(Sper0v2, Vper0v2, Vner0v2,Sner0v2, Eer1v2, Aer1v2, Ier1v2, Her1v2, Rper1v2, Rner1v2) #vax 2 dose and no prior exposure
Ner1v2 = sum(Sper1v2, Sner1v2, Eer2v2, Aer2v2, Ier2v2, Her2v2, Rper2v2, Rner2v2) #vax 2 dose and one prior
Ner2v2 = sum(Sper2v2, Sner2v2, Eer3v2, Aer3v2, Ier3v2, Her3v2, Rper3v2, Rner3v2) #vax 2 doseand two prior
Ner0v3 = sum(Sper0v3, Vper0v3, Vner0v3,Sner0v3, Eer1v3, Aer1v3, Ier1v3, Her1v3, Rper1v3, Rner1v3) #vax 3 dose and no prior exposure
Ner1v3 = sum(Sper1v3, Sner1v3, Eer2v3, Aer2v3, Ier2v3, Her2v3, Rper2v3, Rner2v3) #vax 3 dose and one prior
Ner2v3 = sum(Sper2v3, Sner2v3, Eer3v3, Aer3v3, Ier3v3, Her3v3, Rper3v3, Rner3v3) #vax 3 dose and two prior
#Urban elderly
Neu0v0 = sum(Seu0v0, Eeu1v0, Aeu1v0, Ieu1v0, Heu1v0, Rpeu1v0, W1Rpeu1v0,W2Rpeu1v0,W3Rpeu1v0, Rneu1v0) #Unvax and no prior exposure
Neu1v0 = sum(Speu1v0, Sneu1v0, Eeu2v0, Aeu2v0, Ieu2v0, Heu2v0, Rpeu2v0, Rneu2v0) #Unvax and one prior
Neu2v0 = sum(Speu2v0, Sneu2v0, Eeu3v0, Aeu3v0, Ieu3v0, Heu3v0, Rpeu3v0, Rneu3v0) #Unvax and two prior
Neu0v1 = sum(Speu0v1,Vpeu0v1, W1Vpeu0v1,W2Vpeu0v1,W3Vpeu0v1,Vneu0v1, Sneu0v1, Eeu1v1, Aeu1v1, Ieu1v1, Heu1v1, Rpeu1v1, Rneu1v1) #vax 1 dose and no prior exposure
Neu1v1 = sum(Speu1v1, Sneu1v1, Eeu2v1, Aeu2v1, Ieu2v1, Heu2v1, Rpeu2v1, Rneu2v1) #vax 1 dose and one prior
Neu2v1 = sum(Speu2v1, Sneu2v1, Eeu3v1, Aeu3v1, Ieu3v1, Heu3v1, Rpeu3v1, Rneu3v1) #vax 1 dose and two prior
Neu0v2 = sum(Speu0v2, Vpeu0v2, Vneu0v2,Sneu0v2, Eeu1v2, Aeu1v2, Ieu1v2, Heu1v2, Rpeu1v2, Rneu1v2) #vax 2 dose and no prior exposure
Neu1v2 = sum(Speu1v2, Sneu1v2, Eeu2v2, Aeu2v2, Ieu2v2, Heu2v2, Rpeu2v2, Rneu2v2) #vax 2 dose and one prior
Neu2v2 = sum(Speu2v2, Sneu2v2, Eeu3v2, Aeu3v2, Ieu3v2, Heu3v2, Rpeu3v2, Rneu3v2) #vax 2 doseand two prior
Neu0v3 = sum(Speu0v3, Vpeu0v3, Vneu0v3, Sneu0v3, Eeu1v3, Aeu1v3, Ieu1v3, Heu1v3, Rpeu1v3, Rneu1v3) #vax 3 dose and no prior exposure
Neu1v3 = sum(Speu1v3, Sneu1v3, Eeu2v3, Aeu2v3, Ieu2v3, Heu2v3, Rpeu2v3, Rneu2v3) #vax 3 dose and one prior
Neu2v3 = sum(Speu2v3, Sneu2v3, Eeu3v3, Aeu3v3, Ieu3v3, Heu3v3, Rpeu3v3, Rneu3v3) #vax 3 dose and two prior
##Population sums
Nchildr = sum(Ncr0v0,Ncr1v0,Ncr2v0,Ncr0v1,Ncr1v1,Ncr2v1,Ncr0v2,Ncr1v2,Ncr2v2,Ncr0v3,Ncr1v3,Ncr2v3)
Nadultr = sum(Nar0v0,Nar1v0,Nar2v0,Nar0v1,Nar1v1,Nar2v1,Nar0v2,Nar1v2,Nar2v2,Nar0v3,Nar1v3,Nar2v3)
Noldr = sum(Ner0v0,Ner1v0,Ner2v0,Ner0v1,Ner1v1,Ner2v1,Ner0v2,Ner1v2,Ner2v2,Ner0v3,Ner1v3,Ner2v3)
Nchildu = sum(Ncu0v0,Ncu1v0,Ncu2v0,Ncu0v1,Ncu1v1,Ncu2v1,Ncu0v2,Ncu1v2,Ncu2v2,Ncu0v3,Ncu1v3,Ncu2v3)
Nadultu = sum(Nau0v0,Nau1v0,Nau2v0,Nau0v1,Nau1v1,Nau2v1,Nau0v2,Nau1v2,Nau2v2,Nau0v3,Nau1v3,Nau2v3)
Noldu = sum(Neu0v0,Neu1v0,Neu2v0,Neu0v1,Neu1v1,Neu2v1,Neu0v2,Neu1v2,Neu2v2,Neu0v3,Neu1v3,Neu2v3)
## Vax proportions in each of the 6 population stratas
## Assumptions until we can get true vax over time by age group
p_d1_cr = (Ncr0v1+Ncr1v1+Ncr2v1+Ncr0v2+Ncr1v2+Ncr2v2+Ncr0v3+Ncr1v3+Ncr2v3)/Nchildr # Proportion of rural children receiving at least one dose of vaccine
p_d1_cu = (Ncu0v1+Ncu1v1+Ncu2v1+Ncu0v2+Ncu1v2+Ncu2v2+Ncu0v3+Ncu1v3+Ncu2v3)/Nchildu # Prop urban children receiving at least one dose
p_d1_ar = (Nar0v1+Nar1v1+Nar2v1+Nar0v2+Nar1v2+Nar2v2+Nar0v3+Nar1v3+Nar2v3)/Nadultr
p_d1_au = (Nau0v1+Nau1v1+Nau2v1+Nau0v2+Nau1v2+Nau2v2+Nau0v3+Nau1v3+Nau2v3)/Nadultu
p_d1_er = (Ner0v1+Ner1v1+Ner2v1+Ner0v2+Ner1v2+Ner2v2+Ner0v3+Ner1v3+Ner2v3)/Noldr
p_d1_eu = (Neu0v1+Neu1v1+Neu2v1+Neu0v2+Neu1v2+Neu2v2+Neu0v3+Neu1v3+Neu2v3)/Noldu
p_d2_cr = (Ncr0v2+Ncr1v2+Ncr2v2+Ncr0v3+Ncr1v3+Ncr2v3)/Nchildr # Proportion of rural children receiving at least two dose of vaccine
p_d2_cu = (Ncu0v2+Ncu1v2+Ncu2v2+Ncu0v3+Ncu1v3+Ncu2v3)/Nchildu # Prop urban children receiving at least two dose
p_d2_ar = (Nar0v2+Nar1v2+Nar2v2+Nar0v3+Nar1v3+Nar2v3)/Nadultr
p_d2_au = (Nau0v2+Nau1v2+Nau2v2+Nau0v3+Nau1v3+Nau2v3)/Nadultu
p_d2_er = (Ner0v2+Ner1v2+Ner2v2+Ner0v3+Ner1v3+Ner2v3)/Noldr
p_d2_eu = (Neu0v2+Neu1v2+Neu2v2+Neu0v3+Neu1v3+Neu2v3)/Noldu
p_d1_c = (Ncr0v1+Ncr1v1+Ncr2v1+Ncr0v2+Ncr1v2+Ncr2v2+Ncr0v3+Ncr1v3+Ncr2v3+Ncu0v1+Ncu1v1+Ncu2v1+Ncu0v2+Ncu1v2+Ncu2v2+Ncu0v3+Ncu1v3+Ncu2v3)/(Nchildr+Nchildu)
p_d1_a = (Nar0v1+Nar1v1+Nar2v1+Nar0v2+Nar1v2+Nar2v2+Nar0v3+Nar1v3+Nar2v3+Nau0v1+Nau1v1+Nau2v1+Nau0v2+Nau1v2+Nau2v2+Nau0v3+Nau1v3+Nau2v3)/(Nadultr+Nadultu)
p_d1_e = (Ner0v1+Ner1v1+Ner2v1+Ner0v2+Ner1v2+Ner2v2+Ner0v3+Ner1v3+Ner2v3+Neu0v1+Neu1v1+Neu2v1+Neu0v2+Neu1v2+Neu2v2+Neu0v3+Neu1v3+Neu2v3)/(Noldr + Noldu)
p_d2_c = (Ncr0v2+Ncr1v2+Ncr2v2+Ncr0v3+Ncr1v3+Ncr2v3+Ncu0v2+Ncu1v2+Ncu2v2+Ncu0v3+Ncu1v3+Ncu2v3)/(Nchildr+Nchildu)
p_d2_a = (Nar0v2+Nar1v2+Nar2v2+Nar0v3+Nar1v3+Nar2v3+Nau0v2+Nau1v2+Nau2v2+Nau0v3+Nau1v3+Nau2v3)/(Nadultr+Nadultu)
p_d2_e = (Ner0v2+Ner1v2+Ner2v2+Ner0v3+Ner1v3+Ner2v3+Neu0v2+Neu1v2+Neu2v2+Neu0v3+Neu1v3+Neu2v3)/(Noldr+Noldu)
##Seroprev in each of the 6 population stratas
#sero_cr <<-
#sero_cu
#sero_ar
#sero_au
#sero_er
#sero_eu
if(t<306){ ##2021-3-9
delta1_cr<-0; delta1_cu<-0; delta1_ar<-0; delta1_au<-0; delta1_er <- 0; delta1_eu <-0
delta2_cr<-0; delta2_cu<-0; delta2_ar<-0; delta2_au<-0; delta2_er <- 0; delta2_eu <-0
} else if (t<322){ ##2021-3-9 to 2021-3-25
delta1_cr<-0; delta1_cu<-0; delta1_ar<-0.0003; delta1_au<-0.0004; delta1_er <- 0.0004; delta1_eu <-0.0004
delta2_cr<-0; delta2_cu<-0; delta2_ar<-0; delta2_au<-0; delta2_er <- 0; delta2_eu <-0
} else if (t<542){ ##2021-3-25 to 2021-10-31
delta1_cr<-0; delta1_cu<-0; delta1_ar<-0.0003; delta1_au<-0.0008; delta1_er <- 0.0006; delta1_eu <-0.0008
delta2_cr<-0; delta2_cu<-0; delta2_ar<-0.001; delta2_au<-0.001; delta2_er <- 0.001; delta2_eu <-0.01
} else if (t<694){ ##2021-10-31 to 2022-4-1
delta1_cr<-0; delta1_cu<-0; delta1_ar<-0.013; delta1_au<-0.011; delta1_er <- 0.012; delta1_eu <-0.011
delta2_cr<-0; delta2_cu<-0; delta2_ar<-0.022; delta2_au<-0.022; delta2_er <- 0.022; delta2_eu <-0.022
} else if (t<=847){ ## 2022-4-1 to 2022-9-1
delta1_cr<-0; delta1_cu<-0; delta1_ar<-0.007; delta1_au<-0.007; delta1_er <- 0.007; delta1_eu <-0.007
delta2_cr<-0; delta2_cu<-0; delta2_ar<-0.012; delta2_au<-0.012; delta2_er <- 0.012; delta2_eu <-0.012
} else {
delta1_cr<-0; delta1_cu<-0; delta1_ar<-0; delta1_au<-0; delta1_er <- 0; delta1_eu <-0
delta2_cr<-0; delta2_cu<-0; delta2_ar<-0; delta2_au<-0; delta2_er <- 0; delta2_eu <-0
}
#if(t<306){ ##2021-3-9
# delta1_cr<-0; delta1_cu<-0; delta1_ar<-0; delta1_au<-0; delta1_er <- 0; delta1_eu <-0
# delta2_cr<-0; delta2_cu<-0; delta2_ar<-0; delta2_au<-0; delta2_er <- 0; delta2_eu <-0
#} else if (t<322){ ##2021-3-9 to 2021-3-25
# delta1_cr<-0; delta1_cu<-0; delta1_ar<-0.000074; delta1_au<-0.000279; delta1_er <- 0.0003; delta1_eu <-0.0003
# delta2_cr<-0; delta2_cu<-0; delta2_ar<-0; delta2_au<-0; delta2_er <- 0; delta2_eu <-0
#} else if (t<372){ ##2021-3-25 to 2021-5-14
# delta1_cr<-0; delta1_cu<-0; delta1_ar<-0.0000694; delta1_au<-0.0008; delta1_er <- 0.0002; delta1_eu <-0.0002
# delta2_cr<-0; delta2_cu<-0; delta2_ar<-0.00768; delta2_au<-0.009747; delta2_er <- 0.00767; delta2_eu <-0.007677
#} else if (t<477){ ##2021-5-14 to 2021-8-27
# delta1_cr<-0; delta1_cu<-0; delta1_ar<-0.000171; delta1_au<-0.005; delta1_er <- 0.002; delta1_eu <-0.006
# delta2_cr<-0; delta2_cu<-0; delta2_ar<-0.0062202; delta2_au<-0.012202; delta2_er <- 0.0122; delta2_eu <-0.012202
#} else if (t<540){ ##2021-8-27 to 2021-10-29
# delta1_cr<-0; delta1_cu<-0; delta1_ar<-0.00053; delta1_au<-0.00082; delta1_er <- 0.002; delta1_eu <-0.001
# delta2_cr<-0; delta2_cu<-0; delta2_ar<-0.01; delta2_au<-0.012; delta2_er <- 0.015; delta2_eu <-0.016
#} else if (t<639){ ##2021-10-29 to 2022-2-5
# delta1_cr<-0; delta1_cu<-0; delta1_ar<-0.02; delta1_au<-0.025; delta1_er <- 0.016; delta1_eu <-0.016
# delta2_cr<-0; delta2_cu<-0; delta2_ar<-0.018; delta2_au<-0.01; delta2_er <- 0.02; delta2_eu <-0.016
#} else if (t<=833){
# delta1_cr<-0; delta1_cu<-0; delta1_ar<-0.01; delta1_au<-0.0001; delta1_er <- 0.01; delta1_eu <-0.01
# delta2_cr<-0; delta2_cu<-0; delta2_ar<-0.016; delta2_au<-0.02; delta2_er <- 0.015; delta2_eu <-0.01
#} else {
# delta1_cr<-0; delta1_cu<-0; delta1_ar<-0; delta1_au<-0; delta1_er <- 0; delta1_eu <-0
# delta2_cr<-0; delta2_cu<-0; delta2_ar<-0; delta2_au<-0; delta2_er <- 0; delta2_eu <-0
#}
#delta1_cr<-0; delta1_cu<-0; delta1_ar<-0; delta1_au<-0; delta1_er <- 0; delta1_eu <-0
#delta2_cr<-0; delta2_cu<-0; delta2_ar<-0; delta2_au<-0; delta2_er <- 0; delta2_eu <-0
delta3_cr<-0; delta3_cu<-0; delta3_ar<-0; delta3_au<-0; delta3_er <- 0; delta3_eu <-0
delta4_cr<-0; delta4_cu<-0; delta4_ar<-0; delta4_au<-0; delta4_er <- 0; delta4_eu <-0
##Social distancing stuff
if (t>=0 & t<=100){ ## R0 115=2020-8-30
sd<-1
} else if(t>100 & t<=232){ ## 115=2020-8-30; 239=2021-1-1
#sd <- 0.5
sd <- 0.95/r0
} else if(t>232 & t<=262){ ## 239=2021-1-1; 267=2021-1-29
sd <- 2.5/r0
} else if (t>262& t<=288){ ## 257=2021-1-29; 288=2021-2-19
sd <- 1.4/r0
} else if (t>288& t<=396){ ##288=2021-2-19; 405=2021-6-6
sd<-0.9/r0
} else if (t>396& t<=430){ ##405=2021-6-6; 430=2021-7-11
sd <- rel_delta
}else if(t>430& t<=454){ #430=2021-7-11; 454=2021-8-4
sd <- 2.5/r0
} else if(t>454 &t<=565){ #454=2021-8-4; 565=2021-11-23
sd <-1.16/r0
} else if(t>565 & t<=611){ #565=2021-11-23; #611
sd<-rel_omi
#sd <-3.8
} else if(t>611 & t<= 620){
sd<- rel_omi/1.7
} else if(t>620 & t<=710){
sd <- 1.5/r0
} else if(t>710 & t<=814){
sd <- r0_hyp/r0 ##Ratio of hypothetical r0 to r0 to be inputted as a scaling factor into the model
} else {
if (((t-814)/365)%%1>(270/365)){
sd <- (r0_hyp*1.2)/r0
} else {
sd <- 1.8/r0
}
#sd <- rel_newvar ##keep on for now and see what happens
}
### imunne escape factor for those with either prior exposur or prior vaccination
if(t>=0 & t<=405){
imm_esc_factor <- 1
} else if (t>405 & t<=565){
imm_esc_factor <- imm_esc_factor_t1
} else if (t>565 & t<= 922){
imm_esc_factor <- imm_esc_factor_omi ##omicron
} else {
imm_esc_factor <- imm_esc_factor_omi
}
#StartODES
# Force of infection
# Foi_cr: Interpreted as FOI exerted on child rural susceptibles
foi_cr_0v0 = beta_c * ((CM[1,1]*(Icr1v0 +Icr2v0 +Icr3v0 +Icr1v1 +Icr2v1 +Icr3v1 + Icr1v2 +Icr2v2 +Icr3v2 +Icr1v3 +Icr2v3 +Icr3v3 + alpha*(Acr1v0 +Acr2v0 +Acr3v0 +Acr1v1 +Acr2v1 +Acr3v1 + Acr1v2 +Acr2v2 +Acr3v2 +Acr1v3 +Acr2v3 +Acr3v3))/Nchildr) + # first part is rural infectious -> rural suscepible
(CM[2,1]*(Iar1v0 +Iar2v0 +Iar3v0 +Iar1v1 +Iar2v1 +Iar3v1 + Iar1v2 +Iar2v2 +Iar3v2 +Iar1v3 +Iar2v3 +Iar3v3 + alpha*(Aar1v0 +Aar2v0 +Aar3v0 +Aar1v1 +Aar2v1 +Aar3v1 + Aar1v2 +Aar2v2 +Aar3v2 +Aar1v3 +Aar2v3 +Aar3v3))/Nadultr) +
(CM[3,1]*(Ier1v0 +Ier2v0 +Ier3v0 +Ier1v1 +Ier2v1 +Ier3v1 + Ier1v2 +Ier2v2 +Ier3v2 +Ier1v3 +Ier2v3 +Ier3v3 + alpha*(Aer1v0 +Aer2v0 +Aer3v0 +Aer1v1 +Aer2v1 +Aer3v1 + Aer1v2 +Aer2v2 +Aer3v2 +Aer1v3 +Aer2v3 +Aer3v3))/Noldr) +
#second part is urban infectious -> rural susceptible
(CM[4,1]*(Icu1v0 +Icu2v0 +Icu3v0 +Icu1v1 +Icu2v1 +Icu3v1 + Icu1v2 +Icu2v2 +Icu3v2 +Icu1v3 +Icu2v3 +Icu3v3 + alpha*(Acu1v0 +Acu2v0 +Acu3v0 +Acu1v1 +Acu2v1 +Acu3v1 + Acu1v2 +Acu2v2 +Acu3v2 +Acu1v3 +Acu2v3 +Acu3v3))/Nchildu) +
(CM[5,1]*(Iau1v0 +Iau2v0 +Iau3v0 +Iau1v1 +Iau2v1 +Iau3v1 + Iau1v2 +Iau2v2 +Iau3v2 +Iau1v3 +Iau2v3 +Iau3v3 + alpha*(Aau1v0 +Aau2v0 +Aau3v0 +Aau1v1 +Aau2v1 +Aau3v1 + Aau1v2 +Aau2v2 +Aau3v2 +Aau1v3 +Aau2v3 +Aau3v3))/Nadultu) +
(CM[6,1]*(Ieu1v0 +Ieu2v0 +Ieu3v0 +Ieu1v1 +Ieu2v1 +Ieu3v1 + Ieu1v2 +Ieu2v2 +Ieu3v2 +Ieu1v3 +Ieu2v3 +Ieu3v3 + alpha*(Aeu1v0 +Aeu2v0 +Aeu3v0 +Aeu1v1 +Aeu2v1 +Aeu3v1 + Aeu1v2 +Aeu2v2 +Aeu3v2 +Aeu1v3 +Aeu2v3 +Aeu3v3))/Noldu))
foi_ar_0v0 = beta_a * ((CM[1,2]*(Icr1v0 +Icr2v0 +Icr3v0 +Icr1v1 +Icr2v1 +Icr3v1 + Icr1v2 +Icr2v2 +Icr3v2 +Icr1v3 +Icr2v3 +Icr3v3 + alpha*(Acr1v0 +Acr2v0 +Acr3v0 +Acr1v1 +Acr2v1 +Acr3v1 + Acr1v2 +Acr2v2 +Acr3v2 +Acr1v3 +Acr2v3 +Acr3v3))/Nchildr) + # first part is rural infectious -> rural suscepible
(CM[2,2]*(Iar1v0 +Iar2v0 +Iar3v0 +Iar1v1 +Iar2v1 +Iar3v1 + Iar1v2 +Iar2v2 +Iar3v2 +Iar1v3 +Iar2v3 +Iar3v3 + alpha*(Aar1v0 +Aar2v0 +Aar3v0 +Aar1v1 +Aar2v1 +Aar3v1 + Aar1v2 +Aar2v2 +Aar3v2 +Aar1v3 +Aar2v3 +Aar3v3))/Nadultr) +
(CM[3,2]*(Ier1v0 +Ier2v0 +Ier3v0 +Ier1v1 +Ier2v1 +Ier3v1 + Ier1v2 +Ier2v2 +Ier3v2 +Ier1v3 +Ier2v3 +Ier3v3 + alpha*(Aer1v0 +Aer2v0 +Aer3v0 +Aer1v1 +Aer2v1 +Aer3v1 + Aer1v2 +Aer2v2 +Aer3v2 +Aer1v3 +Aer2v3 +Aer3v3))/Noldr) +
#second part is urban infectious -> rural susceptible
(CM[4,2]*(Icu1v0 +Icu2v0 +Icu3v0 +Icu1v1 +Icu2v1 +Icu3v1 + Icu1v2 +Icu2v2 +Icu3v2 +Icu1v3 +Icu2v3 +Icu3v3 + alpha*(Acu1v0 +Acu2v0 +Acu3v0 +Acu1v1 +Acu2v1 +Acu3v1 + Acu1v2 +Acu2v2 +Acu3v2 +Acu1v3 +Acu2v3 +Acu3v3))/Nchildu) +
(CM[5,2]*(Iau1v0 +Iau2v0 +Iau3v0 +Iau1v1 +Iau2v1 +Iau3v1 + Iau1v2 +Iau2v2 +Iau3v2 +Iau1v3 +Iau2v3 +Iau3v3 + alpha*(Aau1v0 +Aau2v0 +Aau3v0 +Aau1v1 +Aau2v1 +Aau3v1 + Aau1v2 +Aau2v2 +Aau3v2 +Aau1v3 +Aau2v3 +Aau3v3))/Nadultu) +
(CM[6,2]*(Ieu1v0 +Ieu2v0 +Ieu3v0 +Ieu1v1 +Ieu2v1 +Ieu3v1 + Ieu1v2 +Ieu2v2 +Ieu3v2 +Ieu1v3 +Ieu2v3 +Ieu3v3 + alpha*(Aeu1v0 +Aeu2v0 +Aeu3v0 +Aeu1v1 +Aeu2v1 +Aeu3v1 + Aeu1v2 +Aeu2v2 +Aeu3v2 +Aeu1v3 +Aeu2v3 +Aeu3v3))/Noldu))
foi_er_0v0 = beta_e * ((CM[1,3]*(Icr1v0 +Icr2v0 +Icr3v0 +Icr1v1 +Icr2v1 +Icr3v1 + Icr1v2 +Icr2v2 +Icr3v2 +Icr1v3 +Icr2v3 +Icr3v3 + alpha*(Acr1v0 +Acr2v0 +Acr3v0 +Acr1v1 +Acr2v1 +Acr3v1 + Acr1v2 +Acr2v2 +Acr3v2 +Acr1v3 +Acr2v3 +Acr3v3))/Nchildr) + # first part is rural infectious -> rural suscepible
(CM[2,3]*(Iar1v0 +Iar2v0 +Iar3v0 +Iar1v1 +Iar2v1 +Iar3v1 + Iar1v2 +Iar2v2 +Iar3v2 +Iar1v3 +Iar2v3 +Iar3v3 + alpha*(Aar1v0 +Aar2v0 +Aar3v0 +Aar1v1 +Aar2v1 +Aar3v1 + Aar1v2 +Aar2v2 +Aar3v2 +Aar1v3 +Aar2v3 +Aar3v3))/Nadultr) +
(CM[3,3]*(Ier1v0 +Ier2v0 +Ier3v0 +Ier1v1 +Ier2v1 +Ier3v1 + Ier1v2 +Ier2v2 +Ier3v2 +Ier1v3 +Ier2v3 +Ier3v3 + alpha*(Aer1v0 +Aer2v0 +Aer3v0 +Aer1v1 +Aer2v1 +Aer3v1 + Aer1v2 +Aer2v2 +Aer3v2 +Aer1v3 +Aer2v3 +Aer3v3))/Noldr) +
#second part is urban infectious -> rural susceptible
(CM[4,3]*(Icu1v0 +Icu2v0 +Icu3v0 +Icu1v1 +Icu2v1 +Icu3v1 + Icu1v2 +Icu2v2 +Icu3v2 +Icu1v3 +Icu2v3 +Icu3v3 + alpha*(Acu1v0 +Acu2v0 +Acu3v0 +Acu1v1 +Acu2v1 +Acu3v1 + Acu1v2 +Acu2v2 +Acu3v2 +Acu1v3 +Acu2v3 +Acu3v3))/Nchildu) +
(CM[5,3]*(Iau1v0 +Iau2v0 +Iau3v0 +Iau1v1 +Iau2v1 +Iau3v1 + Iau1v2 +Iau2v2 +Iau3v2 +Iau1v3 +Iau2v3 +Iau3v3 + alpha*(Aau1v0 +Aau2v0 +Aau3v0 +Aau1v1 +Aau2v1 +Aau3v1 + Aau1v2 +Aau2v2 +Aau3v2 +Aau1v3 +Aau2v3 +Aau3v3))/Nadultu) +
(CM[6,3]*(Ieu1v0 +Ieu2v0 +Ieu3v0 +Ieu1v1 +Ieu2v1 +Ieu3v1 + Ieu1v2 +Ieu2v2 +Ieu3v2 +Ieu1v3 +Ieu2v3 +Ieu3v3 + alpha*(Aeu1v0 +Aeu2v0 +Aeu3v0 +Aeu1v1 +Aeu2v1 +Aeu3v1 + Aeu1v2 +Aeu2v2 +Aeu3v2 +Aeu1v3 +Aeu2v3 +Aeu3v3))/Noldu))
foi_cu_0v0 = beta_c * ((CM[1,4]*(Icr1v0 +Icr2v0 +Icr3v0 +Icr1v1 +Icr2v1 +Icr3v1 + Icr1v2 +Icr2v2 +Icr3v2 +Icr1v3 +Icr2v3 +Icr3v3 + alpha*(Acr1v0 +Acr2v0 +Acr3v0 +Acr1v1 +Acr2v1 +Acr3v1 + Acr1v2 +Acr2v2 +Acr3v2 +Acr1v3 +Acr2v3 +Acr3v3))/Nchildr) + # first part is rural infectious -> rural suscepible
(CM[2,4]*(Iar1v0 +Iar2v0 +Iar3v0 +Iar1v1 +Iar2v1 +Iar3v1 + Iar1v2 +Iar2v2 +Iar3v2 +Iar1v3 +Iar2v3 +Iar3v3 + alpha*(Aar1v0 +Aar2v0 +Aar3v0 +Aar1v1 +Aar2v1 +Aar3v1 + Aar1v2 +Aar2v2 +Aar3v2 +Aar1v3 +Aar2v3 +Aar3v3))/Nadultr) +
(CM[3,4]*(Ier1v0 +Ier2v0 +Ier3v0 +Ier1v1 +Ier2v1 +Ier3v1 + Ier1v2 +Ier2v2 +Ier3v2 +Ier1v3 +Ier2v3 +Ier3v3 + alpha*(Aer1v0 +Aer2v0 +Aer3v0 +Aer1v1 +Aer2v1 +Aer3v1 + Aer1v2 +Aer2v2 +Aer3v2 +Aer1v3 +Aer2v3 +Aer3v3))/Noldr) +
#second part is urban infectious -> urban susceptible
(CM[4,4]*(Icu1v0 +Icu2v0 +Icu3v0 +Icu1v1 +Icu2v1 +Icu3v1 + Icu1v2 +Icu2v2 +Icu3v2 +Icu1v3 +Icu2v3 +Icu3v3 + alpha*(Acu1v0 +Acu2v0 +Acu3v0 +Acu1v1 +Acu2v1 +Acu3v1 + Acu1v2 +Acu2v2 +Acu3v2 +Acu1v3 +Acu2v3 +Acu3v3))/Nchildu) +
(CM[5,4]*(Iau1v0 +Iau2v0 +Iau3v0 +Iau1v1 +Iau2v1 +Iau3v1 + Iau1v2 +Iau2v2 +Iau3v2 +Iau1v3 +Iau2v3 +Iau3v3 + alpha*(Aau1v0 +Aau2v0 +Aau3v0 +Aau1v1 +Aau2v1 +Aau3v1 + Aau1v2 +Aau2v2 +Aau3v2 +Aau1v3 +Aau2v3 +Aau3v3))/Nadultu) +
(CM[6,4]*(Ieu1v0 +Ieu2v0 +Ieu3v0 +Ieu1v1 +Ieu2v1 +Ieu3v1 + Ieu1v2 +Ieu2v2 +Ieu3v2 +Ieu1v3 +Ieu2v3 +Ieu3v3 + alpha*(Aeu1v0 +Aeu2v0 +Aeu3v0 +Aeu1v1 +Aeu2v1 +Aeu3v1 + Aeu1v2 +Aeu2v2 +Aeu3v2 +Aeu1v3 +Aeu2v3 +Aeu3v3))/Noldu))
foi_au_0v0 = beta_a * ((CM[1,5]*(Icr1v0 +Icr2v0 +Icr3v0 +Icr1v1 +Icr2v1 +Icr3v1 + Icr1v2 +Icr2v2 +Icr3v2 +Icr1v3 +Icr2v3 +Icr3v3 + alpha*(Acr1v0 +Acr2v0 +Acr3v0 +Acr1v1 +Acr2v1 +Acr3v1 + Acr1v2 +Acr2v2 +Acr3v2 +Acr1v3 +Acr2v3 +Acr3v3))/Nchildr) + # first part is rural infectious -> rural suscepible
(CM[2,5]*(Iar1v0 +Iar2v0 +Iar3v0 +Iar1v1 +Iar2v1 +Iar3v1 + Iar1v2 +Iar2v2 +Iar3v2 +Iar1v3 +Iar2v3 +Iar3v3 + alpha*(Aar1v0 +Aar2v0 +Aar3v0 +Aar1v1 +Aar2v1 +Aar3v1 + Aar1v2 +Aar2v2 +Aar3v2 +Aar1v3 +Aar2v3 +Aar3v3))/Nadultr) +
(CM[3,5]*(Ier1v0 +Ier2v0 +Ier3v0 +Ier1v1 +Ier2v1 +Ier3v1 + Ier1v2 +Ier2v2 +Ier3v2 +Ier1v3 +Ier2v3 +Ier3v3 + alpha*(Aer1v0 +Aer2v0 +Aer3v0 +Aer1v1 +Aer2v1 +Aer3v1 + Aer1v2 +Aer2v2 +Aer3v2 +Aer1v3 +Aer2v3 +Aer3v3))/Noldr) +
#second part is urban infectious -> urban susceptible
(CM[4,5]*(Icu1v0 +Icu2v0 +Icu3v0 +Icu1v1 +Icu2v1 +Icu3v1 + Icu1v2 +Icu2v2 +Icu3v2 +Icu1v3 +Icu2v3 +Icu3v3 + alpha*(Acu1v0 +Acu2v0 +Acu3v0 +Acu1v1 +Acu2v1 +Acu3v1 + Acu1v2 +Acu2v2 +Acu3v2 +Acu1v3 +Acu2v3 +Acu3v3))/Nchildu) +
(CM[5,5]*(Iau1v0 +Iau2v0 +Iau3v0 +Iau1v1 +Iau2v1 +Iau3v1 + Iau1v2 +Iau2v2 +Iau3v2 +Iau1v3 +Iau2v3 +Iau3v3 + alpha*(Aau1v0 +Aau2v0 +Aau3v0 +Aau1v1 +Aau2v1 +Aau3v1 + Aau1v2 +Aau2v2 +Aau3v2 +Aau1v3 +Aau2v3 +Aau3v3))/Nadultu) +
(CM[6,5]*(Ieu1v0 +Ieu2v0 +Ieu3v0 +Ieu1v1 +Ieu2v1 +Ieu3v1 + Ieu1v2 +Ieu2v2 +Ieu3v2 +Ieu1v3 +Ieu2v3 +Ieu3v3 + alpha*(Aeu1v0 +Aeu2v0 +Aeu3v0 +Aeu1v1 +Aeu2v1 +Aeu3v1 + Aeu1v2 +Aeu2v2 +Aeu3v2 +Aeu1v3 +Aeu2v3 +Aeu3v3))/Noldu))
foi_eu_0v0 = beta_e * ((CM[1,6]*(Icr1v0 +Icr2v0 +Icr3v0 +Icr1v1 +Icr2v1 +Icr3v1 + Icr1v2 +Icr2v2 +Icr3v2 +Icr1v3 +Icr2v3 +Icr3v3 + alpha*(Acr1v0 +Acr2v0 +Acr3v0 +Acr1v1 +Acr2v1 +Acr3v1 + Acr1v2 +Acr2v2 +Acr3v2 +Acr1v3 +Acr2v3 +Acr3v3))/Nchildr) + # first part is rural infectious -> rural suscepible
(CM[2,6]*(Iar1v0 +Iar2v0 +Iar3v0 +Iar1v1 +Iar2v1 +Iar3v1 + Iar1v2 +Iar2v2 +Iar3v2 +Iar1v3 +Iar2v3 +Iar3v3 + alpha*(Aar1v0 +Aar2v0 +Aar3v0 +Aar1v1 +Aar2v1 +Aar3v1 + Aar1v2 +Aar2v2 +Aar3v2 +Aar1v3 +Aar2v3 +Aar3v3))/Nadultr) +
(CM[3,6]*(Ier1v0 +Ier2v0 +Ier3v0 +Ier1v1 +Ier2v1 +Ier3v1 + Ier1v2 +Ier2v2 +Ier3v2 +Ier1v3 +Ier2v3 +Ier3v3 + alpha*(Aer1v0 +Aer2v0 +Aer3v0 +Aer1v1 +Aer2v1 +Aer3v1 + Aer1v2 +Aer2v2 +Aer3v2 +Aer1v3 +Aer2v3 +Aer3v3))/Noldr) +
#second part is urban infectious -> urban susceptible
(CM[4,6]*(Icu1v0 +Icu2v0 +Icu3v0 +Icu1v1 +Icu2v1 +Icu3v1 + Icu1v2 +Icu2v2 +Icu3v2 +Icu1v3 +Icu2v3 +Icu3v3 + alpha*(Acu1v0 +Acu2v0 +Acu3v0 +Acu1v1 +Acu2v1 +Acu3v1 + Acu1v2 +Acu2v2 +Acu3v2 +Acu1v3 +Acu2v3 +Acu3v3))/Nchildu) +
(CM[5,6]*(Iau1v0 +Iau2v0 +Iau3v0 +Iau1v1 +Iau2v1 +Iau3v1 + Iau1v2 +Iau2v2 +Iau3v2 +Iau1v3 +Iau2v3 +Iau3v3 + alpha*(Aau1v0 +Aau2v0 +Aau3v0 +Aau1v1 +Aau2v1 +Aau3v1 + Aau1v2 +Aau2v2 +Aau3v2 +Aau1v3 +Aau2v3 +Aau3v3))/Nadultu) +
(CM[6,6]*(Ieu1v0 +Ieu2v0 +Ieu3v0 +Ieu1v1 +Ieu2v1 +Ieu3v1 + Ieu1v2 +Ieu2v2 +Ieu3v2 +Ieu1v3 +Ieu2v3 +Ieu3v3 + alpha*(Aeu1v0 +Aeu2v0 +Aeu3v0 +Aeu1v1 +Aeu2v1 +Aeu3v1 + Aeu1v2 +Aeu2v2 +Aeu3v2 +Aeu1v3 +Aeu2v3 +Aeu3v3))/Noldu))
foi_cr_0v1 = foi_cr_0v0 * (1-vei1) *imm_esc_factor
foi_cu_0v1 = foi_cu_0v0 * (1-vei1) *imm_esc_factor
foi_ar_0v1 = foi_ar_0v0 * (1-vei1) *imm_esc_factor
foi_au_0v1 = foi_au_0v0 * (1-vei1) *imm_esc_factor
foi_er_0v1 = foi_er_0v0 * (1-vei1) *imm_esc_factor
foi_eu_0v1 = foi_eu_0v0 * (1-vei1) *imm_esc_factor
foi_cr_0v2 = foi_cr_0v0 * (1-vei2) *imm_esc_factor
foi_cu_0v2 = foi_cu_0v0 * (1-vei2) *imm_esc_factor
foi_ar_0v2 = foi_ar_0v0 * (1-vei2) *imm_esc_factor
foi_au_0v2 = foi_au_0v0 * (1-vei2) *imm_esc_factor
foi_er_0v2 = foi_er_0v0 * (1-vei2) *imm_esc_factor
foi_eu_0v2 = foi_eu_0v0 * (1-vei2) *imm_esc_factor
foi_cr_0v3 = foi_cr_0v0 * (1-vei3) *imm_esc_factor
foi_cu_0v3 = foi_cu_0v0 * (1-vei3) *imm_esc_factor
foi_ar_0v3 = foi_ar_0v0 * (1-vei3) *imm_esc_factor
foi_au_0v3 = foi_au_0v0 * (1-vei3) *imm_esc_factor
foi_er_0v3 = foi_er_0v0 * (1-vei3) *imm_esc_factor
foi_eu_0v3 = foi_eu_0v0 * (1-vei3) *imm_esc_factor
### After first exposure
foi_cr_1v0 = foi_cr_0v0 * red_inf_1 *imm_esc_factor
foi_cu_1v0 = foi_cu_0v0 * red_inf_1 *imm_esc_factor
foi_ar_1v0 = foi_ar_0v0 * red_inf_1 *imm_esc_factor
foi_au_1v0 = foi_au_0v0 * red_inf_1 *imm_esc_factor
foi_er_1v0 = foi_er_0v0 * red_inf_1 *imm_esc_factor
foi_eu_1v0 = foi_eu_0v0 * red_inf_1 *imm_esc_factor
foi_cr_1v1 = foi_cr_0v1 * red_inf_1 *imm_esc_factor
foi_cu_1v1 = foi_cu_0v1 * red_inf_1 *imm_esc_factor
foi_ar_1v1 = foi_ar_0v1 * red_inf_1 *imm_esc_factor
foi_au_1v1 = foi_au_0v1 * red_inf_1 *imm_esc_factor
foi_er_1v1 = foi_er_0v1 * red_inf_1 *imm_esc_factor
foi_eu_1v1 = foi_eu_0v1 * red_inf_1 *imm_esc_factor
foi_cr_1v2 = foi_cr_0v2 * red_inf_1 *imm_esc_factor
foi_cu_1v2 = foi_cu_0v2 * red_inf_1 *imm_esc_factor
foi_ar_1v2 = foi_ar_0v2 * red_inf_1 *imm_esc_factor
foi_au_1v2 = foi_au_0v2 * red_inf_1 *imm_esc_factor
foi_er_1v2 = foi_er_0v2 * red_inf_1 *imm_esc_factor
foi_eu_1v2 = foi_eu_0v2 * red_inf_1 *imm_esc_factor
foi_cr_1v3 = foi_cr_0v3 * red_inf_1 *imm_esc_factor
foi_cu_1v3 = foi_cu_0v3 * red_inf_1 *imm_esc_factor
foi_ar_1v3 = foi_ar_0v3 * red_inf_1 *imm_esc_factor
foi_au_1v3 = foi_au_0v3 * red_inf_1 *imm_esc_factor
foi_er_1v3 = foi_er_0v3 * red_inf_1 *imm_esc_factor
foi_eu_1v3 = foi_eu_0v3 * red_inf_1 *imm_esc_factor
### After second exposure
foi_cr_2v0 = foi_cr_0v0 * red_inf_2 *imm_esc_factor
foi_cu_2v0 = foi_cu_0v0 * red_inf_2*imm_esc_factor
foi_ar_2v0 = foi_ar_0v0 * red_inf_2*imm_esc_factor
foi_au_2v0 = foi_au_0v0 * red_inf_2*imm_esc_factor
foi_er_2v0 = foi_er_0v0 * red_inf_2*imm_esc_factor
foi_eu_2v0 = foi_eu_0v0 * red_inf_2*imm_esc_factor
foi_cr_2v1 = foi_cr_0v1 * red_inf_2 *imm_esc_factor
foi_cu_2v1 = foi_cu_0v1 * red_inf_2*imm_esc_factor
foi_ar_2v1 = foi_ar_0v1 * red_inf_2*imm_esc_factor
foi_au_2v1 = foi_au_0v1 * red_inf_2*imm_esc_factor
foi_er_2v1 = foi_er_0v1 * red_inf_2*imm_esc_factor
foi_eu_2v1 = foi_eu_0v1 * red_inf_2*imm_esc_factor
foi_cr_2v2 = foi_cr_0v2 * red_inf_2*imm_esc_factor
foi_cu_2v2 = foi_cu_0v2 * red_inf_2*imm_esc_factor
foi_ar_2v2 = foi_ar_0v2 * red_inf_2*imm_esc_factor
foi_au_2v2 = foi_au_0v2 * red_inf_2*imm_esc_factor
foi_er_2v2 = foi_er_0v2 * red_inf_2*imm_esc_factor
foi_eu_2v2 = foi_eu_0v2 * red_inf_2*imm_esc_factor
foi_cr_2v3 = foi_cr_0v3 * red_inf_2*imm_esc_factor
foi_cu_2v3 = foi_cu_0v3 * red_inf_2*imm_esc_factor
foi_ar_2v3 = foi_ar_0v3 * red_inf_2*imm_esc_factor
foi_au_2v3 = foi_au_0v3 * red_inf_2*imm_esc_factor
foi_er_2v3 = foi_er_0v3 * red_inf_2*imm_esc_factor
foi_eu_2v3 = foi_eu_0v3 * red_inf_2*imm_esc_factor
################################
##Unvaccinated and unexposed####
################################
#Susceptible
dScr0v0 = -Scr0v0 * sd * foi_cr_0v0 - delta1_cr * Scr0v0
dScu0v0 = -Scu0v0 * sd * foi_cu_0v0 - delta1_cu * Scu0v0
dSar0v0 = -Sar0v0 * sd * foi_ar_0v0 - delta1_ar * Sar0v0
dSau0v0 = -Sau0v0 * sd * foi_au_0v0 - delta1_au * Sau0v0
dSer0v0 = -Ser0v0 * sd * foi_er_0v0 - delta1_er * Ser0v0
dSeu0v0 = -Seu0v0 * sd * foi_eu_0v0 - delta1_eu * Seu0v0
#Exposed
dEcr1v0 = Scr0v0 * sd * foi_cr_0v0 - sigma*Ecr1v0 - delta1_cr*Ecr1v0
dEcu1v0 = Scu0v0 * sd * foi_cu_0v0 - sigma*Ecu1v0 - delta1_cu*Ecu1v0
dEar1v0 = Sar0v0 * sd * foi_ar_0v0 - sigma*Ear1v0 - delta1_ar*Ear1v0
dEau1v0 = Sau0v0 * sd * foi_au_0v0 - sigma*Eau1v0 - delta1_au*Eau1v0
dEer1v0 = Ser0v0 * sd * foi_er_0v0 - sigma*Eer1v0 - delta1_er*Eer1v0
dEeu1v0 = Seu0v0 * sd * foi_eu_0v0 - sigma*Eeu1v0 - delta1_eu*Eeu1v0
# Asymptomatic
dAcr1v0 = (1-nu_c)*sigma*Ecr1v0 - gamma_A * Acr1v0 - delta1_cr*Acr1v0
dAcu1v0 = (1-nu_c)*sigma*Ecu1v0 - gamma_A * Acu1v0 - delta1_cu*Acu1v0
dAar1v0 = (1-nu_a)*sigma*Ear1v0 - gamma_A * Aar1v0 - delta1_ar*Aar1v0
dAau1v0 = (1-nu_a)*sigma*Eau1v0 - gamma_A * Aau1v0 - delta1_au*Aau1v0
dAer1v0 = (1-nu_e)*sigma*Eer1v0 - gamma_A * Aer1v0 - delta1_er*Aer1v0
dAeu1v0 = (1-nu_e)*sigma*Eeu1v0 - gamma_A * Aeu1v0 - delta1_eu*Aeu1v0
#Symptomatic
dIcr1v0 = nu_c*sigma*Ecr1v0 - gamma_I * Icr1v0
dIcu1v0 = nu_c*sigma*Ecu1v0 - gamma_I * Icu1v0
dIar1v0 = nu_a*sigma*Ear1v0 - gamma_I * Iar1v0
dIau1v0 = nu_a*sigma*Eau1v0 - gamma_I * Iau1v0
dIer1v0 = nu_e*sigma*Eer1v0 - gamma_I * Ier1v0
dIeu1v0 = nu_e*sigma*Eeu1v0 - gamma_I * Ieu1v0
# Hospitalized
dHcr1v0 = phi_c*gamma_I*Icr1v0 - gamma_H * Hcr1v0
dHcu1v0 = phi_c*gamma_I*Icu1v0 - gamma_H * Hcu1v0
dHar1v0 = phi_a*gamma_I*Iar1v0 - gamma_H * Har1v0
dHau1v0 = phi_a*gamma_I*Iau1v0 - gamma_H * Hau1v0
dHer1v0 = phi_e*gamma_I*Ier1v0 - gamma_H * Her1v0
dHeu1v0 = phi_e*gamma_I*Ieu1v0 - gamma_H * Heu1v0
# Recovered and seroconverted
dRpcr1v0 = pi*(1-phi_c)*gamma_I*Icr1v0 + pi*gamma_A*Acr1v0 + pi*(1-mu_c)*gamma_H*Hcr1v0 -4*kappa1*Rpcr1v0 - omega_pc*Rpcr1v0 - delta1_cr*Rpcr1v0
dRpcu1v0 = pi*(1-phi_c)*gamma_I*Icu1v0 + pi*gamma_A*Acu1v0 + pi*(1-mu_c)*gamma_H*Hcu1v0 -4*kappa1*Rpcu1v0 - omega_pc*Rpcu1v0 - delta1_cu*Rpcu1v0
dRpar1v0 = pi*(1-phi_a)*gamma_I*Iar1v0 + pi*gamma_A*Aar1v0 + pi*(1-mu_a)*gamma_H*Har1v0 -4*kappa1*Rpar1v0 - omega_pa*Rpar1v0 - delta1_ar*Rpar1v0
dRpau1v0 = pi*(1-phi_a)*gamma_I*Iau1v0 + pi*gamma_A*Aau1v0 + pi*(1-mu_a)*gamma_H*Hau1v0 -4*kappa1*Rpau1v0 - omega_pa*Rpau1v0 - delta1_au*Rpau1v0
dRper1v0 = pi*(1-phi_e)*gamma_I*Ier1v0 + pi*gamma_A*Aer1v0 + pi*(1-mu_e)*gamma_H*Her1v0 -4*kappa1*Rper1v0 - omega_pe*Rper1v0 - delta1_er*Rper1v0
dRpeu1v0 = pi*(1-phi_e)*gamma_I*Ieu1v0 + pi*gamma_A*Aeu1v0 + pi*(1-mu_e)*gamma_H*Heu1v0 -4*kappa1*Rpeu1v0 - omega_pe*Rpeu1v0 - delta1_eu*Rpeu1v0
#Recovered and not seropositive
dRncr1v0 = (1-pi)*(1-phi_c)*gamma_I*Icr1v0 + (1-pi)*gamma_A*Acr1v0 + (1-pi)*(1-mu_c)*gamma_H*Hcr1v0 + 4*kappa1*W3Rpcr1v0 - omega_nc*Rncr1v0 - delta1_cr*Rncr1v0
dRncu1v0 = (1-pi)*(1-phi_c)*gamma_I*Icu1v0 + (1-pi)*gamma_A*Acu1v0 + (1-pi)*(1-mu_c)*gamma_H*Hcu1v0 + 4*kappa1*W3Rpcu1v0 - omega_nc*Rncu1v0 - delta1_cu*Rncu1v0
dRnar1v0 = (1-pi)*(1-phi_a)*gamma_I*Iar1v0 + (1-pi)*gamma_A*Aar1v0 + (1-pi)*(1-mu_a)*gamma_H*Har1v0 + 4*kappa1*W3Rpar1v0 - omega_na*Rnar1v0 - delta1_ar*Rnar1v0
dRnau1v0 = (1-pi)*(1-phi_a)*gamma_I*Iau1v0 + (1-pi)*gamma_A*Aau1v0 + (1-pi)*(1-mu_a)*gamma_H*Hau1v0 + 4*kappa1*W3Rpau1v0 - omega_na*Rnau1v0 - delta1_au*Rnau1v0
dRner1v0 = (1-pi)*(1-phi_e)*gamma_I*Ier1v0 + (1-pi)*gamma_A*Aer1v0 + (1-pi)*(1-mu_e)*gamma_H*Her1v0 + 4*kappa1*W3Rper1v0 - omega_ne*Rner1v0 - delta1_er*Rner1v0
dRneu1v0 = (1-pi)*(1-phi_e)*gamma_I*Ieu1v0 + (1-pi)*gamma_A*Aeu1v0 + (1-pi)*(1-mu_e)*gamma_H*Heu1v0 + 4*kappa1*W3Rpeu1v0 - omega_ne*Rneu1v0 - delta1_eu*Rneu1v0
#Deaths
dDcr1v0 = mu_c*gamma_H*Hcr1v0
dDcu1v0 = mu_c*gamma_H*Hcu1v0
dDar1v0 = mu_a*gamma_H*Har1v0
dDau1v0 = mu_a*gamma_H*Hau1v0
dDer1v0 = mu_e*gamma_H*Her1v0
dDeu1v0 = mu_e*gamma_H*Heu1v0
################################
##Unvaccinated and exposed once####
################################
#Susceptible
dSpcr1v0 = omega_pc*Rpcr1v0 + omega_pc*W1Rpcr1v0 +omega_pc*W2Rpcr1v0 +omega_pc*W3Rpcr1v0 -kappa1*Spcr1v0 - Spcr1v0 * sd * foi_cr_1v0 - delta1_cr * Spcr1v0 ##Note vaccination rate here doesnt differ by previous vax status
dSpcu1v0 = omega_pc*Rpcu1v0 + omega_pc*W1Rpcu1v0 +omega_pc*W2Rpcu1v0 +omega_pc*W3Rpcu1v0-kappa1*Spcu1v0 - Spcu1v0 * sd * foi_cu_1v0 - delta1_cu * Spcu1v0
dSpar1v0 = omega_pa*Rpar1v0 + omega_pa*W1Rpar1v0 +omega_pa*W2Rpar1v0 +omega_pa*W3Rpar1v0 -kappa1*Spar1v0 - Spar1v0 * sd * foi_ar_1v0 - delta1_ar * Spar1v0
dSpau1v0 = omega_pa*Rpau1v0 + omega_pa*W1Rpau1v0 +omega_pa*W2Rpau1v0 +omega_pa*W3Rpau1v0 -kappa1*Spau1v0 - Spau1v0 * sd * foi_au_1v0 - delta1_au * Spau1v0
dSper1v0 = omega_pe*Rper1v0 + omega_pe*W1Rper1v0 +omega_pe*W2Rper1v0 +omega_pe*W3Rper1v0 -kappa1*Sper1v0 - Sper1v0 * sd * foi_er_1v0 - delta1_er * Sper1v0
dSpeu1v0 = omega_pe*Rpeu1v0 + omega_pe*W1Rpeu1v0 +omega_pe*W2Rpeu1v0 +omega_pe*W3Rpeu1v0 -kappa1*Speu1v0 - Speu1v0 * sd * foi_eu_1v0 - delta1_eu * Speu1v0
dSncr1v0 = omega_nc*Rncr1v0 + kappa1*Spcr1v0 -Sncr1v0 * sd * foi_cr_1v0 - delta1_cr * Sncr1v0 ##Note vaccination rate here doesnt differ by previous vax status
dSncu1v0 = omega_nc*Rncu1v0 + kappa1*Spcu1v0 -Sncu1v0 * sd * foi_cu_1v0 - delta1_cu * Sncu1v0
dSnar1v0 = omega_na*Rnar1v0 + kappa1*Spar1v0 -Snar1v0 * sd * foi_ar_1v0 - delta1_ar * Snar1v0
dSnau1v0 = omega_na*Rnau1v0 + kappa1*Spau1v0 -Snau1v0 * sd * foi_au_1v0 - delta1_au * Snau1v0
dSner1v0 = omega_ne*Rner1v0 + kappa1*Sper1v0 -Sner1v0 * sd * foi_er_1v0 - delta1_er * Sner1v0
dSneu1v0 = omega_ne*Rneu1v0 + kappa1*Speu1v0 -Sneu1v0 * sd * foi_eu_1v0 - delta1_eu * Sneu1v0
#Exposed
dEcr2v0 = Spcr1v0 * sd * foi_cr_1v0 + Sncr1v0 * sd * foi_cr_1v0 - sigma * Ecr2v0 - delta1_cr*Ecr2v0
dEcu2v0 = Spcu1v0 * sd * foi_cu_1v0 + Sncu1v0 * sd * foi_cu_1v0 - sigma * Ecu2v0 - delta1_cu*Ecu2v0
dEar2v0 = Spar1v0 * sd * foi_ar_1v0 + Snar1v0 * sd * foi_ar_1v0 - sigma * Ear2v0 - delta1_ar*Ear2v0
dEau2v0 = Spau1v0 * sd * foi_au_1v0 + Snau1v0 * sd * foi_au_1v0 - sigma * Eau2v0 - delta1_au*Eau2v0
dEer2v0 = Sper1v0 * sd * foi_er_1v0 + Sner1v0 * sd * foi_er_1v0 - sigma * Eer2v0 - delta1_er*Eer2v0
dEeu2v0 = Speu1v0 * sd * foi_eu_1v0 + Sneu1v0 * sd * foi_eu_1v0 - sigma * Eeu2v0 - delta1_eu*Eeu2v0
# Asymptomatic
dAcr2v0 = (1-nu_c)*sigma*Ecr2v0 - gamma_A * Acr2v0 - delta1_cr*Acr2v0
dAcu2v0 = (1-nu_c)*sigma*Ecu2v0 - gamma_A * Acu2v0 - delta1_cu*Acu2v0
dAar2v0 = (1-nu_a)*sigma*Ear2v0 - gamma_A * Aar2v0 - delta1_ar*Aar2v0
dAau2v0 = (1-nu_a)*sigma*Eau2v0 - gamma_A * Aau2v0 - delta1_au*Aau2v0
dAer2v0 = (1-nu_e)*sigma*Eer2v0 - gamma_A * Aer2v0 - delta1_er*Aer2v0
dAeu2v0 = (1-nu_e)*sigma*Eeu2v0 - gamma_A * Aeu2v0 - delta1_eu*Aeu2v0
#Symptomatic
dIcr2v0 = nu_c*sigma*Ecr2v0 - gamma_I * Icr2v0
dIcu2v0 = nu_c*sigma*Ecu2v0 - gamma_I * Icu2v0
dIar2v0 = nu_a*sigma*Ear2v0 - gamma_I * Iar2v0
dIau2v0 = nu_a*sigma*Eau2v0 - gamma_I * Iau2v0
dIer2v0 = nu_e*sigma*Eer2v0 - gamma_I * Ier2v0
dIeu2v0 = nu_e*sigma*Eeu2v0 - gamma_I * Ieu2v0
# Hospitalized
dHcr2v0 = phi_c*gamma_I*Icr2v0 - gamma_H * Hcr2v0
dHcu2v0 = phi_c*gamma_I*Icu2v0 - gamma_H * Hcu2v0
dHar2v0 = phi_a*gamma_I*Iar2v0 - gamma_H * Har2v0
dHau2v0 = phi_a*gamma_I*Iau2v0 - gamma_H * Hau2v0
dHer2v0 = phi_e*gamma_I*Ier2v0 - gamma_H * Her2v0
dHeu2v0 = phi_e*gamma_I*Ieu2v0 - gamma_H * Heu2v0
# Recovered and seroconverted
dRpcr2v0 = pi*(1-phi_c)*gamma_I*Icr2v0 + pi*gamma_A*Acr2v0 + pi*(1-mu_c)*gamma_H*Hcr2v0 -kappa2*Rpcr2v0 - omega_pc*Rpcr2v0 - delta1_cr*Rpcr2v0
dRpcu2v0 = pi*(1-phi_c)*gamma_I*Icu2v0 + pi*gamma_A*Acu2v0 + pi*(1-mu_c)*gamma_H*Hcu2v0 -kappa2*Rpcu2v0 - omega_pc*Rpcu2v0 - delta1_cu*Rpcu2v0
dRpar2v0 = pi*(1-phi_a)*gamma_I*Iar2v0 + pi*gamma_A*Aar2v0 + pi*(1-mu_a)*gamma_H*Har2v0 -kappa2*Rpar2v0 - omega_pa*Rpar2v0 - delta1_ar*Rpar2v0
dRpau2v0 = pi*(1-phi_a)*gamma_I*Iau2v0 + pi*gamma_A*Aau2v0 + pi*(1-mu_a)*gamma_H*Hau2v0 -kappa2*Rpau2v0 - omega_pa*Rpau2v0 - delta1_au*Rpau2v0
dRper2v0 = pi*(1-phi_e)*gamma_I*Ier2v0 + pi*gamma_A*Aer2v0 + pi*(1-mu_e)*gamma_H*Her2v0 -kappa2*Rper2v0 - omega_pe*Rper2v0 - delta1_er*Rper2v0
dRpeu2v0 = pi*(1-phi_e)*gamma_I*Ieu2v0 + pi*gamma_A*Aeu2v0 + pi*(1-mu_e)*gamma_H*Heu2v0 -kappa2*Rpeu2v0 - omega_pe*Rpeu2v0 - delta1_eu*Rpeu2v0
#Recovered and not seropositive
dRncr2v0 = (1-pi)*(1-phi_c)*gamma_I*Icr2v0 + (1-pi)*gamma_A*Acr2v0 + (1-pi)*(1-mu_c)*gamma_H*Hcr2v0 + kappa2*Rpcr2v0 - omega_nc*Rncr2v0 - delta1_cr*Rncr2v0
dRncu2v0 = (1-pi)*(1-phi_c)*gamma_I*Icu2v0 + (1-pi)*gamma_A*Acu2v0 + (1-pi)*(1-mu_c)*gamma_H*Hcu2v0 + kappa2*Rpcu2v0 - omega_nc*Rncu2v0 - delta1_cu*Rncu2v0
dRnar2v0 = (1-pi)*(1-phi_a)*gamma_I*Iar2v0 + (1-pi)*gamma_A*Aar2v0 + (1-pi)*(1-mu_a)*gamma_H*Har2v0 + kappa2*Rpar2v0 - omega_na*Rnar2v0 - delta1_ar*Rnar2v0
dRnau2v0 = (1-pi)*(1-phi_a)*gamma_I*Iau2v0 + (1-pi)*gamma_A*Aau2v0 + (1-pi)*(1-mu_a)*gamma_H*Hau2v0 + kappa2*Rpau2v0 - omega_na*Rnau2v0 - delta1_au*Rnau2v0
dRner2v0 = (1-pi)*(1-phi_e)*gamma_I*Ier2v0 + (1-pi)*gamma_A*Aer2v0 + (1-pi)*(1-mu_e)*gamma_H*Her2v0 + kappa2*Rper2v0 - omega_ne*Rner2v0 - delta1_er*Rner2v0
dRneu2v0 = (1-pi)*(1-phi_e)*gamma_I*Ieu2v0 + (1-pi)*gamma_A*Aeu2v0 + (1-pi)*(1-mu_e)*gamma_H*Heu2v0 + kappa2*Rpeu2v0 - omega_ne*Rneu2v0 - delta1_eu*Rneu2v0
#Deaths
dDcr2v0 = mu_c*gamma_H*Hcr2v0
dDcu2v0 = mu_c*gamma_H*Hcu2v0
dDar2v0 = mu_a*gamma_H*Har2v0
dDau2v0 = mu_a*gamma_H*Hau2v0
dDer2v0 = mu_e*gamma_H*Her2v0
dDeu2v0 = mu_e*gamma_H*Heu2v0
################################
##Unvaccinated and exposed twice####
################################
#Susceptible
dSpcr2v0 = omega_pc*Rpcr2v0 -kappa2*Spcr2v0 - Spcr2v0 * sd * foi_cr_2v0 - delta1_cr * Spcr2v0 + omega2_pc*Rpcr3v0 ##Note vaccination rate here doesnt differ by previous vax status
dSpcu2v0 = omega_pc*Rpcu2v0 -kappa2*Spcu2v0 - Spcu2v0 * sd * foi_cu_2v0 - delta1_cu * Spcu2v0 + omega2_pc*Rpcu3v0
dSpar2v0 = omega_pa*Rpar2v0 -kappa2*Spar2v0 - Spar2v0 * sd * foi_ar_2v0 - delta1_ar * Spar2v0 + omega2_pa*Rpar3v0
dSpau2v0 = omega_pa*Rpau2v0 -kappa2*Spau2v0 - Spau2v0 * sd * foi_au_2v0 - delta1_au * Spau2v0 + omega2_pa*Rpau3v0
dSper2v0 = omega_pe*Rper2v0 -kappa2*Sper2v0 - Sper2v0 * sd * foi_er_2v0 - delta1_er * Sper2v0 + omega2_pe*Rper3v0
dSpeu2v0 = omega_pe*Rpeu2v0 -kappa2*Speu2v0 - Speu2v0 * sd * foi_eu_2v0 - delta1_eu * Speu2v0 + omega2_pe*Rpeu3v0
dSncr2v0 = omega_nc*Rncr2v0 + kappa2*Spcr2v0 -Sncr2v0 * sd * foi_cr_2v0 - delta1_cr * Sncr2v0 + omega2_nc*Rncr3v0
dSncu2v0 = omega_nc*Rncu2v0 + kappa2*Spcu2v0 -Sncu2v0 * sd * foi_cu_2v0 - delta1_cu * Sncu2v0 + omega2_nc*Rncu3v0
dSnar2v0 = omega_na*Rnar2v0 + kappa2*Spar2v0 -Snar2v0 * sd * foi_ar_2v0 - delta1_ar * Snar2v0 + omega2_na*Rnar3v0
dSnau2v0 = omega_na*Rnau2v0 + kappa2*Spau2v0 -Snau2v0 * sd * foi_au_2v0 - delta1_au * Snau2v0 + omega2_na*Rnau3v0
dSner2v0 = omega_ne*Rner2v0 + kappa2*Sper2v0 -Sner2v0 * sd * foi_er_2v0 - delta1_er * Sner2v0 + omega2_ne*Rner3v0
dSneu2v0 = omega_ne*Rneu2v0 + kappa2*Speu2v0 -Sneu2v0 * sd * foi_eu_2v0 - delta1_eu * Sneu2v0 + omega2_ne*Rneu3v0
#Exposed
dEcr3v0 = Spcr2v0 * sd * foi_cr_2v0 + Sncr2v0 * sd * foi_cr_2v0 - sigma * Ecr3v0 - delta1_cr*Ecr3v0
dEcu3v0 = Spcu2v0 * sd * foi_cu_2v0 + Sncu2v0 * sd * foi_cu_2v0 - sigma * Ecu3v0 - delta1_cu*Ecu3v0
dEar3v0 = Spar2v0 * sd * foi_ar_2v0 + Snar2v0 * sd * foi_ar_2v0 - sigma * Ear3v0 - delta1_ar*Ear3v0
dEau3v0 = Spau2v0 * sd * foi_au_2v0 + Snau2v0 * sd * foi_au_2v0 - sigma * Eau3v0 - delta1_au*Eau3v0
dEer3v0 = Sper2v0 * sd * foi_er_2v0 + Sner2v0 * sd * foi_er_2v0 - sigma * Eer3v0 - delta1_er*Eer3v0
dEeu3v0 = Speu2v0 * sd * foi_eu_2v0 + Sneu2v0 * sd * foi_eu_2v0 - sigma * Eeu3v0 - delta1_eu*Eeu3v0
# Asymptomatic
dAcr3v0 = (1-nu_c)*sigma*Ecr3v0 - gamma_A * Acr3v0 - delta1_cr*Acr3v0
dAcu3v0 = (1-nu_c)*sigma*Ecu3v0 - gamma_A * Acu3v0 - delta1_cu*Acu3v0
dAar3v0 = (1-nu_a)*sigma*Ear3v0 - gamma_A * Aar3v0 - delta1_ar*Aar3v0
dAau3v0 = (1-nu_a)*sigma*Eau3v0 - gamma_A * Aau3v0 - delta1_au*Aau3v0
dAer3v0 = (1-nu_e)*sigma*Eer3v0 - gamma_A * Aer3v0 - delta1_er*Aer3v0
dAeu3v0 = (1-nu_e)*sigma*Eeu3v0 - gamma_A * Aeu3v0 - delta1_eu*Aeu3v0
#Symptomatic
dIcr3v0 = nu_c*sigma*Ecr3v0 - gamma_I * Icr3v0
dIcu3v0 = nu_c*sigma*Ecu3v0 - gamma_I * Icu3v0
dIar3v0 = nu_a*sigma*Ear3v0 - gamma_I * Iar3v0
dIau3v0 = nu_a*sigma*Eau3v0 - gamma_I * Iau3v0
dIer3v0 = nu_e*sigma*Eer3v0 - gamma_I * Ier3v0
dIeu3v0 = nu_e*sigma*Eeu3v0 - gamma_I * Ieu3v0
# Hospitalized
dHcr3v0 = phi_c*gamma_I*Icr3v0 - gamma_H * Hcr3v0
dHcu3v0 = phi_c*gamma_I*Icu3v0 - gamma_H * Hcu3v0
dHar3v0 = phi_a*gamma_I*Iar3v0 - gamma_H * Har3v0
dHau3v0 = phi_a*gamma_I*Iau3v0 - gamma_H * Hau3v0
dHer3v0 = phi_e*gamma_I*Ier3v0 - gamma_H * Her3v0
dHeu3v0 = phi_e*gamma_I*Ieu3v0 - gamma_H * Heu3v0
# Recovered and seroconverted
dRpcr3v0 = pi*(1-phi_c)*gamma_I*Icr3v0 + pi*gamma_A*Acr3v0 + pi*(1-mu_c)*gamma_H*Hcr3v0 -kappa3*Rpcr3v0 - omega2_pc*Rpcr3v0 - delta1_cr*Rpcr3v0
dRpcu3v0 = pi*(1-phi_c)*gamma_I*Icu3v0 + pi*gamma_A*Acu3v0 + pi*(1-mu_c)*gamma_H*Hcu3v0 -kappa3*Rpcu3v0 - omega2_pc*Rpcu3v0 - delta1_cu*Rpcu3v0
dRpar3v0 = pi*(1-phi_a)*gamma_I*Iar3v0 + pi*gamma_A*Aar3v0 + pi*(1-mu_a)*gamma_H*Har3v0 -kappa3*Rpar3v0 - omega2_pa*Rpar3v0 - delta1_ar*Rpar3v0
dRpau3v0 = pi*(1-phi_a)*gamma_I*Iau3v0 + pi*gamma_A*Aau3v0 + pi*(1-mu_a)*gamma_H*Hau3v0 -kappa3*Rpau3v0 - omega2_pa*Rpau3v0 - delta1_au*Rpau3v0
dRper3v0 = pi*(1-phi_e)*gamma_I*Ier3v0 + pi*gamma_A*Aer3v0 + pi*(1-mu_e)*gamma_H*Her3v0 -kappa3*Rper3v0 - omega2_pe*Rper3v0 - delta1_er*Rper3v0
dRpeu3v0 = pi*(1-phi_e)*gamma_I*Ieu3v0 + pi*gamma_A*Aeu3v0 + pi*(1-mu_e)*gamma_H*Heu3v0 -kappa3*Rpeu3v0 - omega2_pe*Rpeu3v0 - delta1_eu*Rpeu3v0
#Recovered and not seropositive
dRncr3v0 = (1-pi)*(1-phi_c)*gamma_I*Icr3v0 + (1-pi)*gamma_A*Acr3v0 + (1-pi)*(1-mu_c)*gamma_H*Hcr3v0 + kappa3*Rpcr3v0 - omega2_nc*Rncr3v0 - delta1_cr*Rncr3v0
dRncu3v0 = (1-pi)*(1-phi_c)*gamma_I*Icu3v0 + (1-pi)*gamma_A*Acu3v0 + (1-pi)*(1-mu_c)*gamma_H*Hcu3v0 + kappa3*Rpcu3v0 - omega2_nc*Rncu3v0 - delta1_cu*Rncu3v0
dRnar3v0 = (1-pi)*(1-phi_a)*gamma_I*Iar3v0 + (1-pi)*gamma_A*Aar3v0 + (1-pi)*(1-mu_a)*gamma_H*Har3v0 + kappa3*Rpar3v0 - omega2_na*Rnar3v0 - delta1_ar*Rnar3v0
dRnau3v0 = (1-pi)*(1-phi_a)*gamma_I*Iau3v0 + (1-pi)*gamma_A*Aau3v0 + (1-pi)*(1-mu_a)*gamma_H*Hau3v0 + kappa3*Rpau3v0 - omega2_na*Rnau3v0 - delta1_au*Rnau3v0
dRner3v0 = (1-pi)*(1-phi_e)*gamma_I*Ier3v0 + (1-pi)*gamma_A*Aer3v0 + (1-pi)*(1-mu_e)*gamma_H*Her3v0 + kappa3*Rper3v0 - omega2_ne*Rner3v0 - delta1_er*Rner3v0
dRneu3v0 = (1-pi)*(1-phi_e)*gamma_I*Ieu3v0 + (1-pi)*gamma_A*Aeu3v0 + (1-pi)*(1-mu_e)*gamma_H*Heu3v0 + kappa3*Rpeu3v0 - omega2_ne*Rneu3v0 - delta1_eu*Rneu3v0
#Deaths
dDcr3v0 = mu_c*gamma_H*Hcr3v0
dDcu3v0 = mu_c*gamma_H*Hcu3v0
dDar3v0 = mu_a*gamma_H*Har3v0
dDau3v0 = mu_a*gamma_H*Hau3v0
dDer3v0 = mu_e*gamma_H*Her3v0
dDeu3v0 = mu_e*gamma_H*Heu3v0
################################
##Vaccinated one dose and unexposed####
################################
#Susceptible and seropositive with S-spike and total IGg
dSpcr0v1 = omegav_pc *Vpcr0v1+ omegav_pc*W1Vpcr0v1+ omegav_pc*W2Vpcr0v1+ omegav_pc*W3Vpcr0v1 -Spcr0v1 * sd * foi_cr_0v1 - delta2_cr * Spcr0v1 -kappa1 * Spcr0v1
dSpcu0v1 = omegav_pc *Vpcu0v1+ omegav_pc*W1Vpcu0v1+ omegav_pc*W2Vpcu0v1+ omegav_pc*W3Vpcu0v1 -Spcu0v1 * sd * foi_cu_0v1 - delta2_cu * Spcu0v1 -kappa1 * Spcu0v1
dSpar0v1 = omegav_pa *Vpar0v1+ omegav_pc*W1Vpar0v1+ omegav_pc*W2Vpar0v1+ omegav_pc*W3Vpar0v1 -Spar0v1 * sd * foi_ar_0v1 - delta2_ar * Spar0v1 -kappa1 * Spar0v1
dSpau0v1 = omegav_pa *Vpau0v1+ omegav_pc*W1Vpau0v1+ omegav_pc*W2Vpau0v1+ omegav_pc*W3Vpau0v1 -Spau0v1 * sd * foi_au_0v1 - delta2_au * Spau0v1 -kappa1 * Spau0v1
dSper0v1 = omegav_pe *Vper0v1+ omegav_pc*W1Vper0v1+ omegav_pc*W2Vper0v1+ omegav_pc*W3Vper0v1 -Sper0v1 * sd * foi_er_0v1 - delta2_er * Sper0v1 -kappa1 * Sper0v1
dSpeu0v1 = omegav_pe *Vpeu0v1+ omegav_pc*W1Vpeu0v1+ omegav_pc*W2Vpeu0v1+ omegav_pc*W3Vpeu0v1 -Speu0v1 * sd * foi_eu_0v1 - delta2_eu * Speu0v1 -kappa1 * Speu0v1
# Susceptible and seronegative for S-spike and total IGg
dSncr0v1 = omegav_nc *Vncr0v1 - Sncr0v1 * sd * foi_cr_0v1 - delta2_cr * Sncr0v1 +kappa1 * Spcr0v1
dSncu0v1 = omegav_nc *Vncu0v1 - Sncu0v1 * sd * foi_cu_0v1 - delta2_cu * Sncu0v1 +kappa1 * Spcu0v1
dSnar0v1 = omegav_na *Vnar0v1 - Snar0v1 * sd * foi_ar_0v1 - delta2_ar * Snar0v1 +kappa1 * Spar0v1
dSnau0v1 = omegav_na *Vnau0v1 - Snau0v1 * sd * foi_au_0v1 - delta2_au * Snau0v1 +kappa1 * Spau0v1
dSner0v1 = omegav_ne *Vner0v1 - Sner0v1 * sd * foi_er_0v1 - delta2_er * Sner0v1 +kappa1 * Sper0v1
dSneu0v1 = omegav_ne *Vneu0v1 - Sneu0v1 * sd * foi_eu_0v1 - delta2_eu * Sneu0v1 +kappa1 * Speu0v1
#Exposed
dEcr1v1 = Spcr0v1*sd*foi_cr_0v1+Sncr0v1 * sd * foi_cr_0v1 - sigma * Ecr1v1 - delta2_cr*Ecr1v1 +delta1_cr*Ecr1v0
dEcu1v1 = Spcu0v1*sd*foi_cu_0v1+Sncu0v1 * sd * foi_cu_0v1- sigma * Ecu1v1 - delta2_cu*Ecu1v1 +delta1_cu*Ecu1v0
dEar1v1 = Spar0v1*sd*foi_ar_0v1+Snar0v1 * sd * foi_ar_0v1- sigma * Ear1v1 - delta2_ar*Ear1v1 +delta1_ar*Ear1v0
dEau1v1 = Spau0v1*sd*foi_au_0v1+Snau0v1 * sd * foi_au_0v1- sigma * Eau1v1 - delta2_au*Eau1v1 +delta1_au*Eau1v0
dEer1v1 = Sper0v1*sd*foi_er_0v1+Sner0v1 * sd * foi_er_0v1- sigma * Eer1v1 - delta2_er*Eer1v1 +delta1_er*Eer1v0
dEeu1v1 = Speu0v1*sd*foi_eu_0v1+Sneu0v1 * sd * foi_eu_0v1- sigma * Eeu1v1 - delta2_eu*Eeu1v1 +delta1_eu*Eeu1v0
# Asymptomatic
dAcr1v1 = (1-nu_c)*sigma*Ecr1v1 - gamma_A * Acr1v1 - delta2_cr*Acr1v1 +delta1_cr*Acr1v0
dAcu1v1 = (1-nu_c)*sigma*Ecu1v1 - gamma_A * Acu1v1 - delta2_cu*Acu1v1 +delta1_cu*Acu1v0
dAar1v1 = (1-nu_a)*sigma*Ear1v1 - gamma_A * Aar1v1 - delta2_ar*Aar1v1 +delta1_ar*Aar1v0
dAau1v1 = (1-nu_a)*sigma*Eau1v1 - gamma_A * Aau1v1 - delta2_au*Aau1v1 +delta1_au*Aau1v0
dAer1v1 = (1-nu_e)*sigma*Eer1v1 - gamma_A * Aer1v1 - delta2_er*Aer1v1 +delta1_er*Aer1v0
dAeu1v1 = (1-nu_e)*sigma*Eeu1v1 - gamma_A * Aeu1v1 - delta2_eu*Aeu1v1 +delta1_eu*Aeu1v0
#Symptomatic
dIcr1v1 = nu_c*sigma*Ecr1v1 - gamma_I * Icr1v1
dIcu1v1 = nu_c*sigma*Ecu1v1 - gamma_I * Icu1v1
dIar1v1 = nu_a*sigma*Ear1v1 - gamma_I * Iar1v1
dIau1v1 = nu_a*sigma*Eau1v1 - gamma_I * Iau1v1
dIer1v1 = nu_e*sigma*Eer1v1 - gamma_I * Ier1v1
dIeu1v1 = nu_e*sigma*Eeu1v1 - gamma_I * Ieu1v1
# Hospitalized
dHcr1v1 = phi_cv1*gamma_I*Icr1v1 - gamma_H * Hcr1v1
dHcu1v1 = phi_cv1*gamma_I*Icu1v1 - gamma_H * Hcu1v1
dHar1v1 = phi_av1*gamma_I*Iar1v1 - gamma_H * Har1v1
dHau1v1 = phi_av1*gamma_I*Iau1v1 - gamma_H * Hau1v1
dHer1v1 = phi_ev1*gamma_I*Ier1v1 - gamma_H * Her1v1
dHeu1v1 = phi_ev1*gamma_I*Ieu1v1 - gamma_H * Heu1v1
# Recovered and seroconverted
dRpcr1v1 = pi*(1-phi_cv1)*gamma_I*Icr1v1 + pi*gamma_A*Acr1v1 + pi*(1-mu_c)*gamma_H*Hcr1v1 -kappa2*Rpcr1v1 - omega_pc*Rpcr1v1 - delta2_cr*Rpcr1v1 +delta1_cr*Rpcr1v0+delta1_cr*W1Rpcr1v0+delta1_cr*W2Rpcr1v0+delta1_cr*W3Rpcr1v0+delta1_cr*Rncr1v0*rho_v1 +delta1_cr*Spcr1v0+delta1_cr*Sncr1v0*rho_v1
dRpcu1v1 = pi*(1-phi_cv1)*gamma_I*Icu1v1 + pi*gamma_A*Acu1v1 + pi*(1-mu_c)*gamma_H*Hcu1v1 -kappa2*Rpcu1v1 - omega_pc*Rpcu1v1 - delta2_cu*Rpcu1v1 +delta1_cu*Rpcu1v0+delta1_cu*W1Rpcu1v0+delta1_cu*W2Rpcu1v0+delta1_cu*W3Rpcu1v0+delta1_cu*Rncu1v0*rho_v1 +delta1_cu*Spcu1v0+delta1_cu*Sncu1v0*rho_v1
dRpar1v1 = pi*(1-phi_av1)*gamma_I*Iar1v1 + pi*gamma_A*Aar1v1 + pi*(1-mu_a)*gamma_H*Har1v1 -kappa2*Rpar1v1 - omega_pa*Rpar1v1 - delta2_ar*Rpar1v1 +delta1_ar*Rpar1v0+delta1_ar*W1Rpar1v0+delta1_ar*W2Rpar1v0+delta1_ar*W3Rpar1v0+delta1_ar*Rnar1v0*rho_v1 +delta1_ar*Spar1v0+delta1_ar*Snar1v0*rho_v1
dRpau1v1 = pi*(1-phi_av1)*gamma_I*Iau1v1 + pi*gamma_A*Aau1v1 + pi*(1-mu_a)*gamma_H*Hau1v1 -kappa2*Rpau1v1 - omega_pa*Rpau1v1 - delta2_au*Rpau1v1 +delta1_au*Rpau1v0+delta1_au*W1Rpau1v0+delta1_au*W2Rpau1v0+delta1_au*W3Rpau1v0+delta1_au*Rnau1v0*rho_v1 +delta1_au*Spau1v0+delta1_au*Snau1v0*rho_v1
dRper1v1 = pi*(1-phi_ev1)*gamma_I*Ier1v1 + pi*gamma_A*Aer1v1 + pi*(1-mu_e)*gamma_H*Her1v1 -kappa2*Rper1v1 - omega_pe*Rper1v1 - delta2_er*Rper1v1 +delta1_er*Rper1v0+delta1_er*W1Rper1v0+delta1_er*W2Rper1v0+delta1_er*W3Rper1v0+delta1_er*Rner1v0*rho_v1 +delta1_er*Sper1v0+delta1_er*Sner1v0*rho_v1
dRpeu1v1 = pi*(1-phi_ev1)*gamma_I*Ieu1v1 + pi*gamma_A*Aeu1v1 + pi*(1-mu_e)*gamma_H*Heu1v1 -kappa2*Rpeu1v1 - omega_pe*Rpeu1v1 - delta2_eu*Rpeu1v1 +delta1_eu*Rpeu1v0+delta1_eu*W1Rpeu1v0+delta1_eu*W2Rpeu1v0+delta1_eu*W3Rpeu1v0+delta1_eu*Rneu1v0*rho_v1 +delta1_eu*Speu1v0+delta1_eu*Sneu1v0*rho_v1
#Recovered and not seropositive
dRncr1v1 = (1-pi)*(1-phi_cv1)*gamma_I*Icr1v1 + (1-pi)*gamma_A*Acr1v1 + (1-pi)*(1-mu_c)*gamma_H*Hcr1v1 + kappa2*Rpcr1v1 - omega_nc*Rncr1v1 - delta2_cr*Rncr1v1 +delta1_cr*Rncr1v0*(1-rho_v1)+delta1_cr*Sncr1v0*(1-rho_v1)
dRncu1v1 = (1-pi)*(1-phi_cv1)*gamma_I*Icu1v1 + (1-pi)*gamma_A*Acu1v1 + (1-pi)*(1-mu_c)*gamma_H*Hcu1v1 + kappa2*Rpcu1v1 - omega_nc*Rncu1v1 - delta2_cu*Rncu1v1 +delta1_cu*Rncu1v0*(1-rho_v1)+delta1_cu*Sncu1v0*(1-rho_v1)
dRnar1v1 = (1-pi)*(1-phi_av1)*gamma_I*Iar1v1 + (1-pi)*gamma_A*Aar1v1 + (1-pi)*(1-mu_a)*gamma_H*Har1v1 + kappa2*Rpar1v1 - omega_na*Rnar1v1 - delta2_ar*Rnar1v1 +delta1_ar*Rnar1v0*(1-rho_v1)+delta1_ar*Snar1v0*(1-rho_v1)
dRnau1v1 = (1-pi)*(1-phi_av1)*gamma_I*Iau1v1 + (1-pi)*gamma_A*Aau1v1 + (1-pi)*(1-mu_a)*gamma_H*Hau1v1 + kappa2*Rpau1v1 - omega_na*Rnau1v1 - delta2_au*Rnau1v1 +delta1_au*Rnau1v0*(1-rho_v1)+delta1_au*Snau1v0*(1-rho_v1)
dRner1v1 = (1-pi)*(1-phi_ev1)*gamma_I*Ier1v1 + (1-pi)*gamma_A*Aer1v1 + (1-pi)*(1-mu_e)*gamma_H*Her1v1 + kappa2*Rper1v1 - omega_ne*Rner1v1 - delta2_er*Rner1v1 +delta1_er*Rner1v0*(1-rho_v1)+delta1_er*Sner1v0*(1-rho_v1)
dRneu1v1 = (1-pi)*(1-phi_ev1)*gamma_I*Ieu1v1 + (1-pi)*gamma_A*Aeu1v1 + (1-pi)*(1-mu_e)*gamma_H*Heu1v1 + kappa2*Rpeu1v1 - omega_ne*Rneu1v1 - delta2_eu*Rneu1v1 +delta1_eu*Rneu1v0*(1-rho_v1)+delta1_eu*Sneu1v0*(1-rho_v1)
#Deaths
dDcr1v1 = mu_c*gamma_H*Hcr1v1
dDcu1v1 = mu_c*gamma_H*Hcu1v1
dDar1v1 = mu_a*gamma_H*Har1v1
dDau1v1 = mu_a*gamma_H*Hau1v1
dDer1v1 = mu_e*gamma_H*Her1v1
dDeu1v1 = mu_e*gamma_H*Heu1v1
################################
##Vaccinated one dose and exposed once####
################################
#Susceptible
dSpcr1v1 = omega_pc*Rpcr1v1 -kappa2*Spcr1v1 - Spcr1v1 * sd * foi_cr_1v1 - delta2_cr * Spcr1v1
dSpcu1v1 = omega_pc*Rpcu1v1 -kappa2*Spcu1v1 - Spcu1v1 * sd * foi_cu_1v1 - delta2_cu * Spcu1v1
dSpar1v1 = omega_pa*Rpar1v1 -kappa2*Spar1v1 - Spar1v1 * sd * foi_ar_1v1 - delta2_ar * Spar1v1
dSpau1v1 = omega_pa*Rpau1v1 -kappa2*Spau1v1 - Spau1v1 * sd * foi_au_1v1 - delta2_au * Spau1v1
dSper1v1 = omega_pe*Rper1v1 -kappa2*Sper1v1 - Sper1v1 * sd * foi_er_1v1 - delta2_er * Sper1v1
dSpeu1v1 = omega_pe*Rpeu1v1 -kappa2*Speu1v1 - Speu1v1 * sd * foi_eu_1v1 - delta2_eu * Speu1v1
dSncr1v1 = omega_nc*Rncr1v1 + kappa2*Spcr1v1 -Sncr1v1 * sd * foi_cr_1v1 - delta2_cr * Sncr1v1
dSncu1v1 = omega_nc*Rncu1v1 + kappa2*Spcu1v1 -Sncu1v1 * sd * foi_cu_1v1 - delta2_cu * Sncu1v1
dSnar1v1 = omega_na*Rnar1v1 + kappa2*Spar1v1 -Snar1v1 * sd * foi_ar_1v1 - delta2_ar * Snar1v1
dSnau1v1 = omega_na*Rnau1v1 + kappa2*Spau1v1 -Snau1v1 * sd * foi_au_1v1 - delta2_au * Snau1v1
dSner1v1 = omega_ne*Rner1v1 + kappa2*Sper1v1 -Sner1v1 * sd * foi_er_1v1 - delta2_er * Sner1v1
dSneu1v1 = omega_ne*Rneu1v1 + kappa2*Speu1v1 -Sneu1v1 * sd * foi_eu_1v1 - delta2_eu * Sneu1v1
#Exposed
dEcr2v1 = Spcr1v1 * sd * foi_cr_1v1 + Sncr1v1 * sd * foi_cr_1v1 - sigma * Ecr2v1 - delta2_cr*Ecr2v1 +delta1_cr*Ecr2v0
dEcu2v1 = Spcu1v1 * sd * foi_cu_1v1 + Sncu1v1 * sd * foi_cu_1v1 - sigma * Ecu2v1 - delta2_cu*Ecu2v1 +delta1_cu*Ecu2v0
dEar2v1 = Spar1v1 * sd * foi_ar_1v1 + Snar1v1 * sd * foi_ar_1v1 - sigma * Ear2v1 - delta2_ar*Ear2v1 +delta1_ar*Ear2v0
dEau2v1 = Spau1v1 * sd * foi_au_1v1 + Snau1v1 * sd * foi_au_1v1 - sigma * Eau2v1 - delta2_au*Eau2v1 +delta1_au*Eau2v0
dEer2v1 = Sper1v1 * sd * foi_er_1v1 + Sner1v1 * sd * foi_er_1v1 - sigma * Eer2v1 - delta2_er*Eer2v1 +delta1_er*Eer2v0
dEeu2v1 = Speu1v1 * sd * foi_eu_1v1 + Sneu1v1 * sd * foi_eu_1v1 - sigma * Eeu2v1 - delta2_eu*Eeu2v1 +delta1_eu*Eeu2v0
# Asymptomatic
dAcr2v1 = (1-nu_c)*sigma*Ecr2v1 - gamma_A * Acr2v1 - delta2_cr*Acr2v1 + delta1_cr*Acr2v0
dAcu2v1 = (1-nu_c)*sigma*Ecu2v1 - gamma_A * Acu2v1 - delta2_cu*Acu2v1 + delta1_cu*Acu2v0
dAar2v1 = (1-nu_a)*sigma*Ear2v1 - gamma_A * Aar2v1 - delta2_ar*Aar2v1 + delta1_ar*Aar2v0
dAau2v1 = (1-nu_a)*sigma*Eau2v1 - gamma_A * Aau2v1 - delta2_au*Aau2v1 + delta1_au*Aau2v0
dAer2v1 = (1-nu_e)*sigma*Eer2v1 - gamma_A * Aer2v1 - delta2_er*Aer2v1 + delta1_er*Aer2v0
dAeu2v1 = (1-nu_e)*sigma*Eeu2v1 - gamma_A * Aeu2v1 - delta2_eu*Aeu2v1 + delta1_eu*Aeu2v0
#Symptomatic
dIcr2v1 = nu_c*sigma*Ecr2v1 - gamma_I * Icr2v1
dIcu2v1 = nu_c*sigma*Ecu2v1 - gamma_I * Icu2v1
dIar2v1 = nu_a*sigma*Ear2v1 - gamma_I * Iar2v1
dIau2v1 = nu_a*sigma*Eau2v1 - gamma_I * Iau2v1
dIer2v1 = nu_e*sigma*Eer2v1 - gamma_I * Ier2v1
dIeu2v1 = nu_e*sigma*Eeu2v1 - gamma_I * Ieu2v1
# Hospitalized
dHcr2v1 = phi_cv1*gamma_I*Icr2v1 - gamma_H * Hcr2v1
dHcu2v1 = phi_cv1*gamma_I*Icu2v1 - gamma_H * Hcu2v1
dHar2v1 = phi_av1*gamma_I*Iar2v1 - gamma_H * Har2v1
dHau2v1 = phi_av1*gamma_I*Iau2v1 - gamma_H * Hau2v1
dHer2v1 = phi_ev1*gamma_I*Ier2v1 - gamma_H * Her2v1
dHeu2v1 = phi_ev1*gamma_I*Ieu2v1 - gamma_H * Heu2v1
# Recovered and seroconverted
dRpcr2v1 = pi*(1-phi_cv1)*gamma_I*Icr2v1 + pi*gamma_A*Acr2v1 + pi*(1-mu_c)*gamma_H*Hcr2v1 -kappa3*Rpcr2v1 - omega_pc*Rpcr2v1 - delta2_cr*Rpcr2v1 +delta1_cr*Rpcr2v0 + delta1_cr*Rncr2v0*(rho_v2)+ delta1_cr*Spcr2v0+ delta1_cr*Sncr2v0*(rho_v2)
dRpcu2v1 = pi*(1-phi_cv1)*gamma_I*Icu2v1 + pi*gamma_A*Acu2v1 + pi*(1-mu_c)*gamma_H*Hcu2v1 -kappa3*Rpcu2v1 - omega_pc*Rpcu2v1 - delta2_cu*Rpcu2v1 +delta1_cu*Rpcu2v0+ delta1_cu*Rncu2v0*(rho_v2)+ delta1_cu*Spcu2v0+ delta1_cu*Sncu2v0*(rho_v2)
dRpar2v1 = pi*(1-phi_av1)*gamma_I*Iar2v1 + pi*gamma_A*Aar2v1 + pi*(1-mu_a)*gamma_H*Har2v1 -kappa3*Rpar2v1 - omega_pa*Rpar2v1 - delta2_ar*Rpar2v1 +delta1_ar*Rpar2v0+ delta1_ar*Rnar2v0*(rho_v2)+ delta1_ar*Spar2v0+ delta1_ar*Snar2v0*(rho_v2)
dRpau2v1 = pi*(1-phi_av1)*gamma_I*Iau2v1 + pi*gamma_A*Aau2v1 + pi*(1-mu_a)*gamma_H*Hau2v1 -kappa3*Rpau2v1 - omega_pa*Rpau2v1 - delta2_au*Rpau2v1 +delta1_au*Rpau2v0+ delta1_au*Rnau2v0*(rho_v2)+ delta1_au*Spau2v0+ delta1_au*Snau2v0*(rho_v2)
dRper2v1 = pi*(1-phi_ev1)*gamma_I*Ier2v1 + pi*gamma_A*Aer2v1 + pi*(1-mu_e)*gamma_H*Her2v1 -kappa3*Rper2v1 - omega_pe*Rper2v1 - delta2_er*Rper2v1 +delta1_er*Rper2v0+ delta1_er*Rner2v0*(rho_v2)+ delta1_er*Sper2v0+ delta1_er*Sner2v0*(rho_v2)
dRpeu2v1 = pi*(1-phi_ev1)*gamma_I*Ieu2v1 + pi*gamma_A*Aeu2v1 + pi*(1-mu_e)*gamma_H*Heu2v1 -kappa3*Rpeu2v1 - omega_pe*Rpeu2v1 - delta2_eu*Rpeu2v1 +delta1_eu*Rpeu2v0+ delta1_eu*Rneu2v0*(rho_v2)+ delta1_eu*Speu2v0+ delta1_eu*Sneu2v0*(rho_v2)
#Recovered and not seropositive
dRncr2v1 = (1-pi)*(1-phi_cv1)*gamma_I*Icr2v1 + (1-pi)*gamma_A*Acr2v1 + (1-pi)*(1-mu_c)*gamma_H*Hcr2v1 + kappa3*Rpcr2v1 - omega_nc*Rncr2v1 - delta2_cr*Rncr2v1 + delta1_cr*Rncr2v0*(1-rho_v2)+ delta1_cr*Sncr2v0*(1-rho_v2)
dRncu2v1 = (1-pi)*(1-phi_cv1)*gamma_I*Icu2v1 + (1-pi)*gamma_A*Acu2v1 + (1-pi)*(1-mu_c)*gamma_H*Hcu2v1 + kappa3*Rpcu2v1 - omega_nc*Rncu2v1 - delta2_cu*Rncu2v1 + delta1_cu*Rncu2v0*(1-rho_v2)+ delta1_cu*Sncu2v0*(1-rho_v2)
dRnar2v1 = (1-pi)*(1-phi_av1)*gamma_I*Iar2v1 + (1-pi)*gamma_A*Aar2v1 + (1-pi)*(1-mu_a)*gamma_H*Har2v1 + kappa3*Rpar2v1 - omega_na*Rnar2v1 - delta2_ar*Rnar2v1 + delta1_ar*Rnar2v0*(1-rho_v2)+ delta1_ar*Snar2v0*(1-rho_v2)
dRnau2v1 = (1-pi)*(1-phi_av1)*gamma_I*Iau2v1 + (1-pi)*gamma_A*Aau2v1 + (1-pi)*(1-mu_a)*gamma_H*Hau2v1 + kappa3*Rpau2v1 - omega_na*Rnau2v1 - delta2_au*Rnau2v1 + delta1_au*Rnau2v0*(1-rho_v2)+ delta1_au*Snau2v0*(1-rho_v2)
dRner2v1 = (1-pi)*(1-phi_ev1)*gamma_I*Ier2v1 + (1-pi)*gamma_A*Aer2v1 + (1-pi)*(1-mu_e)*gamma_H*Her2v1 + kappa3*Rper2v1 - omega_ne*Rner2v1 - delta2_er*Rner2v1 + delta1_er*Rner2v0*(1-rho_v2)+ delta1_er*Sner2v0*(1-rho_v2)
dRneu2v1 = (1-pi)*(1-phi_ev1)*gamma_I*Ieu2v1 + (1-pi)*gamma_A*Aeu2v1 + (1-pi)*(1-mu_e)*gamma_H*Heu2v1 + kappa3*Rpeu2v1 - omega_ne*Rneu2v1 - delta2_eu*Rneu2v1 + delta1_eu*Rneu2v0*(1-rho_v2)+ delta1_eu*Sneu2v0*(1-rho_v2)
#Deaths
dDcr2v1 = mu_c*gamma_H*Hcr2v1
dDcu2v1 = mu_c*gamma_H*Hcu2v1
dDar2v1 = mu_a*gamma_H*Har2v1
dDau2v1 = mu_a*gamma_H*Hau2v1
dDer2v1 = mu_e*gamma_H*Her2v1
dDeu2v1 = mu_e*gamma_H*Heu2v1
################################
##Vaccinated one dose and exposed twice####
################################
#Susceptible
dSpcr2v1 = omega_pc*Rpcr2v1 -kappa3*Spcr2v1 - Spcr2v1 * sd * foi_cr_2v1 - delta2_cr * Spcr2v1 + omega2_pc*Rpcr3v1
dSpcu2v1 = omega_pc*Rpcu2v1 -kappa3*Spcu2v1 - Spcu2v1 * sd * foi_cu_2v1 - delta2_cu * Spcu2v1 + omega2_pc*Rpcu3v1
dSpar2v1 = omega_pa*Rpar2v1 -kappa3*Spar2v1 - Spar2v1 * sd * foi_ar_2v1 - delta2_ar * Spar2v1 + omega2_pa*Rpar3v1
dSpau2v1 = omega_pa*Rpau2v1 -kappa3*Spau2v1 - Spau2v1 * sd * foi_au_2v1 - delta2_au * Spau2v1 + omega2_pa*Rpau3v1
dSper2v1 = omega_pe*Rper2v1 -kappa3*Sper2v1 - Sper2v1 * sd * foi_er_2v1 - delta2_er * Sper2v1 + omega2_pe*Rper3v1
dSpeu2v1 = omega_pe*Rpeu2v1 -kappa3*Speu2v1 - Speu2v1 * sd * foi_eu_2v1 - delta2_eu * Speu2v1 + omega2_pe*Rpeu3v1
dSncr2v1 = omega_pc*Rncr2v1 + kappa3*Spcr2v1 -Sncr2v1 * sd * foi_cr_2v1 - delta2_cr * Sncr2v1 + omega2_nc*Rncr3v1
dSncu2v1 = omega_pc*Rncu2v1 + kappa3*Spcu2v1 -Sncu2v1 * sd * foi_cu_2v1 - delta2_cu * Sncu2v1 + omega2_nc*Rncu3v1
dSnar2v1 = omega_pa*Rnar2v1 + kappa3*Spar2v1 -Snar2v1 * sd * foi_ar_2v1 - delta2_ar * Snar2v1 + omega2_na*Rnar3v1
dSnau2v1 = omega_pa*Rnau2v1 + kappa3*Spau2v1 -Snau2v1 * sd * foi_au_2v1 - delta2_au * Snau2v1 + omega2_na*Rnau3v1
dSner2v1 = omega_pe*Rner2v1 + kappa3*Sper2v1 -Sner2v1 * sd * foi_er_2v1 - delta2_er * Sner2v1 + omega2_ne*Rner3v1
dSneu2v1 = omega_pe*Rneu2v1 + kappa3*Speu2v1 -Sneu2v1 * sd * foi_eu_2v1 - delta2_eu * Sneu2v1 + omega2_ne*Rneu3v1
#Exposed
dEcr3v1 = Spcr2v1 * sd * foi_cr_2v1 + Sncr2v1 * sd * foi_cr_2v1 - sigma * Ecr3v1 - delta2_cr*Ecr3v1 + delta1_cr*Ecr3v0
dEcu3v1 = Spcu2v1 * sd * foi_cu_2v1 + Sncu2v1 * sd * foi_cu_2v1 - sigma * Ecu3v1 - delta2_cu*Ecu3v1 + delta1_cu*Ecu3v0
dEar3v1 = Spar2v1 * sd * foi_ar_2v1 + Snar2v1 * sd * foi_ar_2v1 - sigma * Ear3v1 - delta2_ar*Ear3v1 + delta1_ar*Ear3v0
dEau3v1 = Spau2v1 * sd * foi_au_2v1 + Snau2v1 * sd * foi_au_2v1 - sigma * Eau3v1 - delta2_au*Eau3v1 + delta1_au*Eau3v0
dEer3v1 = Sper2v1 * sd * foi_er_2v1 + Sner2v1 * sd * foi_er_2v1 - sigma * Eer3v1 - delta2_er*Eer3v1 + delta1_er*Eer3v0
dEeu3v1 = Speu2v1 * sd * foi_eu_2v1 + Sneu2v1 * sd * foi_eu_2v1 - sigma * Eeu3v1 - delta2_eu*Eeu3v1 + delta1_eu*Eeu3v0
# Asymptomatic
dAcr3v1 = (1-nu_c)*sigma*Ecr3v1 - gamma_A * Acr3v1 - delta2_cr*Acr3v1+ delta1_cr*Acr3v0
dAcu3v1 = (1-nu_c)*sigma*Ecu3v1 - gamma_A * Acu3v1 - delta2_cu*Acu3v1+ delta1_cu*Acu3v0
dAar3v1 = (1-nu_a)*sigma*Ear3v1 - gamma_A * Aar3v1 - delta2_ar*Aar3v1+ delta1_ar*Aar3v0
dAau3v1 = (1-nu_a)*sigma*Eau3v1 - gamma_A * Aau3v1 - delta2_au*Aau3v1+ delta1_au*Aau3v0
dAer3v1 = (1-nu_e)*sigma*Eer3v1 - gamma_A * Aer3v1 - delta2_er*Aer3v1+ delta1_er*Aer3v0
dAeu3v1 = (1-nu_e)*sigma*Eeu3v1 - gamma_A * Aeu3v1 - delta2_eu*Aeu3v1+ delta1_eu*Aeu3v0
#Symptomatic
dIcr3v1 = nu_c*sigma*Ecr3v1 - gamma_I * Icr3v1
dIcu3v1 = nu_c*sigma*Ecu3v1 - gamma_I * Icu3v1
dIar3v1 = nu_a*sigma*Ear3v1 - gamma_I * Iar3v1
dIau3v1 = nu_a*sigma*Eau3v1 - gamma_I * Iau3v1
dIer3v1 = nu_e*sigma*Eer3v1 - gamma_I * Ier3v1
dIeu3v1 = nu_e*sigma*Eeu3v1 - gamma_I * Ieu3v1
# Hospitalized
dHcr3v1 = phi_cv1*gamma_I*Icr3v1 - gamma_H * Hcr3v1
dHcu3v1 = phi_cv1*gamma_I*Icu3v1 - gamma_H * Hcu3v1
dHar3v1 = phi_av1*gamma_I*Iar3v1 - gamma_H * Har3v1
dHau3v1 = phi_av1*gamma_I*Iau3v1 - gamma_H * Hau3v1
dHer3v1 = phi_ev1*gamma_I*Ier3v1 - gamma_H * Her3v1
dHeu3v1 = phi_ev1*gamma_I*Ieu3v1 - gamma_H * Heu3v1
# Recovered and seroconverted
dRpcr3v1 = pi*(1-phi_cv1)*gamma_I*Icr3v1 + pi*gamma_A*Acr3v1 + pi*(1-mu_c)*gamma_H*Hcr3v1 -kappa3*Rpcr3v1 - omega2_pc*Rpcr3v1 - delta2_cr*Rpcr3v1 + delta1_cr*Rpcr3v0+ delta1_cr*Rncr3v0*(rho_v2)
dRpcu3v1 = pi*(1-phi_cv1)*gamma_I*Icu3v1 + pi*gamma_A*Acu3v1 + pi*(1-mu_c)*gamma_H*Hcu3v1 -kappa3*Rpcu3v1 - omega2_pc*Rpcu3v1 - delta2_cu*Rpcu3v1 + delta1_cu*Rpcu3v0+ delta1_cu*Rncu3v0*(rho_v2)
dRpar3v1 = pi*(1-phi_av1)*gamma_I*Iar3v1 + pi*gamma_A*Aar3v1 + pi*(1-mu_a)*gamma_H*Har3v1 -kappa3*Rpar3v1 - omega2_pa*Rpar3v1 - delta2_ar*Rpar3v1 + delta1_ar*Rpar3v0 + delta1_ar*Rnar3v0*(rho_v2)
dRpau3v1 = pi*(1-phi_av1)*gamma_I*Iau3v1 + pi*gamma_A*Aau3v1 + pi*(1-mu_a)*gamma_H*Hau3v1 -kappa3*Rpau3v1 - omega2_pa*Rpau3v1 - delta2_au*Rpau3v1 + delta1_au*Rpau3v0+ delta1_au*Rnau3v0*(rho_v2)
dRper3v1 = pi*(1-phi_ev1)*gamma_I*Ier3v1 + pi*gamma_A*Aer3v1 + pi*(1-mu_e)*gamma_H*Her3v1 -kappa3*Rper3v1 - omega2_pe*Rper3v1 - delta2_er*Rper3v1 + delta1_er*Rper3v0+ delta1_er*Rner3v0*(rho_v2)
dRpeu3v1 = pi*(1-phi_ev1)*gamma_I*Ieu3v1 + pi*gamma_A*Aeu3v1 + pi*(1-mu_e)*gamma_H*Heu3v1 -kappa3*Rpeu3v1 - omega2_pe*Rpeu3v1 - delta2_eu*Rpeu3v1 + delta1_eu*Rpeu3v0+ delta1_eu*Rneu3v0*(rho_v2)
#Recovered and not seropositive
dRncr3v1 = (1-pi)*(1-phi_cv1)*gamma_I*Icr3v1 + (1-pi)*gamma_A*Acr3v1 + (1-pi)*(1-mu_c)*gamma_H*Hcr3v1 + kappa3*Rpcr3v1 - omega2_nc*Rncr3v1 - delta2_cr*Rncr3v1 + delta1_cr*Rncr3v0*(1-rho_v2)
dRncu3v1 = (1-pi)*(1-phi_cv1)*gamma_I*Icu3v1 + (1-pi)*gamma_A*Acu3v1 + (1-pi)*(1-mu_c)*gamma_H*Hcu3v1 + kappa3*Rpcu3v1 - omega2_nc*Rncu3v1 - delta2_cu*Rncu3v1 + delta1_cu*Rncu3v0*(1-rho_v2)