forked from ICRC-Models/HHCoM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvaxCEA.m
563 lines (516 loc) · 25.6 KB
/
vaxCEA.m
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
% function vaxCEA()
%% load results
paramDir = [pwd , '\Params\'];
load([paramDir, 'general'])
nSims = size(dir([pwd , '\HHCoM_Results\Vaccine\*.mat']) , 1);
curr = load([pwd , '\HHCoM_Results\toNow.mat']); % Population up to 2018
% helper functions
annlz = @(x) sum(reshape(x , stepsPerYear , size(x , 1) / stepsPerYear)); % sums 1 year worth of values
annAvg = @(x) sum(reshape(x , stepsPerYear , size(x , 1) / stepsPerYear)) ./ stepsPerYear; % finds average value of a quantity within a given year
% time
c = fix(clock); % get time
currYear = c(1); % get the current year from time
vaxResult = cell(nSims , 1);
parfor n = 1 : nSims
% load results from vaccine run into cell array
vaxResult{n} = load([pwd , '\HHCoM_Results\Vaccine\vaxSimResult' ,...
num2str(n), '.mat']);
% concatenate vectors/matrices of population up to 2018 to population
% matrices for years past 2018
vaxResult{n}.popVec = [curr.popVec(1 : end , :) ; vaxResult{n}.popVec];
vaxResult{n}.newHpv= [curr.newHpv(1 : end , : , : , : , :) ; vaxResult{n}.newHpv];
vaxResult{n}.newImmHpv= [curr.newImmHpv(1 : end , : , : , : , :) ; vaxResult{n}.newImmHpv];
% vaxResult{n}.ccDeath = [curr.ccDeath(1 : end - 1 , : , : , :) ; vaxResult{n}.ccDeath];
vaxResult{n}.newCC = [curr.newCC(1 : end , : , : , :) ; vaxResult{n}.newCC];
vaxResult{n}.newHiv = [curr.newHiv(1 : end , : , : , :) ; vaxResult{n}.newHiv];
vaxResult{n}.tVec = [curr.tVec(1 : end) , vaxResult{n}.tVec];
% vaxResult{n}.ccTreated = [curr.ccTreated(1 : end - 1) , vaxResult{n}.ccTreated];
end
% Find no vaccine scenario
noVaxInd = -1;
for n = 1 : nSims
if vaxResult{n}.vaxEff == 0
noVaxInd = n;
end
end
noV = vaxResult{noVaxInd};
tVec = noV.tVec;
tVecYr = tVec(1 : stepsPerYear : end);
%%
reset(0)
set(0 , 'defaultlinelinewidth' , 2)
%% Calculate life years saved
yrIntStart = 2018;
for n = 1 : length(vaxResult)
vaxResult{n}.ly = zeros((length(tVec) - length(curr.tVec)) , 1);
vaxResult{n}.daly = zeros((length(tVec) - length(curr.tVec)) , 1);
end
noV.ly = zeros((length(tVec) - length(curr.tVec)) , 1);
noV.daly = zeros((length(tVec) - length(curr.tVec)) , 1);
%% CC Costs
ccCost = [2617 , 8533 , 8570]; % local, regional, distant
ccDalyWeight = 1 - [0.288 , 0.288 , 0.288]; % corresponds to local, regional, distant CC
for i = 1 : (length(tVec) - length(curr.tVec))
% If y = current year, count benefits and CC treatment costs for women aged
% >= y - B, where B = last year eligible for inclusion
% Since 5 year age groups are being used, at each year y, count benefits
% for women in age group (round((y-B)/5)) and above.
a = min(max(round((tVec(i + length(curr.tVec) - 1) - yrIntStart) / 5) , 1) , age);
ageCounted = toInd(allcomb(1 : disease , 1 : viral , 1 : hpvTypes , 1 : hpvStates , ...
1 : periods , 2 , a : age , 1 : risk));
for n = 1 : length(vaxResult)
% CC Indices
localInds = toInd(allcomb(1 : disease , 1 : viral , 2 : hpvTypes , 5 , 1 : periods , ...
1 : gender , a : age , 1 : risk));
regionalInds = toInd(allcomb(1 : disease , 1 : viral , 2 : hpvTypes , 6 , 1 : periods , ...
1 : gender , a : age , 1 : risk));
distantInds = toInd(allcomb(1 : disease , 1 : viral , 2 : hpvTypes , 7 , 1 : periods , ...
1 : gender , a : age , 1 : risk));
% Count life years
vaxResult{n}.ly(i) = sum(vaxResult{n}.popVec(i + length(curr.tVec) - 1 , ageCounted) , 2);
% Count DALYs
% Adjust life years for CC by region according to disability
% weights
% calculate CC DALYs for each time step
cc_dalys = ...
sum(vaxResult{n}.popVec(i + length(curr.tVec) - 1 , localInds) , 2) .* ccDalyWeight(1) ...
+ sum(vaxResult{n}.popVec(i + length(curr.tVec) - 1 , regionalInds) , 2) .* ccDalyWeight(2)...
+ sum(vaxResult{n}.popVec(i + length(curr.tVec) - 1 , distantInds) , 2) .* ccDalyWeight(3);
% DALYs obtained by subtracting full life years corresponding to CC
% then adding DALYs corresponding to CC (done since LY already
% calculated above)
vaxResult{n}.daly(i) = vaxResult{n}.ly(i) ...
- (sum(vaxResult{n}.popVec(i + length(curr.tVec) - 1 , localInds) , 2) ... % subtract full LY corresponding to CC
+ sum(vaxResult{n}.popVec(i + length(curr.tVec) - 1 , regionalInds) , 2) ...
+ sum(vaxResult{n}.popVec(i + length(curr.tVec) - 1 , distantInds) , 2)) ...
+ cc_dalys; % Add CC DALYs
% Cervical cancer costs
vaxResult{n}.ccCosts(i) = ...
sum(sum(sum(vaxResult{n}.ccTreated(i , : , : , a : age , 1) , 2) , 3) , 4) .* ccCost(1) + ...
sum(sum(sum(vaxResult{n}.ccTreated(i , : , : , a : age , 2) , 2) , 3) , 4) .* ccCost(2) + ...
sum(sum(sum(vaxResult{n}.ccTreated(i , : , : , a : age , 3) , 2) , 3) , 4) .* ccCost(3);
end
% no vaccine scenario
% Count life years
noV.ly(i) = sum(noV.popVec(i + length(curr.tVec) - 1 , ageCounted) , 2);
cc_dalys = ...
sum(noV.popVec(i + length(curr.tVec) - 1 , localInds) , 2) .* ccDalyWeight(1) ...
+ sum(noV.popVec(i + length(curr.tVec) - 1 , regionalInds) , 2) .* ccDalyWeight(2)...
+ sum(noV.popVec(i + length(curr.tVec) - 1 , distantInds) , 2) .* ccDalyWeight(3);
% DALYs obtained by subtracting full life years corresponding to CC
% then adding DALYs corresponding to CC (done since LY already
% calculated above)
noV.daly(i) = noV.ly(i) ...
- (sum(noV.popVec(i + length(curr.tVec) - 1 , localInds) , 2) ... % subtract full LY corresponding to CC
+ sum(noV.popVec(i + length(curr.tVec) - 1 , regionalInds) , 2) ...
+ sum(noV.popVec(i + length(curr.tVec) - 1 , distantInds) , 2)) ...
+ cc_dalys; % Add CC DALYs
% Cervical cancer costs
noV.ccCosts(i) = sum(sum(sum(noV.ccTreated(i, : , : , a : age , 1) , 2) , 3) , 4) .* ccCost(1) + ...
sum(sum(sum(noV.ccTreated(i , : , : , a : age , 2) , 2) , 3) , 4) .* ccCost(2) + ...
sum(sum(sum(noV.ccTreated(i , : , : , a : age , 3) , 2) , 3) , 4) .* ccCost(3);
end
%%
for n = 1 : length(vaxResult)
vaxResult{n}.lys = vaxResult{n}.ly - noV.ly;
end
figure()
for n = 1 : length(vaxResult)
plot(tVec(length(curr.tVec) + 1 : end) , vaxResult{n}.lys , ...
'DisplayName' , ['Vaccine Efficacy: ' , ...
num2str(round(vaxResult{n}.vaxEff * 100)) ,'%, ' , ...
'Vaccine Coverage: ' , num2str(round(vaxResult{n}.vaxRate * 100)) ,'%'])
hold on
legend('-DynamicLegend' , 'Location' , 'NorthwestOutside')
end
figure()
for n = 1 : length(vaxResult)
plot(tVec(length(curr.tVec) + 1 : end) , sum(vaxResult{n}.popVec(length(curr.tVec) + 1 : end , :) , 2)...
-sum(noV.popVec(length(curr.tVec) + 1 : end , :),2), ...
'DisplayName' , ['Vaccine Efficacy: ' , ...
num2str(round(vaxResult{n}.vaxEff * 100)) ,'%, ' , ...
'Vaccine Coverage: ' , num2str(round(vaxResult{n}.vaxRate * 100)) ,'%'])
hold on
legend('-DynamicLegend' , 'Location' , 'NorthwestOutside')
end
for n = 1 : length(vaxResult)
vaxResult{n}.dalyPlus = vaxResult{n}.daly - noV.daly;
end
%% Calculate annual costs
% HIV Costs (Not used in ICER calculation. Included for completeness)
hospCost = [117 , 56 , 38 , 38]; % <200 , 200-350, >350 , on ART
artCost = 260;
% CC Costs (Incurred once per person at time of cervical cancer detection)
ccCost = [2617 , 8533 ,8570]; % local, regional, distant
% HIV Indices (Not used)
% above350Inds = toInd(allcomb(4 , 1 : viral , 1 : hpvTypes , 1 : hpvStates , 1 : periods , ...
% 1 : gender , 1 : age , 1 : risk));
% cd200_350Inds = toInd(allcomb(5 , 1 : viral , 1 : hpvTypes , 1 : hpvStates , 1 : periods , ...
% 1 : gender , 1 : age , 1 : risk));
% under200Inds = toInd(allcomb(6 , 1 : viral , 1 : hpvTypes , 1 : hpvStates , 1 : periods , ...
% 1 : gender , 1 : age , 1 : risk));
% artInds = toInd(allcomb(10 , 6 , 1 : hpvTypes , 1 : hpvStates , 1 : periods , ...
% 1 : gender , 1 : age , 1 : risk));
% Vaccination
discountRate = 0.03; % discount rate of 3% per annum
cost2v = 27; % cost of 2 doses of bivalent vaccine
import java.util.LinkedList
sims2v = LinkedList();
full9v = LinkedList();
full2v = LinkedList();
maxRate9vSim = -1;
maxRate2vSim = -1;
maxRate9v = -1;
maxRate2v = -1;
for n = 1 : length(vaxResult)
if vaxResult{n}.vaxEff <= 0.7 && vaxResult{n}.vaxEff > 0 % Vaccine efficacy <= 70% corresponds to 2v
sims2v.add(n); % save index of 2v scenarios
vaxResult{n}.vax2vCost = annlz(vaxResult{n}.vaxd) * cost2v;
vaxResult{n}.vax2vCostNPV = pvvar(vaxResult{n}.vax2vCost , discountRate); % NPV of vaccination cost
end
if vaxResult{n}.vaxEff == 0.85
full9v.add(n);
if vaxResult{n}.vaxRate > maxRate9v
maxRate9vSim = n;
maxRate9v = vaxResult{n}.vaxRate;
end
elseif vaxResult{n}.vaxEff == 0.65
full2v.add(n);
if vaxResult{n}.vaxRate > maxRate2v
maxRate2vSim = n;
maxRate2v = vaxResult{n}.vaxRate;
end
end
end
% %% Find price threshold for 9v (CC costs only)
% % 3 thresholds: 0.5x GDP , 1x GDP , 500 USD per LYS (BMGF)
% ceThreshold = 1540; % USD per LYS
% ceThresholds = [0.5 * ceThreshold , ceThreshold , 500];
%
% % Using Life years
% % High coverage scenario (9v vs 2v)
% for i = 1 : length(ceThresholds)
% priceGuess = 100; % Enter a price guess for 9v to seed the search process
% % ce9v is an anonymous function that finds the vaccine price that
% % places the 9v vaccine right at the cost-effectiveness threshold
% % specified by ceThresholds(i)
% ce9v = @(x) abs(pvvar(annlz(vaxResult{maxRate9vSim}.vaxd) * x - annlz(vaxResult{maxRate2vSim}.vaxd) .* cost2v ... % difference in vaccine cost for 9v vs 2v
% + annlz(vaxResult{maxRate9vSim}.ccCosts') - annlz(vaxResult{maxRate2vSim}.ccCosts') , discountRate) ... % difference in CC cost for 9v vs 2v scenario
% / pvvar(annAvg(vaxResult{maxRate9vSim}.lys) - annAvg(vaxResult{maxRate2vSim}.lys) , discountRate) - ceThresholds(i)); % difference in LYS for 9v vs 2v scenario
% priceThreshold_9v = fminsearch(ce9v , priceGuess);
% fprintf(['\n 9v vs 2v: Considering only CC costs, with a cost-effectiveness \n' , ...
% ' threshold of ' , num2str(ceThresholds(i)) , ' USD per LYS, ' ,...
% ' the unit cost of 9v vaccine must be less than or equal to \n ' , ...
% num2str(round(priceThreshold_9v , 2)),' USD. \n'])
% end
%
% disp(' ')
% % Using DALYs
% % High coverage scenario (9v vs 2v)
% for i = 1 : length(ceThresholds)
% priceGuess = 100; % Enter a price guess for 9v to seed the search process
% % ce9v is an anonymous function that finds the vaccine price that
% % places the 9v vaccine right at the cost-effectiveness threshold
% % specified by ceThresholds(i)
% ce9v = @(x) abs(pvvar(annlz(vaxResult{maxRate9vSim}.vaxd) * x - annlz(vaxResult{maxRate2vSim}.vaxd) .* cost2v ... % difference in vaccine cost for 9v vs 2v
% + annlz(vaxResult{maxRate9vSim}.ccCosts') - annlz(vaxResult{maxRate2vSim}.ccCosts') , discountRate) ... % difference in CC cost for 9v vs 2v scenario
% / pvvar(annAvg(vaxResult{maxRate9vSim}.daly) - annAvg(vaxResult{maxRate2vSim}.daly) , discountRate) - ceThresholds(i)); % difference in DALYs for 9v vs 2v scenario
% priceThreshold_9v = fminsearch(ce9v , priceGuess);
% fprintf(['\n 9v vs 2v: Considering only CC costs, with a cost-effectiveness \n' , ...
% ' threshold of ' , num2str(ceThresholds(i)) , ' USD per DALY, ' ,...
% ' the unit cost of 9v vaccine must be less than or equal to \n ' , ...
% num2str(round(priceThreshold_9v , 2)),' USD.\n'])
% end
%% YLS
% figure()
% plot(tVec(1 : stepsPerYear : end) , annlz(c90_9vFull.vaxd))
% title('Vaccinated with 9v'); xlabel('Year'); ylabel('Number vaccinated')
%% CC incidence reduction
inds = {':' , [2 : 6 , 10] , [2 : 6] , 1 , 10};
files = {'CEA CC_General_Hpv_VaxCover' , 'CEA CC_HivAll_Hpv_VaxCover' , ...
'CEA CC_HivNoART_Hpv_VaxCover' , 'CEA CC_HivNeg_Hpv_VaxCover' ,...
'CEA CC_ART_HPV_VaxCover'};
plotTits = {'General' , 'HIV-Positive' , 'HIV-Positive (No ART)' , ....
'HIV-Negative' , 'HIV-Positive on ART'};
fac = 10 ^ 5;
% noV = zeros(1 , (length(tVec) - stepsPerYear + 1) / stepsPerYear);
% % c70_2vPartial_Inc = noV_Hpv;
% % c90_9vFullInc = noV_HpvAge;
% % c90_2vFullInc = noV_HpvAge;
% % v90_2vFullInc = noV_HpvAge;
figure()
for i = 1 : length(inds)
% general
allF = [toInd(allcomb(1 : disease , 1 : viral , 1 : hpvTypes , 1 : 4 , ...
1 : periods , 2 , 4 : age , 1 : risk)); ...
toInd(allcomb(1 : disease , 1 : viral , 1 : hpvTypes , 9 : 10 , ...
1 : periods , 2 , 4 : age , 1 : risk))];
% All HIV-positive women
allHivF = [toInd(allcomb(2 : 6 , 1 : viral , 1 : hpvTypes , 1 : 4 , ...
1 : periods , 2 , 4 : age , 1 : risk)); ...
toInd(allcomb(2 : 6 , 1 : viral , 1 : hpvTypes , 9 : 10 , ...
1 : periods , 2 , 4 : age , 1 : risk));...
toInd(allcomb(10 , 6 , 1 : hpvTypes , 1 : 4 , ...
1 : periods , 2 , 4 : age , 1 : risk)); ...
toInd(allcomb(10 , 6 , 1 : hpvTypes , 9 : 10 , ...
1 : periods , 2 , 4 : age , 1 : risk))];
% HIV-positive women not on ART
hivNoARTF = [toInd(allcomb(2 : 6 , 1 : viral , 1 : hpvTypes , 1 : 4 , ...
1 : periods , 2 , 4 : age , 1 : risk)); ...
toInd(allcomb(2 : 6 , 1 : viral , 1 : hpvTypes , 9 : 10 , ...
1 : periods , 2 , 4 : age , 1 : risk))];
% All HIV-negative women
hivNeg = [toInd(allcomb(1 , 1 : viral , 1 : hpvTypes , 1 : 4 , 1 : periods , ...
2 , 4 : age , 1 : risk)); ...
toInd(allcomb(1 , 1 : viral , 1 : hpvTypes , 9 : 10 , 1 : periods , ...
2 , 4 : age , 1 : risk))];
% Women on ART
artF = [toInd(allcomb(10 , 6 , 1 : hpvTypes , 1 : 4 , ...
1 : periods , 2 , 4 : age , 1 : risk)); ...
toInd(allcomb(10 , 6 , 1 : hpvTypes , 9 : 10 , ...
1 : periods , 2 , 4 : age , 1 : risk))];
genArray = {allF , allHivF , hivNoARTF , hivNeg , artF};
noV.ccInc = ...
annlz(sum(sum(sum(noV.newCC(: , inds{i} , : , 4 : age),2),3),4)) ./ ...
(annlz(sum(noV.popVec(: , genArray{i}) , 2) ./ stepsPerYear))* fac;
figure()
plot(tVec(1 : stepsPerYear : end) , noV.ccInc ,'DisplayName' , ...
['Efficacy: ' , num2str(round(vaxResult{n}.vaxEff * 100)) '% ,', ...
'Coverage: ' , num2str(round(vaxResult{n}.vaxRate * 100)) , '%'])
legend('-DynamicLegend')
hold on
for n = 1 : length(vaxResult)
vaxResult{n}.ccInc = ...
annlz(sum(sum(sum(vaxResult{n}.newCC(: , inds{i} , : , 4 : age),2),3),4)) ./ ...
(annlz(sum(vaxResult{n}.popVec(: , genArray{i}) , 2) ./ stepsPerYear)) * fac;
plot(tVec(1 : stepsPerYear : end) , vaxResult{n}.ccInc , 'DisplayName' , ...
['Efficacy: ' , num2str(round(vaxResult{n}.vaxEff * 100)) '% ,', ...
'Coverage: ' , num2str(round(vaxResult{n}.vaxRate * 100)) , '%'])
fname = ['Efficacy' , num2str(round(vaxResult{n}.vaxEff * 100)) , ...
'Coverage' , num2str(round(vaxResult{n}.vaxRate * 100)) , '.xlsx'];
hold on
if exist(fname , 'file') == 2
M = xlsread(fname);
M = catpad(2 , [tVec(1 : stepsPerYear : end)' , vaxResult{n}.ccInc'] , M);
xlswrite(fname , M , 'CC Incidence')
% dlmwrite(fname , [tVec(1 : stepsPerYear : end)' , vaxResult{n}.ccInc'] , ...
% '-append' , 'delimiter' , ',' , 'coffset' , 1)
else
xlswrite(fname , [tVec(1 : stepsPerYear : end)' , ...
vaxResult{n}.ccInc'] , 'CC Incidence')
end
end
title([plotTits{i} , ' Cervical Cancer Incidence'])
xlabel('Year'); ylabel('Incidence per 100,000')
hold off
% Reduction
figure()
for n = 1 : length(vaxResult)
vaxResult{n}.ccRed = (vaxResult{n}.ccInc - noV.ccInc) ./ noV.ccInc * 100;
plot(tVec(1 : stepsPerYear : end) , vaxResult{n}.ccRed , 'DisplayName' , ...
['Efficacy ' , num2str(round(vaxResult{n}.vaxEff * 100)) '% ,', ...
'Coverage ' , num2str(round(vaxResult{n}.vaxRate * 100)) , '%'])
legend('-DynamicLegend')
hold on
fname = ['Efficacy' , num2str(round(vaxResult{n}.vaxEff * 100)) , ...
'Coverage' , num2str(round(vaxResult{n}.vaxRate * 100)) , '.xlsx'];
if exist(fname , 'file') == 2
M = xlsread(fname);
M = catpad(2 , [tVec(1 : stepsPerYear : end)' , vaxResult{n}.ccRed'] , M);
xlswrite(fname , M , 'CC Reduction')
% dlmwrite(fname , [tVec(1 : stepsPerYear : end)' , vaxResult{n}.ccRed'] , ...
% '-append' , 'delimiter' , ',' , 'coffset' , 1)
else
xlswrite(fname , [tVec(1 : stepsPerYear : end)' , vaxResult{n}.ccRed']...
, 'CC Reduction')
end
title([plotTits{i} , ' Cervical Cancer Incidence Reduction'])
xlabel('Year'); ylabel('Reduction (%)')
end
hold off
end
% %%
%% CC Mortality
%% CC mortality reduction
inds = {':' , [2 : 6 , 10] , [2 : 6] , 1 , 10};
files = {'CEA CC_General_Hpv_VaxCover' , 'CEA CC_HivAll_Hpv_VaxCover' , ...
'CEA CC_HivNoART_Hpv_VaxCover' , 'CEA CC_HivNeg_Hpv_VaxCover' ,...
'CEA CC_ART_HPV_VaxCover'};
plotTits = {'General' , 'HIV-Positive' , 'HIV-Positive (No ART)' , ....
'HIV-Negative' , 'HIV-Positive on ART'};
fac = 10 ^ 5;
% noV = zeros(1 , (length(tVec) - stepsPerYear + 1) / stepsPerYear);
% % c70_2vPartial_Inc = noV_Hpv;
% % c90_9vFullInc = noV_HpvAge;
% % c90_2vFullInc = noV_HpvAge;
% % v90_2vFullInc = noV_HpvAge;
figure()
for i = 1 : length(inds)
% general
allF = toInd(allcomb(1 : disease , 1 : viral , 1 : hpvTypes , 1 : hpvStates , ...
1 : periods , 2 , 4 : age , 1 : risk));
% All HIV-positive women
allHivF = [toInd(allcomb(2 : 6 , 1 : viral , 1 : hpvTypes , 1 : hpvStates , ...
1 : periods , 2 , 4 : age , 1 : risk)); ...
toInd(allcomb(10 , 6 , 1 : hpvTypes , 1 : hpvStates , ...
1 : periods , 2 , 4 : age , 1 : risk))];
% HIV-positive women not on ART
hivNoARTF = toInd(allcomb(2 : 6 , 1 : viral , 1 : hpvTypes , 1 : hpvStates , ...
1 : periods , 2 , 4 : age , 1 : risk));
% All HIV-negative women
hivNeg = toInd(allcomb(1 , 1 : viral , 1 : hpvTypes , 1 : hpvStates , 1 : periods , ...
2 , 4 : age , 1 : risk));
% Women on ART
artF = toInd(allcomb(10 , 6 , 1 : hpvTypes , 1 : hpvStates , ...
1 : periods , 2 , 4 : age , 1 : risk));
genArray = {allF , allHivF , hivNoARTF , hivNeg , artF};
noV.ccMort = ...
annlz(sum(sum(sum(noV.ccDeath(: , inds{i} , : , 4 : age),2),3),4)) ./ ...
(annlz(sum(noV.popVec(length(curr.tVec) + 1 : end , genArray{i}) , 2) ./ stepsPerYear))* fac;
figure()
plot(tVec(length(curr.tVec) + 1 : stepsPerYear : end) , noV.ccMort ,'DisplayName' , ...
['Efficacy: ' , num2str(round(vaxResult{n}.vaxEff * 100)) '% ,', ...
'Coverage: ' , num2str(round(vaxResult{n}.vaxRate * 100)) , '%'])
legend('-DynamicLegend')
hold on
for n = 1 : length(vaxResult)
vaxResult{n}.ccMort = ...
annlz(sum(sum(sum(vaxResult{n}.ccDeath(: , inds{i} , : , 4 : age),2),3),4)) ./ ...
(annlz(sum(vaxResult{n}.popVec(length(curr.tVec) + 1 : end , genArray{i}) , 2) ./ stepsPerYear)) * fac;
plot(tVec(length(curr.tVec) + 1 : stepsPerYear : end) , vaxResult{n}.ccMort , 'DisplayName' , ...
['Efficacy: ' , num2str(round(vaxResult{n}.vaxEff * 100)) '% ,', ...
'Coverage: ' , num2str(round(vaxResult{n}.vaxRate * 100)) , '%'])
hold on
fname = ['Efficacy' , num2str(round(vaxResult{n}.vaxEff * 100)) , ...
'Coverage' , num2str(round(vaxResult{n}.vaxRate * 100)) , '.xlsx'];
if exist(fname , 'file') == 2
M = xlsread(fname);
M = catpad(2 , [tVec(length(curr.tVec) + 1 : stepsPerYear : end)' , vaxResult{n}.ccMort'] , M);
xlswrite(fname , M , 'CC Mortality')
% dlmwrite(fname , [tVec(length(curr.tVec) + 1 : stepsPerYear : end)' , vaxResult{n}.ccMort'] , ...
% '-append' , 'delimiter' , ',' , 'coffset' , 1)
else
xlswrite(fname , [tVec(length(curr.tVec) + 1 : stepsPerYear : end)' , vaxResult{n}.ccMort'] , 'CC Mortality')
end
end
title([plotTits{i} , ' Cervical Cancer Mortality'])
xlabel('Year'); ylabel('Mortality per 100,000')
hold off
% Reduction
figure()
for n = 1 : length(vaxResult)
vaxResult{n}.ccMortRed = (vaxResult{n}.ccMort - noV.ccMort) ./ noV.ccMort * 100;
plot(tVec(length(curr.tVec) + 1 : stepsPerYear : end) , vaxResult{n}.ccMortRed , 'DisplayName' , ...
['Efficacy: ' , num2str(round(vaxResult{n}.vaxEff * 100)) '% ,', ...
'Coverage: ' , num2str(round(vaxResult{n}.vaxRate * 100)) , '%'])
legend('-DynamicLegend')
hold on
title([plotTits{i} , ' Cervical Cancer Mortality Reduction'])
xlabel('Year'); ylabel('Reduction (%)')
fname = ['Efficacy' , num2str(round(vaxResult{n}.vaxEff * 100)) , ...
'Coverage' , num2str(round(vaxResult{n}.vaxRate * 100)) , '.xlsx'];
if exist(fname , 'file') == 2
M = xlsread(fname);
M = catpad(2 , [tVec(length(curr.tVec) + 1 : stepsPerYear : end)' , vaxResult{n}.ccMortRed'] , M);
xlswrite(fname , M , 'CC Mortality Reduction')
% dlmwrite(fname , [tVec(length(curr.tVec) + 1 : stepsPerYear : end)' , vaxResult{n}.ccMortRed'] , ...
% '-append' , 'delimiter' , ',' ,'coffset' , 1)
else
xlswrite(fname , [tVec(length(curr.tVec) + 1 : stepsPerYear : end)' , vaxResult{n}.ccMortRed'] , ...
'CC Mortality Reduction')
end
end
hold off
end
%% Population Size
figure()
for n = 1 : length(vaxResult)
plot(tVec , sum(vaxResult{n}.popVec , 2) , 'DisplayName' , ...
['Efficacy: ' , num2str(round(vaxResult{n}.vaxEff * 100)) '% ,', ...
'Coverage: ' , num2str(round(vaxResult{n}.vaxRate * 100)) , '%'])
legend('-DynamicLegend')
hold on
end
title('Population Size')
xlabel('Year'); ylabel('Individuals')
hold off
%%
figure()
for g = 1 : 2
artInds = toInd(allcomb(10 , 6 , 1 : hpvTypes , 1 : hpvStates , ...
1 : periods , g , 4 : 10 , 1 : risk));
artPop = sum(noV.popVec(: , artInds) , 2);
hivInds = toInd(allcomb(2 : 6 , 1 : viral , 1 : hpvTypes , 1 : hpvStates, ...
1 : periods , g , 4 : 10 , 1 : risk));
hivPop = sum(noV.popVec(: , hivInds) , 2);
plot(tVec , 100 * artPop ./ (hivPop + artPop))
hold on
end
xlabel('Year')
ylabel('Proportion of HIV Population')
title('Proportion on ART')
legend('Model (Male)' , 'Model (Female)')
%
% %%
% figure()
% for g = 1 : 2
% artInds = toInd(allcomb(10 , 6 , 1 : hpvTypes , 1 : hpvStates , ...
% 1 : periods , g , 4 : 10 , 1 : risk));
% artPop = sum(noV.popVec(: , artInds) , 2);
% hivInds = toInd(allcomb(2 : 6 , 1 : viral , 1 : hpvTypes , 1 : hpvStates, ...
% 1 : periods , g , 4 : 10 , 1 : risk));
% allInds = toInd(allcomb(1 : disease , 1 : viral , 1 : hpvTypes , 1 : hpvStates, ...
% 1 : periods , g , 4 : 10 , 1 : risk));
% hivPop = sum(noV.popVec(: , hivInds) , 2);
% allPop = sum(noV.popVec(: , allInds) , 2);
% plot(tVec , 100 * (hivPop + artPop) ./ allPop)
% hold on
% end
% xlabel('Year')
% ylabel('Prevalence')
% title('HIV Prevalence')
% %%
% hold on
% for g = 1 : 2
% artInds = toInd(allcomb(10 , 6 , 1 : hpvTypes , 1 : hpvStates , ...
% 1 : periods , g , 4 : 10 , 1 : risk));
% artPop = sum(c90_2vFull.popVec(: , artInds) , 2);
% hivInds = toInd(allcomb(2 : 6 , 1 : viral , 1 : hpvTypes , 1 : hpvStates, ...
% 1 : periods , g , 4 : 10 , 1 : risk));
% allInds = toInd(allcomb(1 : disease , 1 : viral , 1 : hpvTypes , 1 : hpvStates, ...
% 1 : periods , g , 4 : 10 , 1 : risk));
% hivPop = sum(c90_2vFull.popVec(: , hivInds) , 2);
% allPop = sum(c90_2vFull.popVec(: , allInds) , 2);
% plot(tVec , 100 * (hivPop + artPop) ./ allPop)
% hold on
% end
% legend('Male' , 'Female' , 'Male Vax' , 'Female Vax')
%
% %%
% figure()
% for g = 1 : 2
% hivSusInds = [toInd(allcomb(1 , 1 , 1 : hpvTypes , 1 : hpvStates , ...
% 1 : periods , g , 4 : 10 , 1 : risk)); ...
% toInd(allcomb(7 : 9 , 1 , 1 : hpvTypes , 1 : hpvStates , ...
% 1 : periods , g , 4 : 10 , 1 : risk))];
% hivSus = annlz(sum(c90_2vFull.popVec(: , hivSusInds) , 2)) ./ stepsPerYear;
% plot(tVec(1 : stepsPerYear : end) , ...
% annlz(sum(sum(c90_2vFull.newHiv(: , g , 4 : 10 , :) ...
% , 3) , 4)) ./ hivSus * 100)
% hold on
% end
%
% xlabel('Year'); ylabel('Rate Per 100'); title('HIV Incidence')
% hold on
%
% for g = 1 : 2
% hivSusInds = [toInd(allcomb(1 , 1 , 1 : hpvTypes , 1 : hpvStates , ...
% 1 : periods , g , 4 : 10 , 1 : risk)); ...
% toInd(allcomb(7 : 9 , 1 , 1 : hpvTypes , 1 : hpvStates , ...
% 1 : periods , g , 4 : 10 , 1 : risk))];
% hivSusNo = annlz(sum(noV.popVec(: , hivSusInds) , 2)) ./ stepsPerYear;
% plot(tVec(1 : stepsPerYear : end) , ...
% annlz(sum(sum(noV.newHiv(: , g , 4 : 10 , :) ...
% , 3) , 4)) ./ hivSusNo * 100 )
% end
% legend('Male' , 'Female' , 'Male No Vax' , 'Female No vax')