evaluate(model, log = list(level=1,type='html'))

Running Model:


Reading in Tabular Data:

AE_costs:
AE Cost
Lymphopenia 167
ALT increased 376
Cholelithiasis 4427
Influenza 5013
Serious infection 10251
Trigeminal neuralgia 7858
Depression 4224
PML 30591
AE_disutilities:
AE Utility
Lymphopenia 0.000
ALT Increased 0.000
Cholelithiasis -0.005
Influenza -0.016
Serious Infection -0.005
Trigeminal Neuralgia -0.440
Depression -0.560
PML -0.400
AE_Incidence_2L:
AE Lymphopenia ALT Increased Cholelithiasis Influenza Serious Infection Trigeminal Neuralgia Depression PML
Siponimod 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0e+00
Alemtuzumab 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0e+00
Dimethyl fumarate 0.00 0.00 0.00 0.00 0.01 0.00 0.00 0e+00
Fingolimod 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0e+00
Glatiramer acetate 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0e+00
Rebif 22 0.01 0.00 0.01 0.01 0.00 0.01 0.01 0e+00
Rebif 44 0.01 0.00 0.01 0.01 0.00 0.01 0.01 0e+00
Avonex 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0e+00
Betaferon 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0e+00
Peginterferon beta-1a 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0e+00
Natalizumab 0.00 0.00 0.00 0.00 0.00 0.00 0.00 3e-04
Teriflunomide (7mg) 0.00 0.01 0.00 0.00 0.00 0.00 0.00 0e+00
Teriflunomide (14mg) 0.00 0.01 0.00 0.00 0.00 0.00 0.00 0e+00
Ocrelizumab 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0e+00
Supportive care 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0e+00
AE_incidence_one_off:
AE Siponimod Alemtuzumab Dimethyl fumarate Fingolimod Glatiramer acetate Rebif 22 Rebif 44 Avonex Betaferon Peginterferon beta-1a Natalizumab Teriflunomide (7mg) Teriflunomide (14mg) Ocrelizumab Supportive care
Lymphopenia 0 0 0.00 0 0 0.01 0.01 0 0 0 0e+00 0.00 0.00 0 0
ALT Increased 0 0 0.00 0 0 0.00 0.00 0 0 0 0e+00 0.01 0.01 0 0
Cholelithiasis 0 0 0.00 0 0 0.01 0.01 0 0 0 0e+00 0.00 0.00 0 0
Influenza 0 0 0.00 0 0 0.01 0.01 0 0 0 0e+00 0.00 0.00 0 0
Serious Infection 0 0 0.01 0 0 0.00 0.00 0 0 0 0e+00 0.00 0.00 0 0
Trigeminal Neuralgia 0 0 0.00 0 0 0.01 0.01 0 0 0 0e+00 0.00 0.00 0 0
Depression 0 0 0.00 0 0 0.01 0.01 0 0 0 0e+00 0.00 0.00 0 0
PML 0 0 0.00 0 0 0.00 0.00 0 0 0 3e-04 0.00 0.00 0 0
Discontinuation:
Regimen Year 1 Year 2+
Siponimod 0.094 0.094
Alemtuzumab 0.023 0.023
Dimethyl fumarate 0.133 0.133
Fingolimod 0.084 0.084
Glatiramer acetate 0.052 0.052
Rebif 22 0.056 0.056
Rebif 44 0.086 0.086
Avonex 0.053 0.053
Betaferon 0.044 0.044
Peginterferon beta-1a 0.049 0.049
Natalizumab 0.049 0.049
Teriflunomide (7mg) 0.123 0.123
Teriflunomide (14mg) 0.127 0.127
Ocrelizumab 0.050 0.050
Supportive care 0.000 0.000
EDSS_costs:
EDSS Direct costs Indirect costs
RRMS 0 2825 10711
RRMS 1 4856 14653
RRMS 2 6887 18595
RRMS 3 8917 22537
RRMS 4 10948 26480
RRMS 5 12979 30422
RRMS 6 15010 34364
RRMS 7 17041 38306
RRMS 8 19071 42249
RRMS 9 21102 46191
SPMS 0 2825 10711
SPMS 1 4856 14653
SPMS 2 6887 18595
SPMS 3 8917 22537
SPMS 4 10948 26480
SPMS 5 12979 30422
SPMS 6 15010 34364
SPMS 7 17041 38306
SPMS 8 19071 42249
SPMS 9 21102 46191
EDSS_distribution:
EDSS
0
1
2
3
4
5
6
7
8
9
EDSS_RR_mortality:
EDSS RR
0 1.00
1 1.43
2 1.60
3 1.64
4 1.67
5 1.84
6 2.27
7 3.10
8 4.45
9 6.45
EDSS_Utilities:
EDSS RRMS Utility SPMS Utility
0 0.8752 1.0000
1 0.8342 0.7905
2 0.7802 0.7365
3 0.6946 0.6509
4 0.6253 0.5816
5 0.5442 0.5005
6 0.4555 0.4118
7 0.3437 0.3000
8 0.0023 -0.0413
9 -0.1701 -0.2138
Monitoring_costs:
Regimen Year 1 Year 2+
Siponimod 175.00 0.00
Alemtuzumab 0.00 0.00
Dimethyl fumarate 58.54 38.36
Fingolimod 337.80 155.44
Glatiramer acetate 0.00 0.00
Rebif 22 118.08 78.72
Rebif 44 118.08 78.72
Avonex 118.08 78.72
Betaferon 118.08 78.72
Peginterferon beta-1a 78.72 78.72
Natalizumab 1047.28 1047.28
Teriflunomide (7mg) 117.84 0.00
Teriflunomide (14mg) 117.84 0.00
Ocrelizumab 0.00 0.00
Supportive care 0.00 0.00
Mortality_table:
age male female
0 0.006575 0.005516
1 0.000445 0.000382
2 0.000301 0.000225
3 0.000240 0.000175
4 0.000183 0.000151
5 0.000169 0.000132
6 0.000150 0.000117
7 0.000134 0.000106
8 0.000115 0.000096
9 0.000097 0.000088
10 0.000085 0.000084
11 0.000092 0.000087
12 0.000132 0.000102
13 0.000213 0.000129
14 0.000323 0.000166
15 0.000439 0.000207
16 0.000552 0.000247
17 0.000675 0.000286
18 0.000807 0.000320
19 0.000942 0.000351
20 0.001085 0.000384
21 0.001216 0.000416
22 0.001310 0.000445
23 0.001353 0.000467
24 0.001358 0.000486
25 0.001351 0.000505
26 0.001349 0.000526
27 0.001353 0.000553
28 0.001371 0.000587
29 0.001399 0.000627
30 0.001432 0.000673
31 0.001464 0.000721
32 0.001496 0.000766
33 0.001528 0.000805
34 0.001563 0.000842
35 0.001613 0.000888
36 0.001682 0.000947
37 0.001764 0.001017
38 0.001857 0.001099
39 0.001964 0.001192
40 0.002083 0.001291
41 0.002227 0.001402
42 0.002414 0.001535
43 0.002653 0.001695
44 0.002939 0.001879
45 0.003243 0.002070
46 0.003563 0.002268
47 0.003922 0.002486
48 0.004320 0.002725
49 0.004749 0.002977
50 0.005193 0.003245
51 0.005647 0.003514
52 0.006122 0.003776
53 0.006630 0.004029
54 0.007181 0.004289
55 0.007779 0.004564
56 0.008415 0.004875
57 0.009074 0.005234
58 0.009727 0.005647
59 0.010371 0.006103
60 0.011034 0.006589
61 0.011738 0.007104
62 0.012489 0.007665
63 0.013335 0.008303
64 0.014319 0.009050
65 0.015482 0.009953
66 0.016824 0.011001
67 0.018330 0.012124
68 0.019900 0.013250
69 0.021539 0.014419
70 0.023396 0.015718
71 0.025476 0.017201
72 0.027794 0.018896
73 0.030350 0.020818
74 0.033204 0.022996
75 0.036345 0.025387
76 0.039788 0.028090
77 0.043720 0.031225
78 0.048335 0.034786
79 0.053650 0.038792
80 0.059565 0.043109
81 0.065848 0.047800
82 0.072956 0.053181
83 0.080741 0.059365
84 0.089357 0.066859
85 0.099650 0.075391
86 0.110901 0.084744
87 0.123146 0.095072
88 0.136412 0.106427
89 0.150710 0.118857
90 0.166038 0.132396
91 0.182374 0.147063
92 0.199676 0.162859
93 0.217880 0.179765
94 0.236903 0.197737
95 0.256636 0.216706
96 0.276954 0.236577
97 0.297713 0.257228
98 0.318755 0.278515
99 0.339914 0.300271
100 1.000000 1.000000
Progression_RRMS:
0 1 2 3 4 5 6 7 8 9 EDSS
0.311 0.289 0.312 0.070 0.016 0.001 0.000 0.000 0.000 0.000 0
0.178 0.231 0.419 0.127 0.039 0.004 0.001 0.000 0.000 0.000 1
0.060 0.130 0.493 0.215 0.088 0.011 0.002 0.000 0.000 0.000 2
0.019 0.055 0.299 0.322 0.241 0.044 0.013 0.003 0.004 0.000 3
0.005 0.017 0.127 0.251 0.411 0.121 0.048 0.014 0.007 0.000 4
0.001 0.004 0.033 0.096 0.252 0.295 0.211 0.085 0.023 0.000 5
0.000 0.001 0.009 0.034 0.123 0.257 0.329 0.190 0.056 0.001 6
0.000 0.000 0.003 0.013 0.057 0.169 0.309 0.257 0.189 0.004 7
0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.995 0.005 8
0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 1.000 9
Progression_SPMS:
0 1 2 3 4 5 6 7 8 9 EDSS
0 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0
0 0.769 0.154 0.077 0.000 0.000 0.000 0.000 0.000 0.000 1
0 0.000 0.636 0.271 0.062 0.023 0.008 0.000 0.000 0.000 2
0 0.000 0.000 0.629 0.253 0.077 0.033 0.003 0.005 0.000 3
0 0.000 0.000 0.000 0.485 0.350 0.139 0.007 0.018 0.000 4
0 0.000 0.000 0.000 0.000 0.633 0.317 0.022 0.026 0.002 5
0 0.000 0.000 0.000 0.000 0.000 0.763 0.190 0.045 0.002 6
0 0.000 0.000 0.000 0.000 0.000 0.000 0.805 0.189 0.006 7
0 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.926 0.074 8
0 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 1.000 9
Regimen:
Regimen Units Year 1 Units Year 2 Units Year 3+
Siponimod 1.000 1.000 1.000
Alemtuzumab 5.000 3.000 0.000
Dimethyl fumarate 723.500 730.500 730.500
Fingolimod 365.250 365.250 365.250
Glatiramer acetate 365.250 365.250 365.250
Rebif 22 156.000 156.000 156.000
Rebif 44 156.000 156.000 156.000
Avonex 52.000 52.000 52.000
Betaferon 182.625 182.625 182.625
Peginterferon beta-1a 26.000 26.000 26.000
Natalizumab 13.000 13.000 13.000
Teriflunomide (7mg) 10.000 10.000 10.000
Teriflunomide (14mg) 365.250 365.250 365.250
Ocrelizumab 4.000 4.000 4.000
Supportive care 0.000 0.000 0.000
Relapse_rates:
EDSS Relapse Rate, RRMS Relapse Rate, SPMS
0 0.71 0.00
1 0.73 0.00
2 0.68 0.47
3 0.72 0.88
4 0.71 0.55
5 0.59 0.52
6 0.49 0.45
7 0.51 0.34
8 0.51 0.34
9 0.51 0.34
Relapse_RR:
Item Rate ratio
Siponimod 0.34
Alemtuzumab 0.28
Dimethyl fumarate 0.53
Fingolimod 0.46
Glatiramer acetate 0.63
Rebif 22 0.70
Rebif 44 0.64
Avonex 0.83
Betaferon 0.65
Peginterferon beta-1a 0.63
Natalizumab 0.31
Teriflunomide (7mg) 0.77
Teriflunomide (14mg) 0.67
Ocrelizumab 0.35
Supportive care 1.00
Relapse_values:
Relapse Utility Direct cost Indirect cost
Mild/moderate -0.091 2692 2339
Severe -0.302 2692 2339
Risk_of_progression:
Regimen Relative risk
Siponimod 0.68
Alemtuzumab 0.42
Dimethyl fumarate 0.62
Fingolimod 0.68
Glatiramer acetate 0.74
Rebif 22 0.81
Rebif 44 0.73
Avonex 0.79
Betaferon 0.66
Peginterferon beta-1a 0.63
Natalizumab 0.56
Teriflunomide (7mg) 0.86
Teriflunomide (14mg) 0.72
Ocrelizumab 0.47
Supportive care 1.00
Rx_costs:
Regimen Package* WAC Package Cost* Cost per package Discount Multiplier, Year 1 Multiplier, Year 2+ Default cost, Year 1* Default cost, Year 2+ Cost per admin, Year 1 Cost per admin, Year 2+
Siponimod 0 0 68000.00 0.00 1.00 1.00 0 0 0 0
Alemtuzumab 10 mg/ 1 ml 22903.86 / 1.2 ml 22903.86 0.05 5.00 3.00 $108,793 $65,276 694 416
Dimethyl fumarate 240 mg 7807.45 / 60EA 7807.45 0.10 12.17 12.17 $85,492 $85,492 0 0
Fingolimod 0.5 mg 7857.07 / 30EA 7857.07 0.10 12.17 12.17 $86,035 $86,035 0 0
Glatiramer acetate 20 mg/ 1 ml 1950.00 / 30EA 1950.00 0.00 12.17 12.17 $23,725 $23,725 0 0
Rebif 22 22 mcg / 0.5 ml 7607.64 / 0.5 12EA 7607.64 0.15 13.04 13.04 $84,295 $84,295 0 0
Rebif 44 44 mcg / 0.5 ml 7607.64 / 0.5 12EA 7607.64 0.15 13.04 13.04 $84,295 $84,295 0 0
Avonex 30 mcg 6925.75 / 4EA 6925.75 0.20 13.04 13.04 $72,226 $72,226 0 0
Betaferon 0.3 mg 7596.85 / 14EA 7596.85 0.35 13.04 13.04 $64,370 $64,370 0 0
Peginterferon beta-1a 125 mcg/ 0.5ml 6925.75 / 1 ml 6925.75 0.10 13.04 13.04 $81,254 $81,254 0 0
Natalizumab 20 mg/ 1 ml 6369.30 / 15 ml 6369.30 0.05 13.04 13.04 $78,877 $78,877 949 949
Teriflunomide (7mg) 7 mg 6816.12 / 28EA 6816.12 0.10 13.04 13.04 $79,968 $79,968 0 0
Teriflunomide (14mg) 14 mg 6816.12 / 28EA 6816.12 0.10 13.04 13.04 $79,968 $79,968 0 0
Ocrelizumab NA 57.08 / 1 mg 57.08 0.00 1200.00 1200.00 $68,496 $68,496 489 301
Supportive care 0 0 0.00 0.00 0.00 0.00 0 0 0 0
SPMS_conversion:
Initial EDSS Probability of Transitioning to SPMS
EDSS 0 0.000
EDSS 1 0.003
EDSS 2 0.032
EDSS 3 0.117
EDSS 4 0.210
EDSS 5 0.299
EDSS 6 0.237
EDSS 7 0.254
EDSS 8 0.153
EDSS 9 1.000
Weights_2L:
Regimen Siponimod Alemtuzumab Dimethyl fumarate Fingolimod Glatiramer acetate Rebif 22 Rebif 44 Avonex Betaferon Peginterferon beta-1a Natalizumab Teriflunomide (7mg) Teriflunomide (14mg) Ocrelizumab Supportive care
Siponimod 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Alemtuzumab 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0
Dimethyl fumarate 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0
Fingolimod 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Glatiramer acetate 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Rebif 22 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Rebif 44 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Avonex 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Betaferon 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Peginterferon beta-1a 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0
Natalizumab 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Teriflunomide (7mg) 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0
Teriflunomide (14mg) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Ocrelizumab 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Supportive care 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

Running R Scripts:

Running: script1:
Running: script2:

test

# myFunc <- function() {
#   cat("#' ## Title")
# }
# 
# myFunc()
# 
# test_df <- data.frame(a = rep(5.424, 72))
# 
# lookup_tbl <- mtcars %>% dplyr::distinct(wt, .keep_all = T)
# 
# microbenchmark::microbenchmark(
#   a = look_up(lookup_tbl, wt = 5.424, value = 'gear'),
#   b = look_up(lookup_tbl, wt = test_df$a, value = 'gear')
# )


#
# define_params_context <- function(x, strat, grp) {
#   dplyr::filter(x,
#     (type == 'strategy variable' & identifier == strat) |
#       (type == 'group_variable' & identifier == grp) | type == 'parameter'
#   ) %>%
#     define_parameters()
# }
#
# context_param_names <- dplyr::filter(model$variables, type != 'parameter')$name
#
# the_contexts <- expand.grid(group = model$groups$name, strategy = model$strategies$name)
# first_res <- define_params_context(model$variables, the_contexts$strategy[1], the_contexts$group[1]) %>%
#   evaluate(heRomod2:::create_namespace(100,100))
#
# subseq_res <- the_contexts[-1, ] %>%
#   rowwise() %>%
#   do({
#
#   })
#   c("group", "strategy"), function(x) {
#   param_list <- define_params_context(model$variables, x$strategy, x$group)
#   first_context_index <- which(names(param_list) %in% context_param_names)[1]
#
#   # Remove variables before first context parameter if any found
#   if (!is.na(first_context_index)) {
#     param_list <- param_list[-seq_len(first_context_index - 1)]
#   }
#
#   evaluate(param_list, clone_namespace(first_res))
# })