This is a two state Markov model - modelling smoking cessation - used as a baseline and reference. Unlike other markov functions the reference functions contain all model setup, sampling, simulation and analysis code. It has been developed primarily using base R and makes use of a nested array structure. This array is then looped over using a series of nested for loops with a core loop running a the markov model for each sample and intervention. Profiling suggestions that this core loop may take the majority of compute time.

reference_two_state_markov(cycles = NULL, samples = NULL)

Arguments

cycles

Numeric, the number of cycles (time horizon / cycle length). No default supplied.

samples

Numeric, the number of samples to use. No default supplied.

Value

A named list of cost effectiveness output.

Examples

## Example model run reference_two_state_markov(cycles = 10, samples = 100)
#> $average.costs #> SoC with website SoC #> 50 0 #> #> $average.effects #> SoC with website SoC #> 4.531097 4.516160 #> #> $incremental.costs #> [1] 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 #> [26] 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 #> [51] 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 #> [76] 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 #> #> $incremental.effects #> [1] -0.0084080836 -0.0365862245 0.0365677402 0.0183237258 0.0084760045 #> [6] 0.0198755905 0.0432707960 0.0206911365 -0.0202422333 0.0184240762 #> [11] 0.0244956106 0.0307635658 0.0450517274 -0.0103139313 0.0268670318 #> [16] 0.0295778871 0.0225176658 0.0254850746 -0.0040464748 0.0065651228 #> [21] -0.0216366519 0.0189148351 0.0022591611 0.0215500229 0.0266797894 #> [26] 0.0374659557 0.0347260427 0.0375839787 -0.0066491262 0.0012405863 #> [31] 0.0163443784 0.0300299933 -0.0056121701 0.0141484331 0.0173032668 #> [36] 0.0173658034 -0.0157815177 -0.0203977742 -0.0102984990 0.0604264831 #> [41] 0.0220932502 0.0035584327 0.0307823216 0.0077118349 -0.0067854003 #> [46] 0.0199063840 0.0059992318 0.0144988694 -0.0010146588 0.0534564496 #> [51] 0.0325539129 -0.0150923897 0.0574196064 0.0372560774 0.0121370228 #> [56] 0.0147215640 -0.0183152547 0.0199069975 0.0195003532 -0.0060999757 #> [61] 0.0010830778 -0.0136918907 0.0264770026 0.0173810200 0.0134449579 #> [66] 0.0009099847 0.0141776894 -0.0009433736 0.0360209875 -0.0063563817 #> [71] 0.0422932788 0.0053539856 0.0272100284 0.0207147558 0.0530250018 #> [76] 0.0189855159 -0.0152684967 0.0246896419 0.0207722665 0.0384792873 #> [81] 0.0148506212 -0.0113404319 -0.0137330111 0.0225940035 0.0407041485 #> [86] 0.0110470615 0.0186464354 -0.0030753145 0.0158102232 0.0363166866 #> [91] 0.0046155309 0.0107150455 0.0290003009 0.0375867277 0.0106417865 #> [96] -0.0007686962 0.0152955381 0.0163099060 0.0493333703 0.0071958827 #> #> $ICER #> [1] 3347.353 #> #> $incremental.net.benefit #> [1] -218.161672 -781.724489 681.354804 316.474515 119.520089 347.511810 #> [7] 815.415920 363.822730 -454.844666 318.481524 439.912213 565.271315 #> [13] 851.034547 -256.278626 487.340635 541.557742 400.353317 459.701491 #> [19] -130.929495 81.302456 -482.733038 328.296702 -4.816777 381.000458 #> [25] 483.595789 699.319115 644.520855 701.679575 -182.982523 -25.188275 #> [31] 276.887569 550.599867 -162.243403 232.968663 296.065335 297.316068 #> [37] -365.630353 -457.955485 -255.969981 1158.529662 391.865004 21.168655 #> [43] 565.646432 104.236698 -185.708007 348.127680 69.984637 239.977388 #> [49] -70.293176 1019.128992 601.078258 -351.847794 1098.392128 695.121549 #> [55] 192.740456 244.431280 -416.305095 348.139949 340.007065 -171.999514 #> [61] -28.338445 -323.837814 479.540052 297.620400 218.899158 -31.800307 #> [67] 233.553789 -68.867472 670.419751 -177.127633 795.865577 57.079713 #> [73] 494.200568 364.295117 1010.500036 329.710317 -355.369934 443.792837 #> [79] 365.445330 719.585747 247.012423 -276.808638 -324.660223 401.880070 #> [85] 764.082970 170.941230 322.928708 -111.506289 266.204463 676.333732 #> [91] 42.310618 164.300910 530.006017 701.734554 162.835730 -65.373925 #> [97] 255.910762 276.198119 936.667407 93.917654 #> #> $average.inb #> [1] 248.7435 #> #> $probability.cost.effective #> [1] 0.72 #>