class: title-slide # An introduction to (Bayesian) survival modelling in HTA ## Gianluca Baio ### [Department of Statistical Science](https://www.ucl.ac.uk/statistics/) | University College London <br> .title-small[ <svg viewBox="0 0 512 512" style="position:relative;display:inline-block;top:.1em;fill:#00acee;height:0.8em;" xmlns="http://www.w3.org/2000/svg"> <path d="M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"></path></svg> [g.baio@ucl.ac.uk](mailto:g.baio@ucl.ac.uk) <svg viewBox="0 0 512 512" style="position:relative;display:inline-block;top:.1em;fill:#EA7600;height:0.8em;" xmlns="http://www.w3.org/2000/svg"> <path d="M503.52,241.48c-.12-1.56-.24-3.12-.24-4.68v-.12l-.36-4.68v-.12a245.86,245.86,0,0,0-7.32-41.15c0-.12,0-.12-.12-.24l-1.08-4c-.12-.24-.12-.48-.24-.6-.36-1.2-.72-2.52-1.08-3.72-.12-.24-.12-.6-.24-.84-.36-1.2-.72-2.4-1.08-3.48-.12-.36-.24-.6-.36-1-.36-1.2-.72-2.28-1.2-3.48l-.36-1.08c-.36-1.08-.84-2.28-1.2-3.36a8.27,8.27,0,0,0-.36-1c-.48-1.08-.84-2.28-1.32-3.36-.12-.24-.24-.6-.36-.84-.48-1.2-1-2.28-1.44-3.48,0-.12-.12-.24-.12-.36-1.56-3.84-3.24-7.68-5-11.4l-.36-.72c-.48-1-.84-1.8-1.32-2.64-.24-.48-.48-1.08-.72-1.56-.36-.84-.84-1.56-1.2-2.4-.36-.6-.6-1.2-1-1.8s-.84-1.44-1.2-2.28c-.36-.6-.72-1.32-1.08-1.92s-.84-1.44-1.2-2.16a18.07,18.07,0,0,0-1.2-2c-.36-.72-.84-1.32-1.2-2s-.84-1.32-1.2-2-.84-1.32-1.2-1.92-.84-1.44-1.32-2.16a15.63,15.63,0,0,0-1.2-1.8L463.2,119a15.63,15.63,0,0,0-1.2-1.8c-.48-.72-1.08-1.56-1.56-2.28-.36-.48-.72-1.08-1.08-1.56l-1.8-2.52c-.36-.48-.6-.84-1-1.32-1-1.32-1.8-2.52-2.76-3.72a248.76,248.76,0,0,0-23.51-26.64A186.82,186.82,0,0,0,412,62.46c-4-3.48-8.16-6.72-12.48-9.84a162.49,162.49,0,0,0-24.6-15.12c-2.4-1.32-4.8-2.52-7.2-3.72a254,254,0,0,0-55.43-19.56c-1.92-.36-3.84-.84-5.64-1.2h-.12c-1-.12-1.8-.36-2.76-.48a236.35,236.35,0,0,0-38-4H255.14a234.62,234.62,0,0,0-45.48,5c-33.59,7.08-63.23,21.24-82.91,39-1.08,1-1.92,1.68-2.4,2.16l-.48.48H124l-.12.12.12-.12a.12.12,0,0,0,.12-.12l-.12.12a.42.42,0,0,1,.24-.12c14.64-8.76,34.92-16,49.44-19.56l5.88-1.44c.36-.12.84-.12,1.2-.24,1.68-.36,3.36-.72,5.16-1.08.24,0,.6-.12.84-.12C250.94,20.94,319.34,40.14,367,85.61a171.49,171.49,0,0,1,26.88,32.76c30.36,49.2,27.48,111.11,3.84,147.59-34.44,53-111.35,71.27-159,24.84a84.19,84.19,0,0,1-25.56-59,74.05,74.05,0,0,1,6.24-31c1.68-3.84,13.08-25.67,18.24-24.59-13.08-2.76-37.55,2.64-54.71,28.19-15.36,22.92-14.52,58.2-5,83.28a132.85,132.85,0,0,1-12.12-39.24c-12.24-82.55,43.31-153,94.31-170.51-27.48-24-96.47-22.31-147.71,15.36-29.88,22-51.23,53.16-62.51,90.36,1.68-20.88,9.6-52.08,25.8-83.88-17.16,8.88-39,37-49.8,62.88-15.6,37.43-21,82.19-16.08,124.79.36,3.24.72,6.36,1.08,9.6,19.92,117.11,122,206.38,244.78,206.38C392.77,503.42,504,392.19,504,255,503.88,250.48,503.76,245.92,503.52,241.48Z"></path></svg> [https://gianluca.statistica.it/](https://gianluca.statistica.it/) <svg viewBox="0 0 512 512" style="position:relative;display:inline-block;top:.1em;fill:#EA7600;height:0.8em;" xmlns="http://www.w3.org/2000/svg"> <path d="M503.52,241.48c-.12-1.56-.24-3.12-.24-4.68v-.12l-.36-4.68v-.12a245.86,245.86,0,0,0-7.32-41.15c0-.12,0-.12-.12-.24l-1.08-4c-.12-.24-.12-.48-.24-.6-.36-1.2-.72-2.52-1.08-3.72-.12-.24-.12-.6-.24-.84-.36-1.2-.72-2.4-1.08-3.48-.12-.36-.24-.6-.36-1-.36-1.2-.72-2.28-1.2-3.48l-.36-1.08c-.36-1.08-.84-2.28-1.2-3.36a8.27,8.27,0,0,0-.36-1c-.48-1.08-.84-2.28-1.32-3.36-.12-.24-.24-.6-.36-.84-.48-1.2-1-2.28-1.44-3.48,0-.12-.12-.24-.12-.36-1.56-3.84-3.24-7.68-5-11.4l-.36-.72c-.48-1-.84-1.8-1.32-2.64-.24-.48-.48-1.08-.72-1.56-.36-.84-.84-1.56-1.2-2.4-.36-.6-.6-1.2-1-1.8s-.84-1.44-1.2-2.28c-.36-.6-.72-1.32-1.08-1.92s-.84-1.44-1.2-2.16a18.07,18.07,0,0,0-1.2-2c-.36-.72-.84-1.32-1.2-2s-.84-1.32-1.2-2-.84-1.32-1.2-1.92-.84-1.44-1.32-2.16a15.63,15.63,0,0,0-1.2-1.8L463.2,119a15.63,15.63,0,0,0-1.2-1.8c-.48-.72-1.08-1.56-1.56-2.28-.36-.48-.72-1.08-1.08-1.56l-1.8-2.52c-.36-.48-.6-.84-1-1.32-1-1.32-1.8-2.52-2.76-3.72a248.76,248.76,0,0,0-23.51-26.64A186.82,186.82,0,0,0,412,62.46c-4-3.48-8.16-6.72-12.48-9.84a162.49,162.49,0,0,0-24.6-15.12c-2.4-1.32-4.8-2.52-7.2-3.72a254,254,0,0,0-55.43-19.56c-1.92-.36-3.84-.84-5.64-1.2h-.12c-1-.12-1.8-.36-2.76-.48a236.35,236.35,0,0,0-38-4H255.14a234.62,234.62,0,0,0-45.48,5c-33.59,7.08-63.23,21.24-82.91,39-1.08,1-1.92,1.68-2.4,2.16l-.48.48H124l-.12.12.12-.12a.12.12,0,0,0,.12-.12l-.12.12a.42.42,0,0,1,.24-.12c14.64-8.76,34.92-16,49.44-19.56l5.88-1.44c.36-.12.84-.12,1.2-.24,1.68-.36,3.36-.72,5.16-1.08.24,0,.6-.12.84-.12C250.94,20.94,319.34,40.14,367,85.61a171.49,171.49,0,0,1,26.88,32.76c30.36,49.2,27.48,111.11,3.84,147.59-34.44,53-111.35,71.27-159,24.84a84.19,84.19,0,0,1-25.56-59,74.05,74.05,0,0,1,6.24-31c1.68-3.84,13.08-25.67,18.24-24.59-13.08-2.76-37.55,2.64-54.71,28.19-15.36,22.92-14.52,58.2-5,83.28a132.85,132.85,0,0,1-12.12-39.24c-12.24-82.55,43.31-153,94.31-170.51-27.48-24-96.47-22.31-147.71,15.36-29.88,22-51.23,53.16-62.51,90.36,1.68-20.88,9.6-52.08,25.8-83.88-17.16,8.88-39,37-49.8,62.88-15.6,37.43-21,82.19-16.08,124.79.36,3.24.72,6.36,1.08,9.6,19.92,117.11,122,206.38,244.78,206.38C392.77,503.42,504,392.19,504,255,503.88,250.48,503.76,245.92,503.52,241.48Z"></path></svg> [https://egon.stats.ucl.ac.uk/research/statistics-health-economics/](https://egon.stats.ucl.ac.uk/research/statistics-health-economics/) <svg viewBox="0 0 496 512" style="position:relative;display:inline-block;top:.1em;fill:black;height:0.8em;" xmlns="http://www.w3.org/2000/svg"> <path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg> [https://github.com/giabaio](https://github.com/giabaio) <svg viewBox="0 0 496 512" style="position:relative;display:inline-block;top:.1em;fill:black;height:0.8em;" xmlns="http://www.w3.org/2000/svg"> <path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg> [https://github.com/StatisticsHealthEconomics](https://github.com/StatisticsHealthEconomics) <svg viewBox="0 0 512 512" style="position:relative;display:inline-block;top:.1em;fill:#00acee;height:0.8em;" xmlns="http://www.w3.org/2000/svg"> <path d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"></path></svg> [@gianlubaio](https://twitter.com/gianlubaio) <svg viewBox="0 0 448 512" style="position:relative;display:inline-block;top:.1em;fill:#563acc;height:0.8em;" xmlns="http://www.w3.org/2000/svg"> <path d="M433 179.11c0-97.2-63.71-125.7-63.71-125.7-62.52-28.7-228.56-28.4-290.48 0 0 0-63.72 28.5-63.72 125.7 0 115.7-6.6 259.4 105.63 289.1 40.51 10.7 75.32 13 103.33 11.4 50.81-2.8 79.32-18.1 79.32-18.1l-1.7-36.9s-36.31 11.4-77.12 10.1c-40.41-1.4-83-4.4-89.63-54a102.54 102.54 0 0 1-.9-13.9c85.63 20.9 158.65 9.1 178.75 6.7 56.12-6.7 105-41.3 111.23-72.9 9.8-49.8 9-121.5 9-121.5zm-75.12 125.2h-46.63v-114.2c0-49.7-64-51.6-64 6.9v62.5h-46.33V197c0-58.5-64-56.6-64-6.9v114.2H90.19c0-122.1-5.2-147.9 18.41-175 25.9-28.9 79.82-30.8 103.83 6.1l11.6 19.5 11.6-19.5c24.11-37.1 78.12-34.8 103.83-6.1 23.71 27.3 18.4 53 18.4 175z"></path></svg> [@gianlubaio@mas.to](https://mas.to/@gianlubaio) ] <br> ### XLII Jornadas de Economia de la Salud, Girona <!-- Can also separate the various components of the extra argument 'params', eg as in ### XLII Jornadas de Economia de la Salud, Girona, 4 July 2023, Introduction to survival analysis, TRUE, https://gianluca.statistica.it/slides/aes-2023 --> 4 July 2023 <!-- Adds a departmental logo on the right-bottom corner (Only with 'ucl-stats') --> .logo-stats[] <!-- Can also add sticky notes: --> <p style="position: absolute; top:75%; left:2.5%; font-family: Nanum Pen Script; font-size:85%; text-decoration: none; color: #000; background: #ffc; display: block; height:6.3em; width:6.3em; padding: .5em; box-shadow: 5px 5px 7px rgba(33,33,33,.7); transform: rotate(-8deg); border-bottom-right-radius: 60px 5px;">Check out our departmental podcast "Random Talks" on Soundcloud! <a style=";" href="https://soundcloud.com/uclsound/sets/sample-space" title="Random Talks"><svg viewBox="0 0 640 512" style="position:relative;display:inline-block;top:.1em;fill:#FE5000;height:0.8em;bottom:1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M111.4 256.3l5.8 65-5.8 68.3c-.3 2.5-2.2 4.4-4.4 4.4s-4.2-1.9-4.2-4.4l-5.6-68.3 5.6-65c0-2.2 1.9-4.2 4.2-4.2 2.2 0 4.1 2 4.4 4.2zm21.4-45.6c-2.8 0-4.7 2.2-5 5l-5 105.6 5 68.3c.3 2.8 2.2 5 5 5 2.5 0 4.7-2.2 4.7-5l5.8-68.3-5.8-105.6c0-2.8-2.2-5-4.7-5zm25.5-24.1c-3.1 0-5.3 2.2-5.6 5.3l-4.4 130 4.4 67.8c.3 3.1 2.5 5.3 5.6 5.3 2.8 0 5.3-2.2 5.3-5.3l5.3-67.8-5.3-130c0-3.1-2.5-5.3-5.3-5.3zM7.2 283.2c-1.4 0-2.2 1.1-2.5 2.5L0 321.3l4.7 35c.3 1.4 1.1 2.5 2.5 2.5s2.2-1.1 2.5-2.5l5.6-35-5.6-35.6c-.3-1.4-1.1-2.5-2.5-2.5zm23.6-21.9c-1.4 0-2.5 1.1-2.5 2.5l-6.4 57.5 6.4 56.1c0 1.7 1.1 2.8 2.5 2.8s2.5-1.1 2.8-2.5l7.2-56.4-7.2-57.5c-.3-1.4-1.4-2.5-2.8-2.5zm25.3-11.4c-1.7 0-3.1 1.4-3.3 3.3L47 321.3l5.8 65.8c.3 1.7 1.7 3.1 3.3 3.1 1.7 0 3.1-1.4 3.1-3.1l6.9-65.8-6.9-68.1c0-1.9-1.4-3.3-3.1-3.3zm25.3-2.2c-1.9 0-3.6 1.4-3.6 3.6l-5.8 70 5.8 67.8c0 2.2 1.7 3.6 3.6 3.6s3.6-1.4 3.9-3.6l6.4-67.8-6.4-70c-.3-2.2-2-3.6-3.9-3.6zm241.4-110.9c-1.1-.8-2.8-1.4-4.2-1.4-2.2 0-4.2.8-5.6 1.9-1.9 1.7-3.1 4.2-3.3 6.7v.8l-3.3 176.7 1.7 32.5 1.7 31.7c.3 4.7 4.2 8.6 8.9 8.6s8.6-3.9 8.6-8.6l3.9-64.2-3.9-177.5c-.4-3-2-5.8-4.5-7.2zm-26.7 15.3c-1.4-.8-2.8-1.4-4.4-1.4s-3.1.6-4.4 1.4c-2.2 1.4-3.6 3.9-3.6 6.7l-.3 1.7-2.8 160.8s0 .3 3.1 65.6v.3c0 1.7.6 3.3 1.7 4.7 1.7 1.9 3.9 3.1 6.4 3.1 2.2 0 4.2-1.1 5.6-2.5 1.7-1.4 2.5-3.3 2.5-5.6l.3-6.7 3.1-58.6-3.3-162.8c-.3-2.8-1.7-5.3-3.9-6.7zm-111.4 22.5c-3.1 0-5.8 2.8-5.8 6.1l-4.4 140.6 4.4 67.2c.3 3.3 2.8 5.8 5.8 5.8 3.3 0 5.8-2.5 6.1-5.8l5-67.2-5-140.6c-.2-3.3-2.7-6.1-6.1-6.1zm376.7 62.8c-10.8 0-21.1 2.2-30.6 6.1-6.4-70.8-65.8-126.4-138.3-126.4-17.8 0-35 3.3-50.3 9.4-6.1 2.2-7.8 4.4-7.8 9.2v249.7c0 5 3.9 8.6 8.6 9.2h218.3c43.3 0 78.6-35 78.6-78.3.1-43.6-35.2-78.9-78.5-78.9zm-296.7-60.3c-4.2 0-7.5 3.3-7.8 7.8l-3.3 136.7 3.3 65.6c.3 4.2 3.6 7.5 7.8 7.5 4.2 0 7.5-3.3 7.5-7.5l3.9-65.6-3.9-136.7c-.3-4.5-3.3-7.8-7.5-7.8zm-53.6-7.8c-3.3 0-6.4 3.1-6.4 6.7l-3.9 145.3 3.9 66.9c.3 3.6 3.1 6.4 6.4 6.4 3.6 0 6.4-2.8 6.7-6.4l4.4-66.9-4.4-145.3c-.3-3.6-3.1-6.7-6.7-6.7zm26.7 3.4c-3.9 0-6.9 3.1-6.9 6.9L227 321.3l3.9 66.4c.3 3.9 3.1 6.9 6.9 6.9s6.9-3.1 6.9-6.9l4.2-66.4-4.2-141.7c0-3.9-3-6.9-6.9-6.9z"></path> </svg></a> </p> <p style="position: absolute; top:53%; left:6.5%; font-family: Nanum Pen Script; font-size:85%; text-decoration: none; color: #000; background: #ffc; display: block; height:6.3em; width:6.3em; padding: .5em; box-shadow: 5px 5px 7px rgba(33,33,33,.7); transform: rotate(6deg); border-bottom-right-radius: 60px 5px;">Follow our departmental social media accounts <a style=";" href="https://twitter.com/stats_ucl" title="@stats_UCL"><svg viewBox="0 0 512 512" style="position:relative;display:inline-block;top:.1em;fill:#00acee;height:0.8em;bottom:1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"></path> </svg></a> <a style=";" href="https://www.linkedin.com/in/statistical-science-ucl-906b9a201" title="LinkedIn"><svg viewBox="0 0 448 512" style="position:relative;display:inline-block;top:.1em;fill:#2867b2;height:0.8em;bottom:1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"></path> </svg></a> <a style=";" href="https://www.instagram.com/ucl.stats/" title="Instagram"><svg viewBox="0 0 448 512" style="position:relative;display:inline-block;top:.1em;fill:#2867b2;height:0.8em;bottom:1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"></path> </svg></a> </p> <!-- This adds a footer (optional and with other possibilities...) For example, can use <span><a href="https://gianluca.statistica.it/"><img src="assets/logo.png" title="Go home" width="2.0%"></a></span> to add the Samp Tux log, or change the bottom space to align the text, etc .footer-left[ <span style="position: relative; bottom: 0px; color: #D5D5D5;"> © Gianluca Baio (UCL)</span> ] --> --- layout: true <!-- this selects the footer from a template, depending on the value passed in the YAML of the main presentation --> <style type="text/css"> /* Redefines the my-footer class to have the footer centered and smaller */ .my-footer { position: absolute; bottom: 0px; text-align: center; height: 20px; width: 100%; color: #D5D5D5; font-size: 62%; background-image: linear-gradient(to right, rgb(0, 44, 83), rgb(100, 125, 151)); /* vertical alignment (as to play nicely with page numbering!) */ margin-bottom: -2.0px; } /* Redefines the slide numbering (smaller font), to align with the footer */ .remark-slide-number { color: #FFFFFF; opacity: 1; font-size: 62%; /* Customise position of numbering */ margin-bottom: -8.5px; margin-right: -5.0px; } </style> .my-footer[ © Gianluca Baio (UCL) | <a style="border-bottom: 0px;;" href="https://twitter.com/giabaio" title="Follow me on Twitter"><svg viewBox="0 0 512 512" style="position:relative;display:inline-block;top:.1em;fill:#bcc0c4;height:0.8em;bottom:1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"></path> </svg></a> <a style="border-bottom: 0px;;" href="https://mas.to/@gianlubaio" title="Follow me on Mastodon"><svg viewBox="0 0 448 512" style="position:relative;display:inline-block;top:.1em;fill:#bcc0c4;height:0.8em;bottom:1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M433 179.11c0-97.2-63.71-125.7-63.71-125.7-62.52-28.7-228.56-28.4-290.48 0 0 0-63.72 28.5-63.72 125.7 0 115.7-6.6 259.4 105.63 289.1 40.51 10.7 75.32 13 103.33 11.4 50.81-2.8 79.32-18.1 79.32-18.1l-1.7-36.9s-36.31 11.4-77.12 10.1c-40.41-1.4-83-4.4-89.63-54a102.54 102.54 0 0 1-.9-13.9c85.63 20.9 158.65 9.1 178.75 6.7 56.12-6.7 105-41.3 111.23-72.9 9.8-49.8 9-121.5 9-121.5zm-75.12 125.2h-46.63v-114.2c0-49.7-64-51.6-64 6.9v62.5h-46.33V197c0-58.5-64-56.6-64-6.9v114.2H90.19c0-122.1-5.2-147.9 18.41-175 25.9-28.9 79.82-30.8 103.83 6.1l11.6 19.5 11.6-19.5c24.11-37.1 78.12-34.8 103.83-6.1 23.71 27.3 18.4 53 18.4 175z"></path> </svg></a> <a style="border-bottom: 0px;;" href="https://github.com/giabaio" title="Check out my repos"><svg viewBox="0 0 496 512" style="position:relative;display:inline-block;top:.1em;fill:#bcc0c4;height:0.8em;" xmlns="http://www.w3.org/2000/svg"> <path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path> </svg></a> <a style="border-bottom: 0px;;" href="mailto:g.baio@ucl.ac.uk" title="Email me"><svg viewBox="0 0 512 512" style="position:relative;display:inline-block;top:.1em;fill:#bcc0c4;height:0.8em;" xmlns="http://www.w3.org/2000/svg"> <path d="M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"></path> </svg></a> <a style="border-bottom: 0px;;" href="https://gianluca.statistica.it" title="Visit my website"><svg viewBox="0 0 512 512" style="position:relative;display:inline-block;top:.1em;fill:#bcc0c4;height:0.8em;" xmlns="http://www.w3.org/2000/svg"> <path d="M503.52,241.48c-.12-1.56-.24-3.12-.24-4.68v-.12l-.36-4.68v-.12a245.86,245.86,0,0,0-7.32-41.15c0-.12,0-.12-.12-.24l-1.08-4c-.12-.24-.12-.48-.24-.6-.36-1.2-.72-2.52-1.08-3.72-.12-.24-.12-.6-.24-.84-.36-1.2-.72-2.4-1.08-3.48-.12-.36-.24-.6-.36-1-.36-1.2-.72-2.28-1.2-3.48l-.36-1.08c-.36-1.08-.84-2.28-1.2-3.36a8.27,8.27,0,0,0-.36-1c-.48-1.08-.84-2.28-1.32-3.36-.12-.24-.24-.6-.36-.84-.48-1.2-1-2.28-1.44-3.48,0-.12-.12-.24-.12-.36-1.56-3.84-3.24-7.68-5-11.4l-.36-.72c-.48-1-.84-1.8-1.32-2.64-.24-.48-.48-1.08-.72-1.56-.36-.84-.84-1.56-1.2-2.4-.36-.6-.6-1.2-1-1.8s-.84-1.44-1.2-2.28c-.36-.6-.72-1.32-1.08-1.92s-.84-1.44-1.2-2.16a18.07,18.07,0,0,0-1.2-2c-.36-.72-.84-1.32-1.2-2s-.84-1.32-1.2-2-.84-1.32-1.2-1.92-.84-1.44-1.32-2.16a15.63,15.63,0,0,0-1.2-1.8L463.2,119a15.63,15.63,0,0,0-1.2-1.8c-.48-.72-1.08-1.56-1.56-2.28-.36-.48-.72-1.08-1.08-1.56l-1.8-2.52c-.36-.48-.6-.84-1-1.32-1-1.32-1.8-2.52-2.76-3.72a248.76,248.76,0,0,0-23.51-26.64A186.82,186.82,0,0,0,412,62.46c-4-3.48-8.16-6.72-12.48-9.84a162.49,162.49,0,0,0-24.6-15.12c-2.4-1.32-4.8-2.52-7.2-3.72a254,254,0,0,0-55.43-19.56c-1.92-.36-3.84-.84-5.64-1.2h-.12c-1-.12-1.8-.36-2.76-.48a236.35,236.35,0,0,0-38-4H255.14a234.62,234.62,0,0,0-45.48,5c-33.59,7.08-63.23,21.24-82.91,39-1.08,1-1.92,1.68-2.4,2.16l-.48.48H124l-.12.12.12-.12a.12.12,0,0,0,.12-.12l-.12.12a.42.42,0,0,1,.24-.12c14.64-8.76,34.92-16,49.44-19.56l5.88-1.44c.36-.12.84-.12,1.2-.24,1.68-.36,3.36-.72,5.16-1.08.24,0,.6-.12.84-.12C250.94,20.94,319.34,40.14,367,85.61a171.49,171.49,0,0,1,26.88,32.76c30.36,49.2,27.48,111.11,3.84,147.59-34.44,53-111.35,71.27-159,24.84a84.19,84.19,0,0,1-25.56-59,74.05,74.05,0,0,1,6.24-31c1.68-3.84,13.08-25.67,18.24-24.59-13.08-2.76-37.55,2.64-54.71,28.19-15.36,22.92-14.52,58.2-5,83.28a132.85,132.85,0,0,1-12.12-39.24c-12.24-82.55,43.31-153,94.31-170.51-27.48-24-96.47-22.31-147.71,15.36-29.88,22-51.23,53.16-62.51,90.36,1.68-20.88,9.6-52.08,25.8-83.88-17.16,8.88-39,37-49.8,62.88-15.6,37.43-21,82.19-16.08,124.79.36,3.24.72,6.36,1.08,9.6,19.92,117.11,122,206.38,244.78,206.38C392.77,503.42,504,392.19,504,255,503.88,250.48,503.76,245.92,503.52,241.48Z"></path> </svg></a> | Introduction to survival analysis | XLII Jornadas de Economia de la Salud | 4 Jul 2023 ] <!-- this adds the URL at which the slides are available; depends on the params 'slides_url' --> .slide-url[ https://gianluca.statistica.it/slides/aes-2023 ] --- class: hide-logo background-image: url("img/webpage.png") background-size: contain --- class: part-page count: false # Part 1: Introduction to Survival analysis in HTA --- # Summary - (Ridiculously short) Introduction to survival modelling - Relevant quantitites & relationships - Censoring - Survival modelling *in HTA* - Modelling - What's so special about HTA? - Frequentist vs Bayesian modelling - Model fitting & post-processing (PSA) - Computational issues <span style="display:block; margin-top: 3em ;"></span> .content-box-beamer[ ### **References** <span style="display:block; margin-top: 20px ;"></span> <svg viewBox="0 0 448 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z"></path> </svg> <i>The BUGS Book</i>, chapter 11.11 .button[<img src="img/routledge.png" width="10%"> [Book website](https://www.routledge.com/The-BUGS-Book-A-Practical-Introduction-to-Bayesian-Analysis/Lunn-Jackson-Best-Thomas-Spiegelhalter/p/book/9781584888499)] <svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;fill:orange;" xmlns="http://www.w3.org/2000/svg"> <path d="M503.52,241.48c-.12-1.56-.24-3.12-.24-4.68v-.12l-.36-4.68v-.12a245.86,245.86,0,0,0-7.32-41.15c0-.12,0-.12-.12-.24l-1.08-4c-.12-.24-.12-.48-.24-.6-.36-1.2-.72-2.52-1.08-3.72-.12-.24-.12-.6-.24-.84-.36-1.2-.72-2.4-1.08-3.48-.12-.36-.24-.6-.36-1-.36-1.2-.72-2.28-1.2-3.48l-.36-1.08c-.36-1.08-.84-2.28-1.2-3.36a8.27,8.27,0,0,0-.36-1c-.48-1.08-.84-2.28-1.32-3.36-.12-.24-.24-.6-.36-.84-.48-1.2-1-2.28-1.44-3.48,0-.12-.12-.24-.12-.36-1.56-3.84-3.24-7.68-5-11.4l-.36-.72c-.48-1-.84-1.8-1.32-2.64-.24-.48-.48-1.08-.72-1.56-.36-.84-.84-1.56-1.2-2.4-.36-.6-.6-1.2-1-1.8s-.84-1.44-1.2-2.28c-.36-.6-.72-1.32-1.08-1.92s-.84-1.44-1.2-2.16a18.07,18.07,0,0,0-1.2-2c-.36-.72-.84-1.32-1.2-2s-.84-1.32-1.2-2-.84-1.32-1.2-1.92-.84-1.44-1.32-2.16a15.63,15.63,0,0,0-1.2-1.8L463.2,119a15.63,15.63,0,0,0-1.2-1.8c-.48-.72-1.08-1.56-1.56-2.28-.36-.48-.72-1.08-1.08-1.56l-1.8-2.52c-.36-.48-.6-.84-1-1.32-1-1.32-1.8-2.52-2.76-3.72a248.76,248.76,0,0,0-23.51-26.64A186.82,186.82,0,0,0,412,62.46c-4-3.48-8.16-6.72-12.48-9.84a162.49,162.49,0,0,0-24.6-15.12c-2.4-1.32-4.8-2.52-7.2-3.72a254,254,0,0,0-55.43-19.56c-1.92-.36-3.84-.84-5.64-1.2h-.12c-1-.12-1.8-.36-2.76-.48a236.35,236.35,0,0,0-38-4H255.14a234.62,234.62,0,0,0-45.48,5c-33.59,7.08-63.23,21.24-82.91,39-1.08,1-1.92,1.68-2.4,2.16l-.48.48H124l-.12.12.12-.12a.12.12,0,0,0,.12-.12l-.12.12a.42.42,0,0,1,.24-.12c14.64-8.76,34.92-16,49.44-19.56l5.88-1.44c.36-.12.84-.12,1.2-.24,1.68-.36,3.36-.72,5.16-1.08.24,0,.6-.12.84-.12C250.94,20.94,319.34,40.14,367,85.61a171.49,171.49,0,0,1,26.88,32.76c30.36,49.2,27.48,111.11,3.84,147.59-34.44,53-111.35,71.27-159,24.84a84.19,84.19,0,0,1-25.56-59,74.05,74.05,0,0,1,6.24-31c1.68-3.84,13.08-25.67,18.24-24.59-13.08-2.76-37.55,2.64-54.71,28.19-15.36,22.92-14.52,58.2-5,83.28a132.85,132.85,0,0,1-12.12-39.24c-12.24-82.55,43.31-153,94.31-170.51-27.48-24-96.47-22.31-147.71,15.36-29.88,22-51.23,53.16-62.51,90.36,1.68-20.88,9.6-52.08,25.8-83.88-17.16,8.88-39,37-49.8,62.88-15.6,37.43-21,82.19-16.08,124.79.36,3.24.72,6.36,1.08,9.6,19.92,117.11,122,206.38,244.78,206.38C392.77,503.42,504,392.19,504,255,503.88,250.48,503.76,245.92,503.52,241.48Z"></path></svg> [NICE DSU Evidence Synthesis Technical Support Document Series – TSD14](http://nicedsu.org.uk/technical-support-documents/survival-analysis-tsd/) <svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;fill:orange;" xmlns="http://www.w3.org/2000/svg"> <path d="M503.52,241.48c-.12-1.56-.24-3.12-.24-4.68v-.12l-.36-4.68v-.12a245.86,245.86,0,0,0-7.32-41.15c0-.12,0-.12-.12-.24l-1.08-4c-.12-.24-.12-.48-.24-.6-.36-1.2-.72-2.52-1.08-3.72-.12-.24-.12-.6-.24-.84-.36-1.2-.72-2.4-1.08-3.48-.12-.36-.24-.6-.36-1-.36-1.2-.72-2.28-1.2-3.48l-.36-1.08c-.36-1.08-.84-2.28-1.2-3.36a8.27,8.27,0,0,0-.36-1c-.48-1.08-.84-2.28-1.32-3.36-.12-.24-.24-.6-.36-.84-.48-1.2-1-2.28-1.44-3.48,0-.12-.12-.24-.12-.36-1.56-3.84-3.24-7.68-5-11.4l-.36-.72c-.48-1-.84-1.8-1.32-2.64-.24-.48-.48-1.08-.72-1.56-.36-.84-.84-1.56-1.2-2.4-.36-.6-.6-1.2-1-1.8s-.84-1.44-1.2-2.28c-.36-.6-.72-1.32-1.08-1.92s-.84-1.44-1.2-2.16a18.07,18.07,0,0,0-1.2-2c-.36-.72-.84-1.32-1.2-2s-.84-1.32-1.2-2-.84-1.32-1.2-1.92-.84-1.44-1.32-2.16a15.63,15.63,0,0,0-1.2-1.8L463.2,119a15.63,15.63,0,0,0-1.2-1.8c-.48-.72-1.08-1.56-1.56-2.28-.36-.48-.72-1.08-1.08-1.56l-1.8-2.52c-.36-.48-.6-.84-1-1.32-1-1.32-1.8-2.52-2.76-3.72a248.76,248.76,0,0,0-23.51-26.64A186.82,186.82,0,0,0,412,62.46c-4-3.48-8.16-6.72-12.48-9.84a162.49,162.49,0,0,0-24.6-15.12c-2.4-1.32-4.8-2.52-7.2-3.72a254,254,0,0,0-55.43-19.56c-1.92-.36-3.84-.84-5.64-1.2h-.12c-1-.12-1.8-.36-2.76-.48a236.35,236.35,0,0,0-38-4H255.14a234.62,234.62,0,0,0-45.48,5c-33.59,7.08-63.23,21.24-82.91,39-1.08,1-1.92,1.68-2.4,2.16l-.48.48H124l-.12.12.12-.12a.12.12,0,0,0,.12-.12l-.12.12a.42.42,0,0,1,.24-.12c14.64-8.76,34.92-16,49.44-19.56l5.88-1.44c.36-.12.84-.12,1.2-.24,1.68-.36,3.36-.72,5.16-1.08.24,0,.6-.12.84-.12C250.94,20.94,319.34,40.14,367,85.61a171.49,171.49,0,0,1,26.88,32.76c30.36,49.2,27.48,111.11,3.84,147.59-34.44,53-111.35,71.27-159,24.84a84.19,84.19,0,0,1-25.56-59,74.05,74.05,0,0,1,6.24-31c1.68-3.84,13.08-25.67,18.24-24.59-13.08-2.76-37.55,2.64-54.71,28.19-15.36,22.92-14.52,58.2-5,83.28a132.85,132.85,0,0,1-12.12-39.24c-12.24-82.55,43.31-153,94.31-170.51-27.48-24-96.47-22.31-147.71,15.36-29.88,22-51.23,53.16-62.51,90.36,1.68-20.88,9.6-52.08,25.8-83.88-17.16,8.88-39,37-49.8,62.88-15.6,37.43-21,82.19-16.08,124.79.36,3.24.72,6.36,1.08,9.6,19.92,117.11,122,206.38,244.78,206.38C392.77,503.42,504,392.19,504,255,503.88,250.48,503.76,245.92,503.52,241.48Z"></path></svg> [NICE DSU Evidence Synthesis Technical Support Document Series – TSD16](http://nicedsu.org.uk/technical-support-documents/treatment-switching-tsd/) <svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;fill:orange;" xmlns="http://www.w3.org/2000/svg"> <path d="M503.52,241.48c-.12-1.56-.24-3.12-.24-4.68v-.12l-.36-4.68v-.12a245.86,245.86,0,0,0-7.32-41.15c0-.12,0-.12-.12-.24l-1.08-4c-.12-.24-.12-.48-.24-.6-.36-1.2-.72-2.52-1.08-3.72-.12-.24-.12-.6-.24-.84-.36-1.2-.72-2.4-1.08-3.48-.12-.36-.24-.6-.36-1-.36-1.2-.72-2.28-1.2-3.48l-.36-1.08c-.36-1.08-.84-2.28-1.2-3.36a8.27,8.27,0,0,0-.36-1c-.48-1.08-.84-2.28-1.32-3.36-.12-.24-.24-.6-.36-.84-.48-1.2-1-2.28-1.44-3.48,0-.12-.12-.24-.12-.36-1.56-3.84-3.24-7.68-5-11.4l-.36-.72c-.48-1-.84-1.8-1.32-2.64-.24-.48-.48-1.08-.72-1.56-.36-.84-.84-1.56-1.2-2.4-.36-.6-.6-1.2-1-1.8s-.84-1.44-1.2-2.28c-.36-.6-.72-1.32-1.08-1.92s-.84-1.44-1.2-2.16a18.07,18.07,0,0,0-1.2-2c-.36-.72-.84-1.32-1.2-2s-.84-1.32-1.2-2-.84-1.32-1.2-1.92-.84-1.44-1.32-2.16a15.63,15.63,0,0,0-1.2-1.8L463.2,119a15.63,15.63,0,0,0-1.2-1.8c-.48-.72-1.08-1.56-1.56-2.28-.36-.48-.72-1.08-1.08-1.56l-1.8-2.52c-.36-.48-.6-.84-1-1.32-1-1.32-1.8-2.52-2.76-3.72a248.76,248.76,0,0,0-23.51-26.64A186.82,186.82,0,0,0,412,62.46c-4-3.48-8.16-6.72-12.48-9.84a162.49,162.49,0,0,0-24.6-15.12c-2.4-1.32-4.8-2.52-7.2-3.72a254,254,0,0,0-55.43-19.56c-1.92-.36-3.84-.84-5.64-1.2h-.12c-1-.12-1.8-.36-2.76-.48a236.35,236.35,0,0,0-38-4H255.14a234.62,234.62,0,0,0-45.48,5c-33.59,7.08-63.23,21.24-82.91,39-1.08,1-1.92,1.68-2.4,2.16l-.48.48H124l-.12.12.12-.12a.12.12,0,0,0,.12-.12l-.12.12a.42.42,0,0,1,.24-.12c14.64-8.76,34.92-16,49.44-19.56l5.88-1.44c.36-.12.84-.12,1.2-.24,1.68-.36,3.36-.72,5.16-1.08.24,0,.6-.12.84-.12C250.94,20.94,319.34,40.14,367,85.61a171.49,171.49,0,0,1,26.88,32.76c30.36,49.2,27.48,111.11,3.84,147.59-34.44,53-111.35,71.27-159,24.84a84.19,84.19,0,0,1-25.56-59,74.05,74.05,0,0,1,6.24-31c1.68-3.84,13.08-25.67,18.24-24.59-13.08-2.76-37.55,2.64-54.71,28.19-15.36,22.92-14.52,58.2-5,83.28a132.85,132.85,0,0,1-12.12-39.24c-12.24-82.55,43.31-153,94.31-170.51-27.48-24-96.47-22.31-147.71,15.36-29.88,22-51.23,53.16-62.51,90.36,1.68-20.88,9.6-52.08,25.8-83.88-17.16,8.88-39,37-49.8,62.88-15.6,37.43-21,82.19-16.08,124.79.36,3.24.72,6.36,1.08,9.6,19.92,117.11,122,206.38,244.78,206.38C392.77,503.42,504,392.19,504,255,503.88,250.48,503.76,245.92,503.52,241.48Z"></path></svg> [NICE DSU Evidence Synthesis Technical Support Document Series – TSD19](http://nicedsu.org.uk/technical-support-documents//partitioned-survival-analysis-tsd/) <svg viewBox="0 0 448 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z"></path> </svg> <i>Doing Bayesian Data Analysis</i>, chapter 14 .button[<i class="fab fa-firefox"></i> [Book website](https://sites.google.com/site/doingbayesiandataanalysis/)] ] --- # Survival analysis ## Relevant quantities - Outcome is **time to event** `\(T>0\)`, a continuous random variable with sample space (support) `\([0,\infty)\)` - Relevant quantites are: the .orange[density] and .red[cumulative distribution] functions `$$\class{red}{F(t)=\Pr(T\leq t)=\int_0^t}\class{orange}{f(u)}\class{red}{du}$$` the .blue["survivor"] (often referred to as .blue["survival"]) function `$$\class{blue}{S(t)=1-F(t)=\Pr(T>t)}$$` the .olive["hazard"] and the .spanish-red["cumulative hazard"] functions `$$\class{olive}{h(t)=\lim_{\Delta\rightarrow 0} \frac{\Pr(t\leq T \leq t+\Delta\mid T>t)}{\Delta}} \qquad{ \style{font-family:inherit;}{\text{and}} } \qquad \class{spanish-red}{H(t)=\int_0^t}\class{olive}{h(u)}\class{spanish-red}{du}$$` - Since `\(\class{red}{F(t)}\)`, `\(\class{blue}{S(t)}\)`, `\(\class{orange}{f(t)}\)`, `\(\class{olive}{h(t)}\)` and `\(\class{spanish-red}{H(t)}\)` are all connected, specifying one of them is sufficient to fully characterise the survival model --- count: false # Survival analysis .pull-left[ <img src="./img/surv-f-1.png" style="display: block; margin: auto;" width="68%" title="The top panel shows a density function describing how the probability mass is spread over the continuum of points in the range 0 to infinity; the bottom panel shows the survival function, ie the probability of not having experienced the event up to time t"> <img src="./img/surv-f-2.png" style="display: block; margin: auto;" width="68%" title="The top panel shows a density function describing how the probability mass is spread over the continuum of points in the range 0 to infinity; the bottom panel shows the survival function, ie the probability of not having experienced the event up to time t"> ] .pull-right[ <img src="./img/surv-s-1.png" style="display: block; margin: auto;" width="68%" title="The top panel shows the cumulative function, ie the probability of experiencing the event before time t; the bottom panel shows the hazard function, ie the instantaneous probability of experiencing the event at a specific time t"> <img src="./img/surv-s-2.png" style="display: block; margin: auto;" width="68%" title="The top panel shows the cumulative function, ie the probability of experiencing the event before time t; the bottom panel shows the hazard function, ie the instantaneous probability of experiencing the event at a specific time t"> ] --- count: false # Survival analysis ## Recap 1. The density function is the derivative wrt time of the cumulative function: `\(\displaystyle\class{myblue}{f(t)=\frac{d}{dt}F(t)=F^\prime(t)}\)` 2. The "instantaneous" hazard function is a conditional probability, so can be specified as the ratio of the joint probability to the marginal probability of the conditioning event: `\(\displaystyle\class{myblue}{h(t)=\frac{\lim_{\Delta\rightarrow 0} \Pr(t \leq T \leq t+\Delta)/\Delta}{\Pr(T>t)}=\frac{f(t)}{S(t)}}\)` 3. The derivative wrt time of the survival function is minus the density function: `\(\displaystyle\class{myblue}{S^\prime(t)=\frac{d}{dt}S(t)=\frac{d}{dt}[1-F(t)]=-f(t)}\)` 4. The hazard function can be represented as the ratio of the derivative to the actual survival function: `\(\displaystyle\class{myblue}{h(t)=-\frac{S^\prime(t)}{S(t)}}\)` 5. The cumulative hazard function is minus the log-survival: `\(\displaystyle\class{myblue}{H(t)=\int_0^t h(u)du=\int_0^t -\frac{S^\prime(u)}{S(u)}du=-\log(S(t))}\)` --- count: false # Survival analysis ## Censoring In order to account for censoring, we need to specify the data collection - `\(t_i>0\)`: .blue[**observed**] time to event for subject `\(i\)` - `\(d_i=0,1\)`: an indicator of censoring - If `\(d_i=0\)`, then the `\(i-\)`th subject did not experienced the event. In this case, `\(t_i\)` is the .red[**partially**] observed time - If `\(d_i=1\)`, then the observed time is the "true" (.orange[**fully**] observed) one <center><img src=./img/censoring.png width='85%' title='INCLUDE TEXT HERE'></center> --- count: false # Survival analysis ## Modelling Broadly speaking, there are two wide “families” of survival models: <span style="display:block; margin-top: 2em ;"></span> 1. .olive[**Semi-parametric**] Survival Models (eg Cox Proportional Hazard, splines, ...) Model directly the hazard function `\(\class{olive}{h(t)}\)` – Distribution of survival time unknonwn – Less consistent with theoretical `\(\class{blue}{S(t)}\)` (typically step function) ⁣+ Does not rely on distributional assumptions ⁣+ Baseline hazard not necessary for estimation of hazard ratio <span style="display:block; margin-top: 2em ;"></span> -- 2. .blue[**Parametric**] Survival Models (eg Weibull, Exponential, ...) Model directly the time-to-event t, using a suitable parametric distribution ⁣+ Completely specified `\(\class{olive}{h(t)}\)` and `\(\class{blue}{S(t)}\)` ⁣+ More consistent with theoretical `\(\class{blue}{S(t)}\)` ⁣+ Time-quantile prediction possible – Assumption on underlying distribution --- # The problem with survival analysis in HTA Time-to-event data constitute the main outcome in a large number of HTAs (e.g. for cancer drugs &ndash) .pull-left[ <span style="display:block; margin-top: 1cm ;"></span> <center><img src=./img/cake.gif width='100%' title=''></center> ] .pull-right[ ## Data 1. We may (or may not!) access **individual level data** for "our" trial, but not for the competitors' 2. The trial data have a very limited follow up, which implies large amount of censoring - This is often OK(-ish!) for "medical stats" analysis. But **HORRIBLE** for economic evaluation! `\(\Rightarrow\)` .blue[**Extrapolation**] (more on this later...) 3. Often the data are manipulated by the stats team within the sponsor and the economic modellers only get summaries/estimates - It is **ALWAYS** good to leave things to statisticians. But the modellers can (should?!) be statisticians too, so they could handle the data!... ] --- count: false # The problem with survival analysis in HTA Time-to-event data constitute the main outcome in a large number of HTAs (e.g. for cancer drugs) .pull-left[ <span style="display:block; margin-top: 1cm ;"></span> <center><img src=./img/destinyschild.gif width='100%' title=''></center> ] .pull-right[ ## Models 1. Which model is the "best fit" – how to judge that? 2. Is modelling even enough? (How to make the most of "external data") 3. Should you be Bayesians about this? - (Spoiler alert: the answer is *always* Yes!... 😉) ] --- count: false # Survival analysis in HTA ### General structure `$$\class{myblue}{t \sim f(\mu(\bm{x}),\alpha(\bm{x})), \qquad t\geq 0}$$` - `\(\bm{x}=\)` vector of covariates (potentially influencing survival) - `\(\mu(\bm{x})=\)` .blue[**location**] parameter - Scale or mean – usually main objective of the (biostats!) analysis - Typically depends on the covariates `\(\bm{x}\)` - `\(\alpha(\bm{x})=\)` .olive[**ancillary**] parameters - Shape, variances, etc - May depend on `\(\bm{x}\)`, but often assume they don't (see <svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M503.52,241.48c-.12-1.56-.24-3.12-.24-4.68v-.12l-.36-4.68v-.12a245.86,245.86,0,0,0-7.32-41.15c0-.12,0-.12-.12-.24l-1.08-4c-.12-.24-.12-.48-.24-.6-.36-1.2-.72-2.52-1.08-3.72-.12-.24-.12-.6-.24-.84-.36-1.2-.72-2.4-1.08-3.48-.12-.36-.24-.6-.36-1-.36-1.2-.72-2.28-1.2-3.48l-.36-1.08c-.36-1.08-.84-2.28-1.2-3.36a8.27,8.27,0,0,0-.36-1c-.48-1.08-.84-2.28-1.32-3.36-.12-.24-.24-.6-.36-.84-.48-1.2-1-2.28-1.44-3.48,0-.12-.12-.24-.12-.36-1.56-3.84-3.24-7.68-5-11.4l-.36-.72c-.48-1-.84-1.8-1.32-2.64-.24-.48-.48-1.08-.72-1.56-.36-.84-.84-1.56-1.2-2.4-.36-.6-.6-1.2-1-1.8s-.84-1.44-1.2-2.28c-.36-.6-.72-1.32-1.08-1.92s-.84-1.44-1.2-2.16a18.07,18.07,0,0,0-1.2-2c-.36-.72-.84-1.32-1.2-2s-.84-1.32-1.2-2-.84-1.32-1.2-1.92-.84-1.44-1.32-2.16a15.63,15.63,0,0,0-1.2-1.8L463.2,119a15.63,15.63,0,0,0-1.2-1.8c-.48-.72-1.08-1.56-1.56-2.28-.36-.48-.72-1.08-1.08-1.56l-1.8-2.52c-.36-.48-.6-.84-1-1.32-1-1.32-1.8-2.52-2.76-3.72a248.76,248.76,0,0,0-23.51-26.64A186.82,186.82,0,0,0,412,62.46c-4-3.48-8.16-6.72-12.48-9.84a162.49,162.49,0,0,0-24.6-15.12c-2.4-1.32-4.8-2.52-7.2-3.72a254,254,0,0,0-55.43-19.56c-1.92-.36-3.84-.84-5.64-1.2h-.12c-1-.12-1.8-.36-2.76-.48a236.35,236.35,0,0,0-38-4H255.14a234.62,234.62,0,0,0-45.48,5c-33.59,7.08-63.23,21.24-82.91,39-1.08,1-1.92,1.68-2.4,2.16l-.48.48H124l-.12.12.12-.12a.12.12,0,0,0,.12-.12l-.12.12a.42.42,0,0,1,.24-.12c14.64-8.76,34.92-16,49.44-19.56l5.88-1.44c.36-.12.84-.12,1.2-.24,1.68-.36,3.36-.72,5.16-1.08.24,0,.6-.12.84-.12C250.94,20.94,319.34,40.14,367,85.61a171.49,171.49,0,0,1,26.88,32.76c30.36,49.2,27.48,111.11,3.84,147.59-34.44,53-111.35,71.27-159,24.84a84.19,84.19,0,0,1-25.56-59,74.05,74.05,0,0,1,6.24-31c1.68-3.84,13.08-25.67,18.24-24.59-13.08-2.76-37.55,2.64-54.71,28.19-15.36,22.92-14.52,58.2-5,83.28a132.85,132.85,0,0,1-12.12-39.24c-12.24-82.55,43.31-153,94.31-170.51-27.48-24-96.47-22.31-147.71,15.36-29.88,22-51.23,53.16-62.51,90.36,1.68-20.88,9.6-52.08,25.8-83.88-17.16,8.88-39,37-49.8,62.88-15.6,37.43-21,82.19-16.08,124.79.36,3.24.72,6.36,1.08,9.6,19.92,117.11,122,206.38,244.78,206.38C392.77,503.42,504,392.19,504,255,503.88,250.48,503.76,245.92,503.52,241.48Z"></path></svg> [NICE TSD 14](http://nicedsu.org.uk/technical-support-documents/survival-analysis-tsd/)) - **NB**: `\(S(t)\)` and `\(h(t)\)` are functions of `\(\mu(\bm{x}), \alpha(\bm{x})\)` -- - Typically use generalised linear model `$$\class{myblue}{g(\mu_i)=\beta_0 + \sum_{j=1}^J \beta_j x_{ij} [+ \ldots]}$$` <span style="display:block; margin-top: -20px ;"></span> – since `\(t>0\)`, usually, `\(g(\cdot) = \log\)` .lightgray[ - In a Bayesian setting, complete by putting suitable priors on `\(\bm\beta\)` and `\(\alpha\)` (more on this later...) ] --- count: false # Survival analysis in HTA ### For example... (see <svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M503.52,241.48c-.12-1.56-.24-3.12-.24-4.68v-.12l-.36-4.68v-.12a245.86,245.86,0,0,0-7.32-41.15c0-.12,0-.12-.12-.24l-1.08-4c-.12-.24-.12-.48-.24-.6-.36-1.2-.72-2.52-1.08-3.72-.12-.24-.12-.6-.24-.84-.36-1.2-.72-2.4-1.08-3.48-.12-.36-.24-.6-.36-1-.36-1.2-.72-2.28-1.2-3.48l-.36-1.08c-.36-1.08-.84-2.28-1.2-3.36a8.27,8.27,0,0,0-.36-1c-.48-1.08-.84-2.28-1.32-3.36-.12-.24-.24-.6-.36-.84-.48-1.2-1-2.28-1.44-3.48,0-.12-.12-.24-.12-.36-1.56-3.84-3.24-7.68-5-11.4l-.36-.72c-.48-1-.84-1.8-1.32-2.64-.24-.48-.48-1.08-.72-1.56-.36-.84-.84-1.56-1.2-2.4-.36-.6-.6-1.2-1-1.8s-.84-1.44-1.2-2.28c-.36-.6-.72-1.32-1.08-1.92s-.84-1.44-1.2-2.16a18.07,18.07,0,0,0-1.2-2c-.36-.72-.84-1.32-1.2-2s-.84-1.32-1.2-2-.84-1.32-1.2-1.92-.84-1.44-1.32-2.16a15.63,15.63,0,0,0-1.2-1.8L463.2,119a15.63,15.63,0,0,0-1.2-1.8c-.48-.72-1.08-1.56-1.56-2.28-.36-.48-.72-1.08-1.08-1.56l-1.8-2.52c-.36-.48-.6-.84-1-1.32-1-1.32-1.8-2.52-2.76-3.72a248.76,248.76,0,0,0-23.51-26.64A186.82,186.82,0,0,0,412,62.46c-4-3.48-8.16-6.72-12.48-9.84a162.49,162.49,0,0,0-24.6-15.12c-2.4-1.32-4.8-2.52-7.2-3.72a254,254,0,0,0-55.43-19.56c-1.92-.36-3.84-.84-5.64-1.2h-.12c-1-.12-1.8-.36-2.76-.48a236.35,236.35,0,0,0-38-4H255.14a234.62,234.62,0,0,0-45.48,5c-33.59,7.08-63.23,21.24-82.91,39-1.08,1-1.92,1.68-2.4,2.16l-.48.48H124l-.12.12.12-.12a.12.12,0,0,0,.12-.12l-.12.12a.42.42,0,0,1,.24-.12c14.64-8.76,34.92-16,49.44-19.56l5.88-1.44c.36-.12.84-.12,1.2-.24,1.68-.36,3.36-.72,5.16-1.08.24,0,.6-.12.84-.12C250.94,20.94,319.34,40.14,367,85.61a171.49,171.49,0,0,1,26.88,32.76c30.36,49.2,27.48,111.11,3.84,147.59-34.44,53-111.35,71.27-159,24.84a84.19,84.19,0,0,1-25.56-59,74.05,74.05,0,0,1,6.24-31c1.68-3.84,13.08-25.67,18.24-24.59-13.08-2.76-37.55,2.64-54.71,28.19-15.36,22.92-14.52,58.2-5,83.28a132.85,132.85,0,0,1-12.12-39.24c-12.24-82.55,43.31-153,94.31-170.51-27.48-24-96.47-22.31-147.71,15.36-29.88,22-51.23,53.16-62.51,90.36,1.68-20.88,9.6-52.08,25.8-83.88-17.16,8.88-39,37-49.8,62.88-15.6,37.43-21,82.19-16.08,124.79.36,3.24.72,6.36,1.08,9.6,19.92,117.11,122,206.38,244.78,206.38C392.77,503.42,504,392.19,504,255,503.88,250.48,503.76,245.92,503.52,241.48Z"></path></svg> [`survHE` paper](https://www.jstatsoft.org/article/view/v095i14) + <svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M503.52,241.48c-.12-1.56-.24-3.12-.24-4.68v-.12l-.36-4.68v-.12a245.86,245.86,0,0,0-7.32-41.15c0-.12,0-.12-.12-.24l-1.08-4c-.12-.24-.12-.48-.24-.6-.36-1.2-.72-2.52-1.08-3.72-.12-.24-.12-.6-.24-.84-.36-1.2-.72-2.4-1.08-3.48-.12-.36-.24-.6-.36-1-.36-1.2-.72-2.28-1.2-3.48l-.36-1.08c-.36-1.08-.84-2.28-1.2-3.36a8.27,8.27,0,0,0-.36-1c-.48-1.08-.84-2.28-1.32-3.36-.12-.24-.24-.6-.36-.84-.48-1.2-1-2.28-1.44-3.48,0-.12-.12-.24-.12-.36-1.56-3.84-3.24-7.68-5-11.4l-.36-.72c-.48-1-.84-1.8-1.32-2.64-.24-.48-.48-1.08-.72-1.56-.36-.84-.84-1.56-1.2-2.4-.36-.6-.6-1.2-1-1.8s-.84-1.44-1.2-2.28c-.36-.6-.72-1.32-1.08-1.92s-.84-1.44-1.2-2.16a18.07,18.07,0,0,0-1.2-2c-.36-.72-.84-1.32-1.2-2s-.84-1.32-1.2-2-.84-1.32-1.2-1.92-.84-1.44-1.32-2.16a15.63,15.63,0,0,0-1.2-1.8L463.2,119a15.63,15.63,0,0,0-1.2-1.8c-.48-.72-1.08-1.56-1.56-2.28-.36-.48-.72-1.08-1.08-1.56l-1.8-2.52c-.36-.48-.6-.84-1-1.32-1-1.32-1.8-2.52-2.76-3.72a248.76,248.76,0,0,0-23.51-26.64A186.82,186.82,0,0,0,412,62.46c-4-3.48-8.16-6.72-12.48-9.84a162.49,162.49,0,0,0-24.6-15.12c-2.4-1.32-4.8-2.52-7.2-3.72a254,254,0,0,0-55.43-19.56c-1.92-.36-3.84-.84-5.64-1.2h-.12c-1-.12-1.8-.36-2.76-.48a236.35,236.35,0,0,0-38-4H255.14a234.62,234.62,0,0,0-45.48,5c-33.59,7.08-63.23,21.24-82.91,39-1.08,1-1.92,1.68-2.4,2.16l-.48.48H124l-.12.12.12-.12a.12.12,0,0,0,.12-.12l-.12.12a.42.42,0,0,1,.24-.12c14.64-8.76,34.92-16,49.44-19.56l5.88-1.44c.36-.12.84-.12,1.2-.24,1.68-.36,3.36-.72,5.16-1.08.24,0,.6-.12.84-.12C250.94,20.94,319.34,40.14,367,85.61a171.49,171.49,0,0,1,26.88,32.76c30.36,49.2,27.48,111.11,3.84,147.59-34.44,53-111.35,71.27-159,24.84a84.19,84.19,0,0,1-25.56-59,74.05,74.05,0,0,1,6.24-31c1.68-3.84,13.08-25.67,18.24-24.59-13.08-2.76-37.55,2.64-54.71,28.19-15.36,22.92-14.52,58.2-5,83.28a132.85,132.85,0,0,1-12.12-39.24c-12.24-82.55,43.31-153,94.31-170.51-27.48-24-96.47-22.31-147.71,15.36-29.88,22-51.23,53.16-62.51,90.36,1.68-20.88,9.6-52.08,25.8-83.88-17.16,8.88-39,37-49.8,62.88-15.6,37.43-21,82.19-16.08,124.79.36,3.24.72,6.36,1.08,9.6,19.92,117.11,122,206.38,244.78,206.38C392.77,503.42,504,392.19,504,255,503.88,250.48,503.76,245.92,503.52,241.48Z"></path></svg> [NICE TSD 14](http://nicedsu.org.uk/technical-support-documents/survival-analysis-tsd/)) <center><img src=./img/table_mod1.png width='68%' title='INCLUDE TEXT HERE'></center> --- # `survHE` ## A `R` package for survival analysis **in HTA** ### **Objective**: Simplify and standardise commands to fit survival analysis - Can do MLE + bootstrap to get (possibly rough-ish!) estimates from the joint distribution of the parameters - Can also do Bayesian models to get (usually better!) estimates from the joint .orange[**posterior**] distribution of the parameters - **INLA**: Super fast (comparable to MLE), but currently supports only a restricted range of models - **MCMC**: Slower, but more generalisable – .olive[`survHE`] produces and saves the model code + data & initial values, so the user can customise them -- - Automatically produces specialised graphs - Survival curves + model fitting statistics (AIC, BIC, DIC) - Can produce a full [PSA](../04_Intro_HE/#psa-scheme) characterisation of the parameters **and** the survival curves - These can be used directly in the economic model! --- count: false # `survHE` ## A `R` package for survival analysis **in HTA** ### **Objective**: Simplify and standardise commands to fit survival analysis <center><img src=./img/survHEschema.png width='75%' title='INCLUDE TEXT HERE'></center> <svg viewBox="0 0 496 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg> [https://github.com/giabaio/survHE](https://github.com/giabaio/survHE) .alignright[<svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M503.52,241.48c-.12-1.56-.24-3.12-.24-4.68v-.12l-.36-4.68v-.12a245.86,245.86,0,0,0-7.32-41.15c0-.12,0-.12-.12-.24l-1.08-4c-.12-.24-.12-.48-.24-.6-.36-1.2-.72-2.52-1.08-3.72-.12-.24-.12-.6-.24-.84-.36-1.2-.72-2.4-1.08-3.48-.12-.36-.24-.6-.36-1-.36-1.2-.72-2.28-1.2-3.48l-.36-1.08c-.36-1.08-.84-2.28-1.2-3.36a8.27,8.27,0,0,0-.36-1c-.48-1.08-.84-2.28-1.32-3.36-.12-.24-.24-.6-.36-.84-.48-1.2-1-2.28-1.44-3.48,0-.12-.12-.24-.12-.36-1.56-3.84-3.24-7.68-5-11.4l-.36-.72c-.48-1-.84-1.8-1.32-2.64-.24-.48-.48-1.08-.72-1.56-.36-.84-.84-1.56-1.2-2.4-.36-.6-.6-1.2-1-1.8s-.84-1.44-1.2-2.28c-.36-.6-.72-1.32-1.08-1.92s-.84-1.44-1.2-2.16a18.07,18.07,0,0,0-1.2-2c-.36-.72-.84-1.32-1.2-2s-.84-1.32-1.2-2-.84-1.32-1.2-1.92-.84-1.44-1.32-2.16a15.63,15.63,0,0,0-1.2-1.8L463.2,119a15.63,15.63,0,0,0-1.2-1.8c-.48-.72-1.08-1.56-1.56-2.28-.36-.48-.72-1.08-1.08-1.56l-1.8-2.52c-.36-.48-.6-.84-1-1.32-1-1.32-1.8-2.52-2.76-3.72a248.76,248.76,0,0,0-23.51-26.64A186.82,186.82,0,0,0,412,62.46c-4-3.48-8.16-6.72-12.48-9.84a162.49,162.49,0,0,0-24.6-15.12c-2.4-1.32-4.8-2.52-7.2-3.72a254,254,0,0,0-55.43-19.56c-1.92-.36-3.84-.84-5.64-1.2h-.12c-1-.12-1.8-.36-2.76-.48a236.35,236.35,0,0,0-38-4H255.14a234.62,234.62,0,0,0-45.48,5c-33.59,7.08-63.23,21.24-82.91,39-1.08,1-1.92,1.68-2.4,2.16l-.48.48H124l-.12.12.12-.12a.12.12,0,0,0,.12-.12l-.12.12a.42.42,0,0,1,.24-.12c14.64-8.76,34.92-16,49.44-19.56l5.88-1.44c.36-.12.84-.12,1.2-.24,1.68-.36,3.36-.72,5.16-1.08.24,0,.6-.12.84-.12C250.94,20.94,319.34,40.14,367,85.61a171.49,171.49,0,0,1,26.88,32.76c30.36,49.2,27.48,111.11,3.84,147.59-34.44,53-111.35,71.27-159,24.84a84.19,84.19,0,0,1-25.56-59,74.05,74.05,0,0,1,6.24-31c1.68-3.84,13.08-25.67,18.24-24.59-13.08-2.76-37.55,2.64-54.71,28.19-15.36,22.92-14.52,58.2-5,83.28a132.85,132.85,0,0,1-12.12-39.24c-12.24-82.55,43.31-153,94.31-170.51-27.48-24-96.47-22.31-147.71,15.36-29.88,22-51.23,53.16-62.51,90.36,1.68-20.88,9.6-52.08,25.8-83.88-17.16,8.88-39,37-49.8,62.88-15.6,37.43-21,82.19-16.08,124.79.36,3.24.72,6.36,1.08,9.6,19.92,117.11,122,206.38,244.78,206.38C392.77,503.42,504,392.19,504,255,503.88,250.48,503.76,245.92,503.52,241.48Z"></path></svg> [`survHE` webpage](https://gianluca.statistica.it/software/survhe/)] --- # Fitting parametric models in `R` with `survHE` .panelset[ .panel[ .panel-name[Running the model] ```r > # Loads the package > # see https://gianluca.statistica.it/software/survhe/) > library(survHE) > > # Defines the 'model formula' > formula=Surv(TIME,EVENT)~1 > > # Fits the model on the data for the Intervention group only using a bunch of distributions > m.int=fit.models(formula,data=subset(data,treatment=="Intervention"), + distr=c("exp","weibull","lnorm","llogis","gompertz","gengamma")) > > # Fits the model on the data for the Control group only using a bunch of distributions > m.ctr=fit.models(formula,data=subset(data,treatment=="Comparator"), + distr=c("exp","weibull","lnorm","llogis","gompertz","gengamma")) ``` ] .panel[ .panel-name[Exploring the object] ```r > # Explores the object 'm.int' to see what's inside... > lapply(m.int,names) ``` ``` $models [1] "Exponential" "Weibull (AFT)" "log-Normal" "log-Logistic" "Gompertz" "Gen. Gamma" $model.fitting [1] "aic" "bic" "dic" $method NULL $misc [1] "time2run" "formula" "data" "model_name" "km" ``` ```r > # Shows model fitting statistics (eg AIC) > m.int$model.fitting$aic ``` ``` [1] 3031.740 3021.513 3032.696 3024.756 3027.801 3021.369 ``` ] .panel[ .panel-name[Estimates (1)] .pull-left[ ```r > # Prints the model estimates for model 1 (Exponential) > print(m.int,mod=1) ``` ``` Model fit for the Exponential model, obtained using Flexsurvreg (Maximum Likelihood Estimate). Running time: 0.106 seconds mean se L95% U95% rate 0.00193397 0.000133775 0.00168877 0.00221477 Model fitting summaries Akaike Information Criterion (AIC)....: 3031.740 Bayesian Information Criterion (BIC)..: 3035.508 ``` ] .pull-right[ ```r > # Prints the model estimates for model 2 (Weibull) > print(m.int,mod=2) ``` ``` Model fit for the Weibull AF model, obtained using Flexsurvreg (Maximum Likelihood Estimate). Running time: 0.008 seconds mean se L95% U95% shape 1.22191 0.0668217 1.09772 1.36016 scale 511.30594 28.9447135 457.60930 571.30343 Model fitting summaries Akaike Information Criterion (AIC)....: 3021.513 Bayesian Information Criterion (BIC)..: 3029.050 ``` ] ] .panel[ .panel-name[Estimates (2)] ```r > # Prints the model estimates for model 3 (log-Normal), using 3 digits precision > print(m.int,mod=3,digits=3) ``` ``` Model fit for the log-Normal model, obtained using Flexsurvreg (Maximum Likelihood Estimate). Running time: 0.005 seconds mean se L95% U95% meanlog 5.83 0.0693 5.7 5.97 sdlog 1.11 0.0550 1.0 1.22 Model fitting summaries Akaike Information Criterion (AIC)....: 3032.696 Bayesian Information Criterion (BIC)..: 3040.232 ``` ] .panel[ .panel-name[Estimates (3)] ```r > # Can also show the output printout from the original inferential engine ('flexsurv' in this case...) > print(m.int,mod=3,original=TRUE) ``` ``` Call: flexsurvreg(formula = Surv(TIME, EVENT) ~ 1, data = data, dist = "lnorm") Estimates: est L95% U95% se meanlog 5.8317202 5.6958328 5.9676076 0.0693316 sdlog 1.1059558 1.0032757 1.2191447 0.0549826 N = 320, Events: 209, Censored: 111 Total time at risk: 108068 Log-likelihood = -1514.348, df = 2 AIC = 3032.696 ``` ] ] --- count: false # Fitting parametric models in `R` with `survHE` .panelset[ .panel[ .panel-name[Plotting (1)] ```r > plot(m.int) # Basic plot function (based on 'ggplot2') ``` <img src="./img/unnamed-chunk-11-1.png" style="display: block; margin: auto;" width="36%" title="INSERT TEXT HERE"> ] .panel[ .panel-name[Plotting (2)] ```r > plot(m.int,mods=6) # Selects only the 6th model (Generalised Gamma) ``` <img src="./img/unnamed-chunk-12-1.png" style="display: block; margin: auto;" width="36%" title="INSERT TEXT HERE"> ] .panel[ .panel-name[Plotting (3)] ```r > plot(m.int,mods=6,add.km=TRUE) # Selects only the 6th model (Generalised Gamma) and adds Kaplan-Maier curve ``` <img src="./img/unnamed-chunk-13-1.png" style="display: block; margin: auto;" width="36%" title="INSERT TEXT HERE"> ] .panel[ .panel-name[Model fit] ```r > model.fit.plot(m.int) ``` <img src="./img/unnamed-chunk-14-1.png" style="display: block; margin: auto;" width="46%" title="INSERT TEXT HERE"> ] .panel[ .panel-name[...and more!] Many more options are shown and explained in the `survHE` <svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M503.52,241.48c-.12-1.56-.24-3.12-.24-4.68v-.12l-.36-4.68v-.12a245.86,245.86,0,0,0-7.32-41.15c0-.12,0-.12-.12-.24l-1.08-4c-.12-.24-.12-.48-.24-.6-.36-1.2-.72-2.52-1.08-3.72-.12-.24-.12-.6-.24-.84-.36-1.2-.72-2.4-1.08-3.48-.12-.36-.24-.6-.36-1-.36-1.2-.72-2.28-1.2-3.48l-.36-1.08c-.36-1.08-.84-2.28-1.2-3.36a8.27,8.27,0,0,0-.36-1c-.48-1.08-.84-2.28-1.32-3.36-.12-.24-.24-.6-.36-.84-.48-1.2-1-2.28-1.44-3.48,0-.12-.12-.24-.12-.36-1.56-3.84-3.24-7.68-5-11.4l-.36-.72c-.48-1-.84-1.8-1.32-2.64-.24-.48-.48-1.08-.72-1.56-.36-.84-.84-1.56-1.2-2.4-.36-.6-.6-1.2-1-1.8s-.84-1.44-1.2-2.28c-.36-.6-.72-1.32-1.08-1.92s-.84-1.44-1.2-2.16a18.07,18.07,0,0,0-1.2-2c-.36-.72-.84-1.32-1.2-2s-.84-1.32-1.2-2-.84-1.32-1.2-1.92-.84-1.44-1.32-2.16a15.63,15.63,0,0,0-1.2-1.8L463.2,119a15.63,15.63,0,0,0-1.2-1.8c-.48-.72-1.08-1.56-1.56-2.28-.36-.48-.72-1.08-1.08-1.56l-1.8-2.52c-.36-.48-.6-.84-1-1.32-1-1.32-1.8-2.52-2.76-3.72a248.76,248.76,0,0,0-23.51-26.64A186.82,186.82,0,0,0,412,62.46c-4-3.48-8.16-6.72-12.48-9.84a162.49,162.49,0,0,0-24.6-15.12c-2.4-1.32-4.8-2.52-7.2-3.72a254,254,0,0,0-55.43-19.56c-1.92-.36-3.84-.84-5.64-1.2h-.12c-1-.12-1.8-.36-2.76-.48a236.35,236.35,0,0,0-38-4H255.14a234.62,234.62,0,0,0-45.48,5c-33.59,7.08-63.23,21.24-82.91,39-1.08,1-1.92,1.68-2.4,2.16l-.48.48H124l-.12.12.12-.12a.12.12,0,0,0,.12-.12l-.12.12a.42.42,0,0,1,.24-.12c14.64-8.76,34.92-16,49.44-19.56l5.88-1.44c.36-.12.84-.12,1.2-.24,1.68-.36,3.36-.72,5.16-1.08.24,0,.6-.12.84-.12C250.94,20.94,319.34,40.14,367,85.61a171.49,171.49,0,0,1,26.88,32.76c30.36,49.2,27.48,111.11,3.84,147.59-34.44,53-111.35,71.27-159,24.84a84.19,84.19,0,0,1-25.56-59,74.05,74.05,0,0,1,6.24-31c1.68-3.84,13.08-25.67,18.24-24.59-13.08-2.76-37.55,2.64-54.71,28.19-15.36,22.92-14.52,58.2-5,83.28a132.85,132.85,0,0,1-12.12-39.24c-12.24-82.55,43.31-153,94.31-170.51-27.48-24-96.47-22.31-147.71,15.36-29.88,22-51.23,53.16-62.51,90.36,1.68-20.88,9.6-52.08,25.8-83.88-17.16,8.88-39,37-49.8,62.88-15.6,37.43-21,82.19-16.08,124.79.36,3.24.72,6.36,1.08,9.6,19.92,117.11,122,206.38,244.78,206.38C392.77,503.42,504,392.19,504,255,503.88,250.48,503.76,245.92,503.52,241.48Z"></path></svg> [paper](https://www.jstatsoft.org/article/view/v095i14) and <svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M503.52,241.48c-.12-1.56-.24-3.12-.24-4.68v-.12l-.36-4.68v-.12a245.86,245.86,0,0,0-7.32-41.15c0-.12,0-.12-.12-.24l-1.08-4c-.12-.24-.12-.48-.24-.6-.36-1.2-.72-2.52-1.08-3.72-.12-.24-.12-.6-.24-.84-.36-1.2-.72-2.4-1.08-3.48-.12-.36-.24-.6-.36-1-.36-1.2-.72-2.28-1.2-3.48l-.36-1.08c-.36-1.08-.84-2.28-1.2-3.36a8.27,8.27,0,0,0-.36-1c-.48-1.08-.84-2.28-1.32-3.36-.12-.24-.24-.6-.36-.84-.48-1.2-1-2.28-1.44-3.48,0-.12-.12-.24-.12-.36-1.56-3.84-3.24-7.68-5-11.4l-.36-.72c-.48-1-.84-1.8-1.32-2.64-.24-.48-.48-1.08-.72-1.56-.36-.84-.84-1.56-1.2-2.4-.36-.6-.6-1.2-1-1.8s-.84-1.44-1.2-2.28c-.36-.6-.72-1.32-1.08-1.92s-.84-1.44-1.2-2.16a18.07,18.07,0,0,0-1.2-2c-.36-.72-.84-1.32-1.2-2s-.84-1.32-1.2-2-.84-1.32-1.2-1.92-.84-1.44-1.32-2.16a15.63,15.63,0,0,0-1.2-1.8L463.2,119a15.63,15.63,0,0,0-1.2-1.8c-.48-.72-1.08-1.56-1.56-2.28-.36-.48-.72-1.08-1.08-1.56l-1.8-2.52c-.36-.48-.6-.84-1-1.32-1-1.32-1.8-2.52-2.76-3.72a248.76,248.76,0,0,0-23.51-26.64A186.82,186.82,0,0,0,412,62.46c-4-3.48-8.16-6.72-12.48-9.84a162.49,162.49,0,0,0-24.6-15.12c-2.4-1.32-4.8-2.52-7.2-3.72a254,254,0,0,0-55.43-19.56c-1.92-.36-3.84-.84-5.64-1.2h-.12c-1-.12-1.8-.36-2.76-.48a236.35,236.35,0,0,0-38-4H255.14a234.62,234.62,0,0,0-45.48,5c-33.59,7.08-63.23,21.24-82.91,39-1.08,1-1.92,1.68-2.4,2.16l-.48.48H124l-.12.12.12-.12a.12.12,0,0,0,.12-.12l-.12.12a.42.42,0,0,1,.24-.12c14.64-8.76,34.92-16,49.44-19.56l5.88-1.44c.36-.12.84-.12,1.2-.24,1.68-.36,3.36-.72,5.16-1.08.24,0,.6-.12.84-.12C250.94,20.94,319.34,40.14,367,85.61a171.49,171.49,0,0,1,26.88,32.76c30.36,49.2,27.48,111.11,3.84,147.59-34.44,53-111.35,71.27-159,24.84a84.19,84.19,0,0,1-25.56-59,74.05,74.05,0,0,1,6.24-31c1.68-3.84,13.08-25.67,18.24-24.59-13.08-2.76-37.55,2.64-54.71,28.19-15.36,22.92-14.52,58.2-5,83.28a132.85,132.85,0,0,1-12.12-39.24c-12.24-82.55,43.31-153,94.31-170.51-27.48-24-96.47-22.31-147.71,15.36-29.88,22-51.23,53.16-62.51,90.36,1.68-20.88,9.6-52.08,25.8-83.88-17.16,8.88-39,37-49.8,62.88-15.6,37.43-21,82.19-16.08,124.79.36,3.24.72,6.36,1.08,9.6,19.92,117.11,122,206.38,244.78,206.38C392.77,503.42,504,392.19,504,255,503.88,250.48,503.76,245.92,503.52,241.48Z"></path></svg> [webpage](https://gianluca.statistica.it/software/survhe/) ] ] --- # Survival analysis in HTA ## ... *To be or not to be (Bayesian)?*... .center[ .pull-left[ ### Frequentist ("standard") ] .pull-right[ ### Bayesian ] ] .center[ <center><img src=./img/freq_bayes.png width='75%' title=''></center> ] <span style="display:block; margin-top: 40px ;"></span> - A Bayesian only speaks one language: probability distributions to describe - Sampling variability (relevant for observ.blue[***ed***] data) - Epistemic uncertainty (relevant for .orange[***un***]observ.orange[***able***] parameters + yet .magenta[***un***]observ.magenta[***ed***] future data) -- - Contextual (="prior") information to be formally included in the construction of the model - Almost irrelevant when evidence is "definitive" (large and consistent data) - Crucial when data are sparse! (... But this isn't preposterous, is it?...) --- count: false # Survival analysis in HTA ## ... *To be or not to be (Bayesian)?*... (in HTA) -- .center[ .pull-left[ ### Frequentist ("standard") <center><img src=./img/two-stage.png width='610px' title=''></center> ] ] --- count: false # Survival analysis in HTA ## ... *To be or not to be (Bayesian)?*... (in HTA) .center[ .pull-left[ ### Frequentist ("standard") <center><img src=./img/two-stage.png width='610px' title=''></center> ] .pull-right[ ### Bayesian <center><img src=./img/integrated.png width='610px' title=''></center> ] ] .footnote[ `\(^*\)`_The answer is always "yes"..._ 😉 ] --- count: false # Survival analysis in HTA ## ... *To be or not to be (Bayesian)?*... - For more complex models, MLE-based estimates may fail to converge – This may be an issue for multi-parameter models, where limited data (not compounded by relevant prior information) are not enough to fit all the model parameters – **NB**: you would normally need to fit more complex models for cases where the survival curves are "strange" and so the usual parametric models fail to provide sufficient fit .lightgray[ - When there is strong correlation among the survival parameters, the results of the uncertainty analysis may be (strongly) biased under a more simplistic frequentist model – This matters most in health economics, because this bias carries over the economic modelling, optimal decision making and assessment of the impact of parametric uncertainty! – **A full Bayesian approach propagates directly correlation and uncertainty in the model parameters through to the survival curves and the economic model** ] --- count: false # Survival analysis in HTA ## ... *To be or not to be (Bayesian)?*... ```{eval=FALSE} Model fit for the Generalised F model, obtained using Flexsurvreg (Maximum Likelihood Estimate). `Running time: 1.157 seconds` mean se L95% U95% mu 2.29139696 0.0798508 2.13489e+00 2.44790e+00 sigma 0.58729598 0.0725044 4.61076e-01 7.48069e-01 Q 0.84874994 0.2506424 3.57500e-01 1.34000e+00 P 0.00268265 0.0902210 `6.33197e-32 1.13655e+26` as.factor(arm)1 0.34645851 0.0877892 1.74395e-01 5.18522e-01 ``` <span style="display:block; margin-top: 2em ;"></span> ```{eval=FALSE} Model fit for the Generalised F model, obtained using Stan (Bayesian inference via Hamiltonian Monte Carlo). `Running time: 26.692 seconds` mean se L95% U95% mu 2.256760 0.3455163 1.1897086 3.0865904 sigma 0.507861 0.0762112 0.3608566 0.6582047 Q 0.700062 0.3358360 0.0786118 1.3880582 P 1.131968 0.5837460 `0.3908284 2.634276` as.factor(arm)1 0.345516 0.0865904 0.1745665 0.5176818 ``` --- count: false # Survival analysis in HTA ## ... *To be or not to be (Bayesian)?*... .lightgray[ - For more complex models, MLE-based estimates may fail to converge – This may be an issue for multi-parameter models, where limited data (not compounded by relevant prior information) are not enough to fit all the model parameters – **NB**: you would normally need to fit more complex models for cases where the survival curves are "strange" and so the usual parametric models fail to provide sufficient fit ] - When there is strong correlation among the survival parameters, the results of the uncertainty analysis may be (strongly) biased under a more simplistic frequentist model – This matters most in health economics, because this bias carries over the economic modelling, optimal decision making and assessment of the impact of parametric uncertainty! – .olive[**A full Bayesian approach propagates directly correlation and uncertainty in the model parameters through to the survival curves and the economic model**] --- # Bayesian survival analysis using `survHE` - In theory, coding up a survival model in standard Bayesian software (eg `BUGS` or `JAGS`) is not that complicated - **NB**: although they differ in how they take care of censoring, so some care is needed! <span style="display:block; margin-top: 20px ;"></span> - **BUT**: Gibbs sampling can struggle with survival models - Compilation and running time can be rather long - Because the main outcome `\(t\)` has missing values in the data (the censored times), it is generally useful to set initial values for `\(t\)`, in a clever way to avoid problems in running the MCMC - Convergence may be difficult to reach even with relatively simple models (eg Weibull Proportional Hazard) -- <span style="display:block; margin-top: 20ptx ;"></span> - `survHE` uses alternative modes of Bayesian inference to overcome/limit these issues - <svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;fill:orange;" xmlns="http://www.w3.org/2000/svg"> <path d="M503.52,241.48c-.12-1.56-.24-3.12-.24-4.68v-.12l-.36-4.68v-.12a245.86,245.86,0,0,0-7.32-41.15c0-.12,0-.12-.12-.24l-1.08-4c-.12-.24-.12-.48-.24-.6-.36-1.2-.72-2.52-1.08-3.72-.12-.24-.12-.6-.24-.84-.36-1.2-.72-2.4-1.08-3.48-.12-.36-.24-.6-.36-1-.36-1.2-.72-2.28-1.2-3.48l-.36-1.08c-.36-1.08-.84-2.28-1.2-3.36a8.27,8.27,0,0,0-.36-1c-.48-1.08-.84-2.28-1.32-3.36-.12-.24-.24-.6-.36-.84-.48-1.2-1-2.28-1.44-3.48,0-.12-.12-.24-.12-.36-1.56-3.84-3.24-7.68-5-11.4l-.36-.72c-.48-1-.84-1.8-1.32-2.64-.24-.48-.48-1.08-.72-1.56-.36-.84-.84-1.56-1.2-2.4-.36-.6-.6-1.2-1-1.8s-.84-1.44-1.2-2.28c-.36-.6-.72-1.32-1.08-1.92s-.84-1.44-1.2-2.16a18.07,18.07,0,0,0-1.2-2c-.36-.72-.84-1.32-1.2-2s-.84-1.32-1.2-2-.84-1.32-1.2-1.92-.84-1.44-1.32-2.16a15.63,15.63,0,0,0-1.2-1.8L463.2,119a15.63,15.63,0,0,0-1.2-1.8c-.48-.72-1.08-1.56-1.56-2.28-.36-.48-.72-1.08-1.08-1.56l-1.8-2.52c-.36-.48-.6-.84-1-1.32-1-1.32-1.8-2.52-2.76-3.72a248.76,248.76,0,0,0-23.51-26.64A186.82,186.82,0,0,0,412,62.46c-4-3.48-8.16-6.72-12.48-9.84a162.49,162.49,0,0,0-24.6-15.12c-2.4-1.32-4.8-2.52-7.2-3.72a254,254,0,0,0-55.43-19.56c-1.92-.36-3.84-.84-5.64-1.2h-.12c-1-.12-1.8-.36-2.76-.48a236.35,236.35,0,0,0-38-4H255.14a234.62,234.62,0,0,0-45.48,5c-33.59,7.08-63.23,21.24-82.91,39-1.08,1-1.92,1.68-2.4,2.16l-.48.48H124l-.12.12.12-.12a.12.12,0,0,0,.12-.12l-.12.12a.42.42,0,0,1,.24-.12c14.64-8.76,34.92-16,49.44-19.56l5.88-1.44c.36-.12.84-.12,1.2-.24,1.68-.36,3.36-.72,5.16-1.08.24,0,.6-.12.84-.12C250.94,20.94,319.34,40.14,367,85.61a171.49,171.49,0,0,1,26.88,32.76c30.36,49.2,27.48,111.11,3.84,147.59-34.44,53-111.35,71.27-159,24.84a84.19,84.19,0,0,1-25.56-59,74.05,74.05,0,0,1,6.24-31c1.68-3.84,13.08-25.67,18.24-24.59-13.08-2.76-37.55,2.64-54.71,28.19-15.36,22.92-14.52,58.2-5,83.28a132.85,132.85,0,0,1-12.12-39.24c-12.24-82.55,43.31-153,94.31-170.51-27.48-24-96.47-22.31-147.71,15.36-29.88,22-51.23,53.16-62.51,90.36,1.68-20.88,9.6-52.08,25.8-83.88-17.16,8.88-39,37-49.8,62.88-15.6,37.43-21,82.19-16.08,124.79.36,3.24.72,6.36,1.08,9.6,19.92,117.11,122,206.38,244.78,206.38C392.77,503.42,504,392.19,504,255,503.88,250.48,503.76,245.92,503.52,241.48Z"></path></svg> [Integrated Nested Laplace Approximation](https://www.r-inla.org/) (INLA) - Very fast and accurate, but at present can only run a limited number of survival models - <svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;fill:orange;" xmlns="http://www.w3.org/2000/svg"> <path d="M503.52,241.48c-.12-1.56-.24-3.12-.24-4.68v-.12l-.36-4.68v-.12a245.86,245.86,0,0,0-7.32-41.15c0-.12,0-.12-.12-.24l-1.08-4c-.12-.24-.12-.48-.24-.6-.36-1.2-.72-2.52-1.08-3.72-.12-.24-.12-.6-.24-.84-.36-1.2-.72-2.4-1.08-3.48-.12-.36-.24-.6-.36-1-.36-1.2-.72-2.28-1.2-3.48l-.36-1.08c-.36-1.08-.84-2.28-1.2-3.36a8.27,8.27,0,0,0-.36-1c-.48-1.08-.84-2.28-1.32-3.36-.12-.24-.24-.6-.36-.84-.48-1.2-1-2.28-1.44-3.48,0-.12-.12-.24-.12-.36-1.56-3.84-3.24-7.68-5-11.4l-.36-.72c-.48-1-.84-1.8-1.32-2.64-.24-.48-.48-1.08-.72-1.56-.36-.84-.84-1.56-1.2-2.4-.36-.6-.6-1.2-1-1.8s-.84-1.44-1.2-2.28c-.36-.6-.72-1.32-1.08-1.92s-.84-1.44-1.2-2.16a18.07,18.07,0,0,0-1.2-2c-.36-.72-.84-1.32-1.2-2s-.84-1.32-1.2-2-.84-1.32-1.2-1.92-.84-1.44-1.32-2.16a15.63,15.63,0,0,0-1.2-1.8L463.2,119a15.63,15.63,0,0,0-1.2-1.8c-.48-.72-1.08-1.56-1.56-2.28-.36-.48-.72-1.08-1.08-1.56l-1.8-2.52c-.36-.48-.6-.84-1-1.32-1-1.32-1.8-2.52-2.76-3.72a248.76,248.76,0,0,0-23.51-26.64A186.82,186.82,0,0,0,412,62.46c-4-3.48-8.16-6.72-12.48-9.84a162.49,162.49,0,0,0-24.6-15.12c-2.4-1.32-4.8-2.52-7.2-3.72a254,254,0,0,0-55.43-19.56c-1.92-.36-3.84-.84-5.64-1.2h-.12c-1-.12-1.8-.36-2.76-.48a236.35,236.35,0,0,0-38-4H255.14a234.62,234.62,0,0,0-45.48,5c-33.59,7.08-63.23,21.24-82.91,39-1.08,1-1.92,1.68-2.4,2.16l-.48.48H124l-.12.12.12-.12a.12.12,0,0,0,.12-.12l-.12.12a.42.42,0,0,1,.24-.12c14.64-8.76,34.92-16,49.44-19.56l5.88-1.44c.36-.12.84-.12,1.2-.24,1.68-.36,3.36-.72,5.16-1.08.24,0,.6-.12.84-.12C250.94,20.94,319.34,40.14,367,85.61a171.49,171.49,0,0,1,26.88,32.76c30.36,49.2,27.48,111.11,3.84,147.59-34.44,53-111.35,71.27-159,24.84a84.19,84.19,0,0,1-25.56-59,74.05,74.05,0,0,1,6.24-31c1.68-3.84,13.08-25.67,18.24-24.59-13.08-2.76-37.55,2.64-54.71,28.19-15.36,22.92-14.52,58.2-5,83.28a132.85,132.85,0,0,1-12.12-39.24c-12.24-82.55,43.31-153,94.31-170.51-27.48-24-96.47-22.31-147.71,15.36-29.88,22-51.23,53.16-62.51,90.36,1.68-20.88,9.6-52.08,25.8-83.88-17.16,8.88-39,37-49.8,62.88-15.6,37.43-21,82.19-16.08,124.79.36,3.24.72,6.36,1.08,9.6,19.92,117.11,122,206.38,244.78,206.38C392.77,503.42,504,392.19,504,255,503.88,250.48,503.76,245.92,503.52,241.48Z"></path></svg> [Hamiltonian Monte Carlo](https://mc-stan.org/docs/2_25/reference-manual/hamiltonian-monte-carlo.html) (HMC) - MCMC algorithm, slightly cleverer than Gibbs sampling (for some models...) - **Very** efficient for survival analysis - Can implement virtually *any* model – `rstan` allows easy-ish building blocks to define new sampling distributions (accounting for censoring etc...) --- count: false # **Bayesian** survival analysis using `survHE` <center><img src=./img/table_mod2.png width='70%' title='INCLUDE TEXT HERE'></center> --- count: false # **Bayesian** survival analysis using `survHE` ### HMC .panelset[ .panel[ .panel-name[Running the model] ```r > # Calls the 'survHE' function 'fit.models' to run the model > # 1. using HMC as inferential engine (with the option: 'method="hmc"') > # 2. specifying a Weibull distribution for the data ('distr="weibull"') > m.hmc=fit.models(Surv(TIME,EVENT)~as.factor(treatment), + data=dat, + distr="weibull", *+ method="hmc" + ) ``` ] .panel[ .panel-name[Checks] .pull-left[ ```r > # Check convergence of the model using standard 'rstan' tools: Traceplots > rstan::traceplot(m.hmc$models[[1]]) ``` <img src="./img/unnamed-chunk-18-1.png" style="display: block; margin: auto;" width="55%"> ] .pull-right[ ```r > # Check convergence of the model using standard 'rstan' tools: Autocorrelation > rstan::stan_ac(m.hmc$models[[1]]) ``` <img src="./img/unnamed-chunk-19-1.png" style="display: block; margin: auto;" width="55%"> ] ] .panel[ .panel-name[Output] .pull-left[ ```r > # Shows the parameter estimates in the formatting of 'survHE'... > print(m.hmc,digits=4) ``` ``` Model fit for the Weibull AF model, obtained using Stan (Bayesian inference via Hamiltonian Monte Carlo). Running time: 2.7867 seconds mean se L95% U95% shape 1.8025 0.11190 1.591 2.0268 scale 10.2605 0.57831 9.209 11.4580 as.factor(treatment)Intervention 0.3475 0.08286 0.190 0.5184 Model fitting summaries Akaike Information Criterion (AIC)....: 1205.147 Bayesian Information Criterion (BIC)..: 1220.769 Deviance Information Criterion (DIC)..: 1203.007 ``` ] .pull-right[ ```r > # ...or in 'rstan' original formatting (adding the option 'original=TRUE')... > print(m.hmc,digits=2, original=TRUE) ``` ``` Inference for Stan model: WeibullAF. 2 chains, each with iter=2000; warmup=1000; thin=1; post-warmup draws per chain=1000, total post-warmup draws=2000. mean se_mean sd 2.5% 25% 50% 75% 97.5% n_eff Rhat beta[1] 2.33 0.00 0.06 2.22 2.29 2.32 2.36 2.44 1088 1 beta[2] 0.35 0.00 0.08 0.19 0.29 0.35 0.40 0.52 1264 1 alpha 1.80 0.00 0.11 1.59 1.72 1.80 1.88 2.03 1440 1 scale 10.26 0.02 0.58 9.21 9.88 10.21 10.63 11.46 1081 1 lp__ -600.27 0.04 1.19 -603.37 -600.79 -599.94 -599.41 -598.91 811 1 Samples were drawn using NUTS(diag_e) at Tue Jun 20 19:15:49 2023. For each parameter, n_eff is a crude measure of effective sample size, and Rhat is the potential scale reduction factor on split chains (at convergence, Rhat=1). ``` ] ] ] --- count: false # **Bayesian** survival analysis using `survHE` ### INLA .panelset[ .panel[ .panel-name[Running the model] ```r > # Calls the 'survHE' function 'fit.models' to run the model > # 1. using INLA as inferential engine (with the option: 'method="inla"') > # 2. specifying a Weibull distribution for the data ('distr="weibull"') > m.inla=fit.models(Surv(TIME,EVENT)~as.factor(treatment), + data=dat,distr="weibull", *+ method="inla" + ) ``` ] .panel[ .panel-name[Comparing the results] .pull-left[ ```r > # INLA output with parameters estimates > print(m.inla,digits=4) ``` ``` Model fit for the Weibull AF model, obtained using INLA (Bayesian inference via Integrated Nested Laplace Approximation). Running time: 0.61784 seconds mean se L95% U95% shape 1.760 0.10951 1.5558 1.9837 scale 10.349 0.58332 9.3002 11.6048 as.factor(treatment)Intervention 0.348 0.08842 0.1778 0.5168 Model fitting summaries Akaike Information Criterion (AIC)....: 1205.363 Bayesian Information Criterion (BIC)..: 1220.985 Deviance Information Criterion (DIC)..: 1206.569 ``` ] .pull-right[ ```r > # HMC output with parameters estimates > print(m.hmc,digits=4) ``` ``` Model fit for the Weibull AF model, obtained using Stan (Bayesian inference via Hamiltonian Monte Carlo). Running time: 2.7867 seconds mean se L95% U95% shape 1.8025 0.11190 1.591 2.0268 scale 10.2605 0.57831 9.209 11.4580 as.factor(treatment)Intervention 0.3475 0.08286 0.190 0.5184 Model fitting summaries Akaike Information Criterion (AIC)....: 1205.147 Bayesian Information Criterion (BIC)..: 1220.769 Deviance Information Criterion (DIC)..: 1203.007 ``` ] ] .panel[ .panel-name[Graphical comparison] ```r > plot(INLA=m.inla,HMC=m.hmc,lab.profile=c("Control","Intervention")) ``` <img src="./img/unnamed-chunk-25-1.png" style="display: block; margin: auto;" width="32%"> ] ] --- class: part-page count: false # Part 2: Extrapolation --- # Extrapolation ## A recipe for disaster?... .pull-left[ <center><img src=./img/ristorante.png width='74%' title=''></center> ] .pull-right[ <center><img src=./img/pizza.png width='185%' title=''></center> ] --- # Summary - Assess .red[**long-term**] cost-effectiveness based only on .red[**short-term**] data - Rationale and complications - Diagnostics - Frequentist vs Bauesian approach - Computational implementation - Examples <span style="display:block; margin-top: 4em ;"></span> .content-box-beamer[ ### **References** <span style="display:block; margin-top: 20px ;"></span> <svg viewBox="0 0 448 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z"></path> </svg> <i>Bayesian Methods in Health Economics</i>, chapter 5.5 .button[<img src="img/routledge.png" width="7%"> [Book website (CRC)](https://www-taylorfrancis-com.libproxy.ucl.ac.uk/books/9780429111396)] .button[<i class="fab fa-firefox"></i> [Book website](https://gianluca.statistica.it/bmhe)] .button[<i class="fab fa-github"></i> [Code](https://github.com/giabaio/BCEA)] <svg viewBox="0 0 448 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z"></path> </svg> <i>Decision Modelling for Health Economic Evaluation</i> .button[<img src="img/oup-1.png" width="10%"> [Book website](https://global.oup.com/academic/product/decision-modelling-for-health-economic-evaluation-9780198526629?cc=gb&lang=en&)] <svg viewBox="0 0 448 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z"></path> </svg> <i>Evidence Synthesis for Decision Making in Healthcare</i> .button[<img src="img/wiley.png" width="10%"> [Book website](https://www.wiley.com/en-gb/Evidence+Synthesis+for+Decision+Making+in+Healthcare-p-9780470061091)] <svg viewBox="0 0 448 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z"></path> </svg> <i>Bayesian Cost-Effectiveness Analysis with the R package BCEA</i> .button[<img src="img/springer.png" width="8%"> [Book website (Springer)](http://www.springer.com/us/book/9783319557168)] .button[<i class="fab fa-firefox"></i> [Book website](https://gianluca.statistica.it/book/bcea/)] ] --- # Survival analysis in HTA .alignleft[ .ubuntublue[Trial data – [Kaplan-Meier](https://en.wikipedia.org/wiki/Kaplan–Meier_estimator) curves] ] <center><img src=./img/km.png width='60%' title='The Kaplan-Meier curves are non-parametric statistics used to estimate the survival function from lifetime data. They resemble closely the observed data'></center> --- count: false # Survival analysis in HTA .alignleft[ .ubuntublue[**Median** time:] `\(\class{ubuntublue}{t: S(t)=0.5}\)` ] <center><img src=./img/median-time.png width='60%' title='The median survival time is the time (on the x-axis) in correspondence of which the estimated survival curve is equal to 0.5. That is the point in the follow up at which 50% of the population have experienced the event'></center> --- count: false # Survival analysis in HTA .alignleft[ .ubuntublue[**Mean** time:] `\(\class{ubuntublue}{\displaystyle\int_0^\infty S(t)dt}\)` ] <center><img src=./img/mean-time.png width='60%' title='Conversely, the mean survival time gives the point on the x-axis that balances the distribution of the times. Because the underlying time distributions is generally skewed, mean and median times tend to be different'></center> --- # Extrapolation ## A recipe for disaster?... <img src="./img/unnamed-chunk-29-1.png" style="display: block; margin: auto;" width="60%" title="INSERT TEXT HERE"> --- count: false # Extrapolation ## A recipe for disaster?... <img src="./img/unnamed-chunk-30-1.png" style="display: block; margin: auto;" width="60%" title="INSERT TEXT HERE"> --- count: false # Extrapolation ## A recipe for disaster?... <img src="./img/unnamed-chunk-31-1.png" style="display: block; margin: auto;" width="60%" title="INSERT TEXT HERE"> --- count: false # Extrapolation ## A recipe for disaster?... <img src="./img/unnamed-chunk-32-1.png" style="display: block; margin: auto;" width="50%" title="INSERT TEXT HERE"> - **NB**: Any \*IC can only tell us about model fit **for the observed data**! - Extrapolation (like missing data) is based on (virtually) untestable assumptions --- count: false # Extrapolation ## A recipe for disaster?... <center><img src=./img/xls_analysis.png width='68%' title='INCLUDE TEXT HERE'></center> --- count: false # Extrapolation using `survHE` .panelset[ .panel[ .panel-name[Code] ```r > # Creates an object 'extr' with estimated values for the survival curve > # Uses the output from the 'survHE' object named 'm.int' > # Considers the 1st distribution (Exponential) > # Makes extrapolation for times 0-5000 > # Does only 1 simulation > extr=make.surv(m.int,mod=1,t=seq(0,5000),nsim=1) ``` ] .panel[ .panel-name[Processing (1)] ```r > # inspects elements of the object 'extr' > names(extr) ``` ``` [1] "S" "sim" "nsim" "mat" "des.mat" "times" ``` ```r > # number of simulated curves (one per treatment arm) > length(extr$S) ``` ``` [1] 1 ``` ] .panel[ .panel-name[Processing (2)] ```r > # simulated survival curve for the first of the nsim (=1 in this case...) simulations > extr$S ``` ``` [[1]] # A tibble: 5,001 × 2 time S <int> <dbl> 1 0 1 2 1 0.998 3 2 0.996 4 3 0.994 5 4 0.992 6 5 0.990 7 6 0.988 8 7 0.987 9 8 0.985 10 9 0.983 # ℹ 4,991 more rows ``` ] .panel[ .panel-name[Plotting (1)] ```r > # Uses a specialised function to plot the extrapolated survival curve > psa.plot(extr,labs="Extrapolated model (Exponential)") ``` <center><img src=./img/psa-plot.png width='34%' title='INCLUDE TEXT HERE'></center> ] .panel[ .panel-name[Plotting (2)] ```r > # Or directly using the 'plot' method - this time using 1000 simulations from the parameter distributions... > plot(m.int,nsim=1000,mods=1,t=seq(0,5000)) ``` <center><img src=./img/psa-plot-2.png width='34%' title='INCLUDE TEXT HERE'></center> ] .panel[ .panel-name[] ```r > # Computes the *mean* survival time for the 2nd model (Weibull) > summary(m.int,mod=2,t=seq(0,5000)) ``` ``` Estimated average survival time distribution* mean sd 2.5% median 97.5% 479.2834 26.85198 425.0446 479.0901 534.4599 *Computed over the range: [ 0-5000] using 1000 simulations. NB: Check that the survival curves tend to 0 over this range! ``` ] ] --- # **Bayesian** survival analysis and **PSA** - `survHE` uses the simulations produced by the **full joint posterior distribution** of all the model parameters - If the parameters are not highly correlated, these will look pretty much like the bootstrap-based simulations of flexsurv - **BUT** if the they are correlated, they won’t be the same as the bootstrap! .pull-left[ ```r > # Uses the 'survHE' method 'plot' to do the > # extrapolation for 1000 simulations from > # the joint posterior distribution, over > # a time horizon of 0-50 > plot(m.hmc, + nsim=1000, + t=seq(0,50), + lab.profile=c("Control","Intervention") + ) ``` ] .pull-right[ <img src="./img/unnamed-chunk-40-1.png" style="display: block; margin: auto;" width="80%"> ] --- # Extrapolation ## Why does this matter?... .pull-left[ - Intrinsic/pathological uncertainty in the output of the (time-to-event) statistical modelling does carry through the entire process, all the way to the decision-making <span style="display:block; margin-top: 30px ;"></span> - It is not impossible (especially in cases involving new, innovative *immuno-oncology drugs*) that the observed data be extremely sparse and subject to high censoring - In the case depicted here, the **best fitting** model responds by extrapolating a survival curve that implies .blue[Pr(alive at 15 years) > 0.5] - This may be obviously wrong/against expert or clinical opinion! ] .pull-right[ <center><img src=./img/surv2-1.png width='100%' title=''></center> ] --- count: false # Extrapolation ## Why does this matter?... .pull-left[ - Intrinsic/pathological uncertainty in the output of the (time-to-event) statistical modelling does carry through the entire process, all the way to the decision-making <span style="display:block; margin-top: 30px ;"></span> - It is not impossible (especially in cases involving new, innovative *immuno-oncology drugs*) that the observed data be extremely sparse and subject to high censoring - In the case depicted here, the **best fitting** model responds by extrapolating a survival curve that implies .blue[Pr(alive at 15 years) > 0.5] - This may be obviously wrong/against expert or clinical opinion! <svg viewBox="0 0 576 512" style="position:relative;display:inline-block;fill:red;height:1.7em;top:.45em;" xmlns="http://www.w3.org/2000/svg"> <path d="M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"></path></svg> We need to **formally** and **quantitatively** consider what the implications of this uncertainty are on the decision-making process! <svg viewBox="0 0 448 512" style="position:relative;display:inline-block;fill:blue;height:1.3em;top:.45em;" xmlns="http://www.w3.org/2000/svg"> <path d="M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"></path></svg> Integrate different sources of data (including "Real World Evidence")! ] .pull-right[ <center><img src=./img/surv2-1.png width='100%' title=''></center> ] --- # Combining composite data sources ## Increasingly popular - 13 Technology Assessments (TAs) in immuno-oncology in the period 2019-2021 - 7 formally included external data, of various form - Sources used to support treatment effect waning (or lack of it) included: - Other non-pivotal clinical trials and published sources with specific % of patients alive at a time point - Flatiron (or other registries such as SEER) - Clinical expert opinion ("soft" vs "hard" data... `\(\Rightarrow\)` more on this later) - On % of patients surviving at a specific time `\(t\)` - On clinical implausibility of hazards crossing and becoming higher for intervention vs comparator -- ## Challenges - Heterogeneity/representativeness - "Exchangeability" - Afterthought vs plan ahead... - KOL/Expert opinion/soft evidence: elicitation, formal modelling?... --- # So how do we do this?... ## A couple of examples <span style="display:block; margin-top: 30px ;"></span> 1. ICD & Cardiac death - Relatively old-ish work - Combination of RCT and observational/registry data <ol style="counter-reset: my-counter 1; color: lightgrey"> <li> "Blending" </li> <ul> <li> Newer method </li> <li> <b><i>Similar</i></b> to mixture cure models – but not quite the same...</li> </ul> </ol> --- # Example: ICD & Cardiac death .alignright[<svg viewBox="0 0 384 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <g label="icon" id="layer6" groupmode="layer"> <path id="path2" d="M 120.19265,177.73779 C 123.18778,77.35076 64.277527,63.999998 64.277527,63.999998 v 31.26245 C 40.834519,83.611374 18.32863,81.929634 18.32863,81.929634 V 337.10903 c 0,0 98.10414,-11.41744 98.10414,84.40952 0,0 36.58424,-153.37442 248.86103,26.48145 0,-61.59342 0.37757,-216.93925 0.37757,-268.28471 C 169.9561,37.131382 120.1931,177.73779 120.1931,177.73779 Z m 187.20631,173.82056 -12.37599,-97.65441 h -0.448 l -40.72819,97.65441 h -17.55994 l -38.9362,-97.65441 h -0.448 l -14.17589,97.65441 h -43.87514 l 28.8015,-169.61925 h 43.42716 l 34.43518,90.6496 36.46566,-90.6496 h 43.87513 l 25.6817,169.61925 h -44.13938 z" style="stroke-width:0.0675239"></path> </g></svg> [Benaglia et al (2015)](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4847642/)] ## Set up/interventions - ICD (Implantable Cardioverter Defibrillators) compared to anti-arrhythmic drugs (AAD) for prevention of sudden cardiac death in people with cardiac arrhythmia -- ## Data - Individual data from cohort of 535 UK cardiac arrhythmia patients implanted with ICDs between 1991 and 2002 - Meta-analysis of three (non-UK) RCTs providing published HRs – Relatively short-term follow-up: approximately 75% people, followed for less than 5 years, maximum 10 years - UK population mortality statistics by age, sex, cause of death -- ## Objective - Estimate the survival curve over the lifetime of ICD and AAD patients in UK - Extrapolate the output to inform the wider economic model --- count: false # Example: ICD & Cardiac death ## Basic idea Use UK population data (matched by age/sex) to "**anchor**" the ICD population at risk <center><img src=./img/ICD1.png width='45%' title='INCLUDE TEXT HERE'></center> --- count: false # Example: ICD & Cardiac death ## Basic idea Use UK population data (matched by age/sex) to "**anchor**" the ICD population at risk - Perhaps the easiest way to do this is to relate the hazard between the two populations – eg **proportional hazard** (PH) model <span style="display:block; margin-top: -20px ;"></span> `$$\class{myblue}{h_{\rm{ICD}}(t) = e^{\beta}h_{\rm{UK}}(t) \qquad \Leftrightarrow \qquad \HR = \frac{h_{\rm{ICD}}(t)}{h_{\rm{UK}}(t)} = e^{\beta} = \style{font-family:inherit;}{\text{Constant}}}$$` <span style="display:block; margin-top: -20px ;"></span> - Relatively easy to model – but probably very unrealistic! - ICD patients are at (much?) greater risk of arrhythmia death - If the proportion of deaths caused by arrythmia changes over time, we would induce bias, because we would be extrapolate a constant HR for all causes mortality -- - Formally account for multiple mortality causes (.blue[**Poly-Weibull**] model <svg viewBox="0 0 384 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <g label="icon" id="layer6" groupmode="layer"> <path id="path2" d="M 120.19265,177.73779 C 123.18778,77.35076 64.277527,63.999998 64.277527,63.999998 v 31.26245 C 40.834519,83.611374 18.32863,81.929634 18.32863,81.929634 V 337.10903 c 0,0 98.10414,-11.41744 98.10414,84.40952 0,0 36.58424,-153.37442 248.86103,26.48145 0,-61.59342 0.37757,-216.93925 0.37757,-268.28471 C 169.9561,37.131382 120.1931,177.73779 120.1931,177.73779 Z m 187.20631,173.82056 -12.37599,-97.65441 h -0.448 l -40.72819,97.65441 h -17.55994 l -38.9362,-97.65441 h -0.448 l -14.17589,97.65441 h -43.87514 l 28.8015,-169.61925 h 43.42716 l 34.43518,90.6496 36.46566,-90.6496 h 43.87513 l 25.6817,169.61925 h -44.13938 z" style="stroke-width:0.0675239"></path> </g></svg> [Demiris et al, 2015](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4456429/)): `\begin{align} \class{myblue}{h_{\rm{ICD}}(t)} &\class{myblue}{= h}_{\rm{\class{red}{ICD}}}^{\rm{\class{myblue}{arr}}}\class{myblue}{(t) + h}_{\rm{\class{red}{ICD}}}^{\rm{\class{myblue}{oth}}}\class{myblue}{(t)} \\ &\class{myblue}{=} \class{orange}{e^\beta} \class{myblue}{h^{\rm{arr}}}_{\rm{\class{blue}{UK}}}\class{myblue}{(t)} + \class{myblue}{h^{\rm{oth}}}_{\rm{\class{blue}{UK}}}\class{myblue}{(t)} \\ &\class{myblue}{=} \class{orange}{e^\beta}\class{myblue}{\alpha_1 \mu_1 t^{\alpha_1-1} + \alpha_2 \mu_2 t^{\alpha_2-1}} \end{align}` <span style="display:block; margin-top: -20px ;"></span> - This assumes that - Arrhythmia hazard is .orange[**proportional**] to matched UK population - Other causes hazard is **identical** to matched UK population --- count: false <style type="text/css"> .pull-left-nospace { float: left; width: 30%; margin-left: 40px; margin-top: 10px; } .pull-right-nospace { float: right; width: 60%; margin-top: 10px; margin-left: -80px; } .pull-right-nospace ~ * { content: ""; display: table; clear: both; } </style> # Example – ICD & Cardiac death ## Turning prior *information* into a prior *distribution* - In the ICD case, age at entry is around 60 – we **know** that people won't survive more than 60 more years - Setting a prior for the scale `\(\mu_i \sim \dunif(0,100)\)` implies that the prior mean survival of the resulting Weibull distribution is `$$\class{myblue}{\style{font-family:inherit;}{\text{expected survival time}}=\mu_i\Gamma\left(1+\frac{1}{\alpha}\right) < 60}$$` - Can also include some knowledge on the shape `\(\alpha\)` and the coefficient `\(\beta\)` to limit their variations in reasonable ranges... -- .pull-left-nospace[ <center><img src=./img/friends-gif.gif width='100%' title=''></center> ] .pull-right-nospace[ - This isn't necessarily easy! - You need to be friends with a statistician... - Don't be lost in translation... - *Elicit* the actual .blue[**information**] and then map it onto a possible and reasonable .red[**distribution**] - Mapping changes with the mathematical properties of the underlying sampling distribution selected... ] --- count: false # Example – ICD & Cardiac death <center><img src=./img/ICD2.png width='85%' title='INCLUDE TEXT HERE'></center> - Ignoring cause-specific mortality (simple .red[Weibull model]) results in larger bias, especially for females, mostly because the arrhythmia proportion of deaths does vary over time in that subgroup --- # So how do we do this?... ## A couple of examples <span style="display:block; margin-top: 30px ;"></span> <ol style="counter-reset: my-counter 0; color: lightgrey"> <li> ICD & Cardiac death </li> <ul> <li> Relatively old-ish work</li> <li>Combination of RCT and observational/registry data</li> </ul> </ol> <ol style="counter-reset: my-counter 1"> <li> "Blending" </li> <ul> <li> Newer method </li> <li> <b><i>Similar</i></b> to mixture cure models – but not quite the same...</li> </ul> </ol> --- # Example ### Observed data ([NICE TA 174](https://www.nice.org.uk/guidance/ta174)) <center><img src=./img/surv1-1.png width='72%' title=''></center> --- count: false # Example ### Parametric fitting/extrapolation <center><img src=./img/surv2-1.png width='72%' title=''></center> --- count: false # Example ## "Blended" survival curves <span style="display:block; margin-top: -50px ;"></span> ### .alignright[<svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <g groupmode="layer" id="layer6" label="icon"> <path style="stroke-width:0.07717" d="m 115.59247,222.50738 c -9.72601,0 -18.734334,7.07397 -24.986084,14.41694 -5.061076,5.95394 -7.591049,15.13238 -7.591049,22.77486 0,7.6402 2.870733,16.13879 7.931808,22.09274 6.152292,7.34297 12.778135,12.37522 22.603045,12.37522 8.83314,0 19.33786,-3.70766 25.389,-9.76105 6.1523,-6.05338 11.26931,-16.21737 11.26931,-25.04826 0,-8.73142 -2.39548,-19.18696 -8.54776,-25.24039 -6.15229,-6.15455 -17.33741,-11.61061 -26.06883,-11.61061 z m 174.6438,2.39944 c -10.12046,0 -18.35798,3.98058 -24.70919,11.93724 -5.15827,6.38628 -7.73967,13.66255 -7.73967,21.82831 0,8.27088 2.5814,15.59914 7.73967,21.98538 6.35064,7.95667 14.58873,11.93729 24.70919,11.93729 9.03149,0 16.67002,-3.25109 22.9212,-9.74241 6.25399,-6.59703 9.37846,-14.65259 9.37846,-24.18026 0,-9.422 -3.17646,-17.37639 -9.52708,-23.86775 -6.2495,-6.59477 -13.8428,-9.89721 -22.77258,-9.89721 z M 255.99998,7.9999981 C 119.03396,7.9999981 7.9999985,119.03394 7.9999985,255.99998 7.9999985,392.96602 119.03396,504 255.99998,504 392.96606,504 504,392.96602 504,255.99998 504,119.03394 392.96606,7.9999981 255.99998,7.9999981 Z M 197.17431,331.79065 h -45.93563 v -18.69931 c -4.66437,5.85506 -15.63869,11.82369 -20.40025,14.50172 -8.33473,4.66267 -19.65377,7.70067 -30.27265,7.70067 -17.167865,0 -32.44885,-5.425 -45.844653,-17.23173 -15.977193,-14.0903 -23.483472,-35.63322 -23.483472,-58.85447 0,-23.61798 8.186103,-42.47212 24.559999,-56.56242 12.999092,-11.21393 28.896046,-20.18949 45.766106,-20.18949 9.82264,0 21.93961,0.88269 30.57214,5.04865 4.96218,2.38076 13.84449,7.98548 19.10448,13.44381 v -98.50164 h 45.93564 v 229.34421 z m 157.21544,-21.13999 c -15.28099,17.58718 -36.66682,26.38303 -64.15348,26.38303 -27.58613,0 -49.01942,-8.79585 -64.30436,-26.38303 -12.60069,-14.44803 -18.90387,-32.19228 -18.90387,-53.23507 0,-18.94908 6.35065,-35.75132 19.0525,-50.4079 15.37988,-17.69285 37.26185,-26.54011 65.64139,-26.54011 26.09766,0 46.93585,8.84558 62.51694,26.54011 12.70185,14.44806 19.05247,31.66734 19.05247,51.66468 0.003,20.20586 -6.29921,37.53085 -18.90159,51.97886 z m 38.76899,-199.21794 c 5.35888,-5.35888 11.85868,-8.03746 19.49892,-8.03746 7.64024,0 14.14005,2.67858 19.49893,8.03746 5.35888,5.25945 8.03746,11.70955 8.03746,19.35034 0,7.73965 -2.67858,14.28864 -8.03746,19.64753 -5.25944,5.25944 -11.75925,7.8883 -19.49893,7.8883 -7.64247,0 -14.14227,-2.67861 -19.49892,-8.0375 -5.2594,-5.35885 -7.88829,-11.85871 -7.88829,-19.49892 -0.003,-7.6402 2.62889,-14.0903 7.88829,-19.35029 z m 43.91029,220.24265 H 388.24626 V 185.84118 h 48.82277 z" id="path2"></path> </g></svg> [Che et al (2022)](https://doi.org/10.1177/0272989X221134545)] <span style="display:block; margin-top: 70px ;"></span> ### Consider two separate process <span style="display:block; margin-top: 30px ;"></span> -- 1. Driven *exclusively* by the .red[**observed data**] - Similar to a "standard" HTA analysis – use this to estimate `\(S_{obs}(t\mid\bm\theta_{obs})\)` - Main objective: produce the **best** fit possible to the *observed* information - **NB**: Unlike in a "standard" modelling exercise where the issue of overfitting is potentially critical, achieving a very close approximation to the observed dynamics has much less important implications in the case of blending -- <ol style="counter-reset: my-counter 1;"> <li><p style="color:blue;"><b>"External" process</b></p> <ul> <li>Used to derive a separate survival curve, \({S_{ext}(t\mid\bm\theta_{ext})}\) to describe the <b><i>long-term</i></b> estimate for the survival probabilities</li> <li>Could use "hard" evidence (eg RWE/registries/cohort studies/etc)...</li> <li>...Or, purely subjective knwoledge elicited from experts (or both!)</li> </ul> </li> <b>NB</b>: Most likely need to use suitable statistical methods to "de-bias" the RWE <ul> <li> Propensity score, g-computation, ... </li> </ul> </ol> .footnote[ <svg viewBox="0 0 496 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg> [`R` Code (for the paper)](https://github.com/StatisticsHealthEconomics/blendR-paper) .alignright[<svg viewBox="0 0 496 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg> [`R` package `blendR`](https://github.com/StatisticsHealthEconomics/blendR)] ] --- count: false # Example – Blended survival curves .panelset[ .panel[.panel-name[Stats] Combine the two processes to obtain `\begin{align} \class{myblue}{S_{ble}(t\mid\bm\theta) = S_{obs}(t\mid\bm\theta_{obs})^{1-\pi(t; \alpha, \beta, a, b)}\times S_{ext}(t\mid\bm\theta_{ext})^{\pi(t;\alpha, \beta, a, b)}} \end{align}` <span style="display:block; margin-top: -20px ;"></span> where: <span style="display:block; margin-top: 30px ;"></span> - `\(\bm \theta = \{\bm \theta_{obs}, \bm \theta_{ext}, \alpha, \beta, a, b\}\)` is the vector of .red[**model parameters**] <span style="display:block; margin-top: 30px ;"></span> - `\(\displaystyle \class{myblue}{\pi(t;\alpha,\beta,a,b) = \Pr\left(T\leq \frac{t-a}{b-a}\mid \alpha, \beta\right) = F_{\text{Beta}}\left (\frac{t-a}{b-a}\mid \alpha, \beta \right)}\)` is a .blue[**weight** function] controlling the extent to which `\(S_{obs}(\cdot)\)` and `\(S_{ext}(\cdot)\)` are blended together <span style="display:block; margin-top: 30px ;"></span> - `\(t \in [0,T^*]\)`, is the .orange[**interval of times**] over which we want to perform our evaluation <span style="display:block; margin-top: 50px ;"></span> .content-box-beamer[ ### **NB**: This is *not* the same as a "mixture cure model"! - In MCM, one mixed survival curve (cured vs non cured individuals) - In BSC, short- vs long-term processed modelled explicitly ] ] .panel[.panel-name[Graphical representation] <span style="display:block; margin-top: -10px ;"></span> <center><img src=./img/blending_process-1.png width='75%' title=''></center> ] .panel[.panel-name[Weights] <span style="display:block; margin-top: -10px ;"></span> <center><img src=./img/betacdf_weight-1.png width='75%' title=''></center> ] .panel[.panel-name[What do the weights do?...] <span style="display:block; margin-top: -10px ;"></span> <center><img src=./img/blending_weights-1.png width='75%' title=''></center> ] ] --- class: hide-logo background-image: url("img/blender.gif") background-size: cover --- # Comments - The main point of the "blending" procedure is to recognise that, sometimes (often...), the observed data are just not good enough to simultaneously 1. Provide the best fit to the observed data 2. Provide a reasonable extrapolation for the long-term survival - Instead, we let the observed data tell us about the short-term survival **and** some external information tell us something about the long-term survival <span style="display:block; margin-top: 40px ;"></span> -- - When external data/RWE are available, they should be leveraged - BSCs allow to do this in a relatively straightforward way – **but** need to make sure the RWE are *exchangeable*/unbiased (as much as we possibly can...) - The "heavy-lifting" is done by the weight function that determines how the sources are blended together - This is based on (possibly untestable, but certainly open/upfront!) assumptions <span style="display:block; margin-top: 40px ;"></span> -- - This combination of difference sources of evidence is naturally Bayesian - Ultimately, we don't really care about the two components – rather we want to fully characterise the uncertainty in the blended curve - ... But to get that is simple algebra to combine the posterior distributions for `\(S_{obs}(t\mid\bm\theta_{obs})\)` and `\(S_{ext}(t\mid\bm\theta_{ext})\)` --- # Conclusions ## Too much, too soon? - Tension between early introduction in the market and reimbursment decisions on the back of promising, but extremely immature data - Early plateau that doesn't materialise in later data cuts - Divorce between "medical" and "economic" analysis - Lancet papers are OK with estimating median survival time and HRs... Economic evaluations need extrapolation to estimate mean survival time -- ## All the help you can get - Long-term data are ideal – if they're aligned with the population of interest and heterogeneity is manageable (and managed!) - Often, even defining a comparator is a very complex operation and the market landscape is tricky... - Registry data can produce information "in real time". But: at the price of confounding/need for confirmation periods (conditional registration/reimbursment?) -- ## Know what you know - Some information is controversial and subjective and could bias the assessment. But: other simply isn't and we shouldn't be afraid to use it! --- class: part-page count: false # Part 3: Going all the way – including output form survival analysis into Markov models for HTA --- # Summary - Assess .red[**long-term**] cost-effectiveness based only on .red[**short-term**] data - State-transition (usually *Markov*) models for clinical histories - Commonly implemented in `Excel`, or specialized software (eg `TreeAge`) - Bayesian framework lets you .red[simultaneously] perform - parameter estimation (from short-term data, eg meta-analysis), and - probabilistic sensitivity analysis (long-term costs and benefits) - uncertainty about parameters fully included - Example: 3-state cancer Markov model - Markov models & survival analysis <span style="display:block; margin-top: 4em ;"></span> .content-box-beamer[ ### **References** <span style="display:block; margin-top: 20px ;"></span> <svg viewBox="0 0 448 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z"></path> </svg> <i>Bayesian Methods in Health Economics</i>, chapter 5.5 .button[<img src="img/routledge.png" width="7%"> [Book website (CRC)](https://www-taylorfrancis-com.libproxy.ucl.ac.uk/books/9780429111396)] .button[<i class="fab fa-firefox"></i> [Book website](https://gianluca.statistica.it/bmhe)] .button[<i class="fab fa-github"></i> [Code](https://github.com/giabaio/BCEA)] <svg viewBox="0 0 448 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z"></path> </svg> <i>Decision Modelling for Health Economic Evaluation</i> .button[<img src="img/oup-1.png" width="10%"> [Book website](https://global.oup.com/academic/product/decision-modelling-for-health-economic-evaluation-9780198526629?cc=gb&lang=en&)] <svg viewBox="0 0 448 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z"></path> </svg> <i>Evidence Synthesis for Decision Making in Healthcare</i> .button[<img src="img/wiley.png" width="10%"> [Book website](https://www.wiley.com/en-gb/Evidence+Synthesis+for+Decision+Making+in+Healthcare-p-9780470061091)] <svg viewBox="0 0 448 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z"></path> </svg> <i>Bayesian Cost-Effectiveness Analysis with the R package BCEA</i> .button[<img src="img/springer.png" width="8%"> [Book website (Springer)](http://www.springer.com/us/book/9783319557168)] .button[<i class="fab fa-firefox"></i> [Book website](https://gianluca.statistica.it/book/bcea/)] ] --- # Markov models - Assume a set `\(\mathcal{S}\)` made of `\(S\)` "clinically relevant" states - Exhaustive and mutually exclusive - The structure (links among nodes) describes the dynamics of disease history - Arrows connecting two states encode the assumption that a transition from the one where the arrow originates to the one reached by it is possible - Absence of an arrow between two states implies that the transition from one to the other is not allowed by our model -- - From one period to the next, subjects can move among the states according to the rules specified by the arrows - Movements occur according to suitable transition probabilities `$$\color{#24568c}\bm\pi_j = \bm\pi_{j-1} \bm\Lambda_j$$` where - `\(\bm\pi_j=(\pi_{1j},\ldots,\pi_{Sj})\)` is the vector of probabilities for each state at time `\(j\)` - `\(\bm\Lambda_j = [\Lambda_{j;s',s}]\)` is a transition matrix describing the probability of moving from state `\(s\)` to state `\(s'\)` at time `\(j\)` -- - **NB** the matrix algebra simply computes for each state `\(s\)` `$$\color{blue}{\Pr(\style{font-family:inherit;}{\text{Being in state }} s \style{font-family:inherit;}{\text{ at time }} j)= \sum_{s'\in\mathcal{S}}\Pr(\style{font-family:inherit;}{\text{Being in state }} s' \style{font-family:inherit;}{\text{ at time }} j-1)\times \Pr(\style{font-family:inherit;}{\text{Moving from state }}s'\style{font-family:inherit;}{\text{ to state }}s)}$$` --- count: false # Markov models ### 1. Define a structure .alignright[("**Natural history**" of the disease)] <center><img src=./img/09_MM_5.png width='58%' title='A basic Markov model structure'></center> --- count: false # Markov model ### 2. Estimate the transition probabilities <center><img src=./img/09_MM_6.png width='65%' title='A basic Markov model structure'></center> <span style="display:block; margin-top: -20px ;"></span> For instance: - `\(\lambda_{14} =\)` general (healthy) population mortality `\(\Rightarrow\)` Relevant data: Life tables/official records, . . . - `\(\lambda_{24} =\)` disease-specific mortality `\(\Rightarrow\)` Relevant data: Trial/observational studies, . . . - `\(\ldots\)` --- count: false # Markov model ### 3. Run the simulation: `\(j=0\)` <center><img src=./img/09_MM_7.png width='65%' title='Typically, at the beginning of the simulation, every individual is in the 'null' state (eg healthy)'></center> <span style="display:block; margin-top: 20px ;"></span> Distribute the "virtual cohort" across the `\(S\)` states (typically, everybody starts in the "healthy" state...) --- count: false # Markov model ### 3. Run the simulation: `\(j=1\)` <center><img src=./img/09_MM_8.png width='65%' title='...Then, they start to move around, according to the transition probabilities...'></center> <span style="display:block; margin-top: 20px ;"></span> Start moving people around... --- count: false # Markov model ## Matrix algebra and "state occupancy" - `\(m_{sj}\)` is the **number** of people in state `\(s\)` at time `\(j\)` - `\(\lambda_{s'sj}\)` is the probability of moving from state `\(s'\)` to state `\(s\)` between time `\(j\)` and `\(j+1\)` <span style="display:block; margin-top: 20px ;"></span> - Thus: `$$\color{#24568c}{m_{s\, j+1} = m_{1j}\lambda_{1sj} + m_{2j}\lambda_{2sj} + \ldots + m_{Sj}\lambda_{Ssj}}$$` which we can write in matrix algebra as `\begin{align} \color{#24568c}{(m_{1\, j+1},\ldots,m_{S\, j+1})} & \color{#24568c}{=\, (m_{1\, j},\ldots,m_{S\, j})\left(\begin{array}{ccc}\lambda_{11j} & \ldots & \lambda_{1Sj} \\ \vdots & \ddots & \vdots \\ \lambda_{S1j} & \ldots & \lambda_{SSj} \end{array}\right)} \\ \color{#24568c}{\bm{m}_{j+1}} & \color{#24568c}{= \, \bm{m}_{j} \bm\Lambda_j} \end{align}` <span style="display:block; margin-top: 30px ;"></span> - **NB**: The transition matrix typically does depend on the time `\(j\)`, but sometimes we can relax this assumption --- count: false # Markov model ### 3. Run the simulation: `\(j=2\)` <center><img src=./img/09_MM_9.png width='65%' title='...They continue to move: for instance, more people are being affected by the disease and die...'></center> <span style="display:block; margin-top: 20px ;"></span> Move people around according to the relationship `\(\bm{m}_{2}=\bm{m}_{1}\bm\Lambda_{1}\)` --- count: false # Markov model ### 3. Run the simulation: `\(j=3\)` <center><img src=./img/09_MM_10.png width='65%' title='...More of the same...'></center> <span style="display:block; margin-top: 20px ;"></span> Move people around according to the relationship `\(\bm{m}_{3}=\bm{m}_{2}\bm\Lambda_{2}\)` --- count: false # Markov model ### 3. Run the simulation: `\(j=J\)` .alignright[("*lifetime* horizon")] <center><img src=./img/09_MM_11.png width='65%' title='...And if the virtual follow up (length of the simulation) is long enough, then everybody will have moved to the absorbing state (death, in this case)'></center> --- # Cost-effectiveness modelling 1. Assign .red[**benefits**] & .blue[**costs**] to each state in the model and for each treatment `\(t\)` under study: `\(\color{black}{(e_{ts},c_{ts})}\)` - A measure of QoL (e.g. QALYs associated with being "perfectly healthy") - A measure of cost (e.g. what does it cost the NHS for every person who has the disease?) 2. "Cohort simulation": estimate the proportion of individuals in each state at each time point (cycle) - Usually need to do this for a long enough "virtual follow up" so that everybody reach the "absorbing state" - That's a state from which you never move out (e.g. death) 3. For each treatment `\(t\)` under study, accumulate costs and benefits over time (slightly abusing the notation...) `\begin{align} \color{red}e_t\, & \color{red}= \, \sum_{j=0}^J \sum_{s=1}^S m_{tsj}e_{ts} & & \color{black}\style{font-family:inherit;}{\text{ and }} & & & \color{blue}c_t\, & \color{blue} =\, \sum_{j=1}^J \sum_{s=1}^S m_{tsj}c_{ts} \\ & \color{red}\,= \, \sum_{j=0}^J e_{tj} & & & & & \, & \color{blue}= \, \sum_{j=0}^J c_{tj} \end{align}` **NB**: Costs and benefits can also be modelled to describe the uncertainty around their value - **For example**: QALYs over one year `\(\sim\dbeta(a,b)\)`; Costs `\(\sim\dgamma(\gamma,\rho)\)`; `\(\ldots\)` - These may be informed by individual level data or evidence synthesis --- count: false # Cost-effectiveness modelling ## Discounting .alignright[See BMHE, chapter 1.5; 5.4] - Costs and outcomes can occur at different times with respect to when the intervention is implemented - **But**: society tends to value benefits that arrive closer to the present time more than those that will be achievable in the (possibly very distant) future - Example: Human Papilloma Virus (HPV) vaccination is available for boys and girls as young as 12, but benefits (protection from cervical cancer) only materialises when they are well in their 40s... -- - .red[**Discounting**] accounts for differential timing by reducing the value of costs and effects in the future - Particularly relevant for economic evaluation spanning over a time horizon `\(>\)` 1 time unit (e.g. year) - Markov models tend to do that, so discounting is a key issue when using them! - Define a **discount rate** `\(d\)` to ensure that costs sustained and benefits gained closer to now have more value - Compute the **Present Value** of intervention `\(t\)` as `\begin{align} \color{red}\style{font-family:inherit;}{\text{PV}}_t^e = \sum_{j=0}^J \frac{e_{tj}}{(1+d)^j} \qquad \color{black}\style{font-family:inherit;}{\text{ and }} \qquad \color{blue}\style{font-family:inherit;}{\text{PV}}_t^c = \sum_{j=0}^J \frac{c_{tj}}{(1+d)^j} \end{align}` - NICE suggests using `\(d=3.5\%\)` for costs and outcomes – but for some diseases can use different rates for costs and benefits... --- # Example ## 3-state cancer Markov model - This is one of the most popular structures developed as Markov models <center><img src=./img/3state-1.png width='85%' title='INCLUDE TEXT HERE'></center> <span style="display:block; margin-top: 50px ;"></span> - Patients typically enter the cohort in "pre-progression" - Then can either die or "progress" to a worst condition - From there they typically cannot revert to a better state --- count: false # Example ## 3-state cancer Markov model **Ideally**, we can access individual level data (e.g. from a randomised trial), describing the "event history" for each patient <table class=" lightable-classic table" style='font-family: "Arial Narrow", "Source Sans Pro", sans-serif; margin-left: auto; margin-right: auto; width: auto !important; margin-left: auto; margin-right: auto;'> <thead> <tr> <th style="text-align:center;"> Patient </th> <th style="text-align:center;"> Treatment </th> <th style="text-align:center;"> Progression? </th> <th style="text-align:center;"> Death? </th> <th style="text-align:center;"> Progression time </th> <th style="text-align:center;"> Death time </th> </tr> </thead> <tbody> <tr> <td style="text-align:center;width: 1.5cm; "> 1 </td> <td style="text-align:center;width: 1.5cm; "> 1 </td> <td style="text-align:center;width: 1.5cm; "> 1 </td> <td style="text-align:center;width: 1.5cm; "> 0 </td> <td style="text-align:center;width: 1.5cm; "> 31.99 </td> <td style="text-align:center;width: 1.5cm; "> 32.00 </td> </tr> <tr> <td style="text-align:center;width: 1.5cm; "> 2 </td> <td style="text-align:center;width: 1.5cm; "> 1 </td> <td style="text-align:center;width: 1.5cm; "> 1 </td> <td style="text-align:center;width: 1.5cm; "> 0 </td> <td style="text-align:center;width: 1.5cm; "> 30.55 </td> <td style="text-align:center;width: 1.5cm; "> 30.60 </td> </tr> <tr> <td style="text-align:center;width: 1.5cm; "> \(\ldots\) </td> <td style="text-align:center;width: 1.5cm; "> \(\ldots\) </td> <td style="text-align:center;width: 1.5cm; "> \(\ldots\) </td> <td style="text-align:center;width: 1.5cm; "> \(\ldots\) </td> <td style="text-align:center;width: 1.5cm; "> \(\ldots\) </td> <td style="text-align:center;width: 1.5cm; "> \(\ldots\) </td> </tr> <tr> <td style="text-align:center;width: 1.5cm; "> 10 </td> <td style="text-align:center;width: 1.5cm; "> 1 </td> <td style="text-align:center;width: 1.5cm; "> 1 </td> <td style="text-align:center;width: 1.5cm; "> 1 </td> <td style="text-align:center;width: 1.5cm; "> 0.17 </td> <td style="text-align:center;width: 1.5cm; "> 0.46 </td> </tr> <tr> <td style="text-align:center;width: 1.5cm; "> 11 </td> <td style="text-align:center;width: 1.5cm; "> 1 </td> <td style="text-align:center;width: 1.5cm; "> 1 </td> <td style="text-align:center;width: 1.5cm; "> 1 </td> <td style="text-align:center;width: 1.5cm; "> 1.27 </td> <td style="text-align:center;width: 1.5cm; "> 1.57 </td> </tr> <tr> <td style="text-align:center;width: 1.5cm; border-bottom: 2px solid;"> \(\ldots\) </td> <td style="text-align:center;width: 1.5cm; border-bottom: 2px solid;"> \(\ldots\) </td> <td style="text-align:center;width: 1.5cm; border-bottom: 2px solid;"> \(\ldots\) </td> <td style="text-align:center;width: 1.5cm; border-bottom: 2px solid;"> \(\ldots\) </td> <td style="text-align:center;width: 1.5cm; border-bottom: 2px solid;"> \(\ldots\) </td> <td style="text-align:center;width: 1.5cm; border-bottom: 2px solid;"> \(\ldots\) </td> </tr> </tbody> </table> <span style="display:block; margin-top: 30px ;"></span> This type of data would allow us to estimate **directly** all the relevant transition probabilities (with some extra work...) - They contain information about the .blue[**complete history**] of each individual and so we can use them to construct the "risk set" for each possible transition and then estimate the time-to-event --- # Reconstructing the data <span style="display:block; margin-top: -10pt ;"></span> ## Subset 1: Progression <span style="display:block; margin-top: -5pt ;"></span> - Risk set: all individuals who are at risk of making progression - The individuals in the risk set may or may not also die ("competing risks") - But we consider "Progression" as the **event** and "Death" or "No progression" as **censoring** .panelset[ .panel[ .panel-name[Code] ```r > data %>% mutate( + id=patid, # patient ID + from=1, # starting state + to=2, # arriving state + trans=1, # transition code (1 = Pre -> Progression) + Tstart=0, # entry time + Tstop=prog_t, # exit time + time=Tstop-Tstart, # time-to-event = Tstop-Tstart + status=case_when( # censoring indicator: + prog==1~1, # 1 if progressed; 0 otherwise + TRUE~0 + ), + treat=treat # treatment arm + ) %>% + # Selects only the relevant rows + select(id,from,to,trans,Tstart,Tstop,time,prog,death,status,treat) ``` ] .panel[ .panel-name[Output] ``` # A tibble: 810 × 13 id from to trans Tstart Tstop time prog death status treat prog_t death_t <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <int> <int> <dbl> <int> <dbl> <dbl> 1 102 1 2 1 0 35.3 35.3 1 0 1 1 35.3 41 2 556 1 2 1 0 6.10 6.10 0 1 0 0 6.10 6.10 3 36 1 2 1 0 24.5 24.5 1 0 1 1 24.5 26 4 546 1 2 1 0 27.3 27.3 0 1 0 1 27.3 27.3 5 107 1 2 1 0 9.78 9.78 1 0 1 0 9.78 15.6 6 466 1 2 1 0 36.5 36.5 0 0 0 1 36.5 36.5 7 534 1 2 1 0 8.75 8.75 0 1 0 1 8.75 8.75 8 279 1 2 1 0 19.7 19.7 0 0 0 1 19.7 19.7 9 478 1 2 1 0 38 38 0 0 0 1 38 38 10 165 1 2 1 0 7.42 7.42 1 1 1 0 7.42 16.8 # ℹ 800 more rows ``` ] .panel[ .panel-name[Examples (1)] Patients who have progressed but not died, e.g. ``` # A tibble: 1 × 13 id from to trans Tstart Tstop time prog death status treat prog_t death_t <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <int> <int> <dbl> <int> <dbl> <dbl> 1 1 1 2 1 0 32.0 32.0 1 0 1 1 32.0 32 ``` Patients who have died *at* or *after* progression, e.g. ``` # A tibble: 2 × 13 id from to trans Tstart Tstop time prog death status treat prog_t death_t <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <int> <int> <dbl> <int> <dbl> <dbl> 1 10 1 2 1 0 0.173 0.173 1 1 1 1 0.173 0.458 2 134 1 2 1 0 6.90 6.90 1 1 1 1 6.90 14.3 ``` ] .panel[ .panel-name[Examples (2)] Patients who have died before progression (NB: these are **censored** in this case!) ``` # A tibble: 2 × 13 id from to trans Tstart Tstop time prog death status treat prog_t death_t <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <int> <int> <dbl> <int> <dbl> <dbl> 1 527 1 2 1 0 1.50 1.50 0 1 0 1 1.50 1.50 2 528 1 2 1 0 2.07 2.07 0 1 0 1 2.07 2.07 ``` Patients who have been fully censored ``` # A tibble: 2 × 13 id from to trans Tstart Tstop time prog death status treat prog_t death_t <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <int> <int> <dbl> <int> <dbl> <dbl> 1 249 1 2 1 0 0.0575 0.0575 0 0 0 1 0.0575 0.0575 2 250 1 2 1 0 3.80 3.80 0 0 0 1 3.80 3.80 ``` ] ] --- count: false # Reconstructing the data <span style="display:block; margin-top: -10pt ;"></span> ## Subset 2: Death from pre-progression <span style="display:block; margin-top: -5pt ;"></span> - Risk set: all individuals who are at risk of dying - The individuals in the risk set may or may not also progress ("competing risks") - But we consider "Death" as the **event** and "Progression" or "No progression" as **censoring** .panelset[ .panel[ .panel-name[Code] ```r > data %>% mutate( + id=patid, # patient ID + from=1, # starting state + to=3, # arriving state + trans=2, # transition code (2 = Pre -> Death) + Tstart=0, # entry time + Tstop=prog_t, # exit time + time=Tstop-Tstart, # time-to-event = Tstop-Tstart + status=case_when( # censoring indicator: + (death==1 & prog_t==death_t)~1, # 1 if died at progression; 0 otherwise + TRUE~0 + ), + treat=treat # treatment arm + ) %>% + # Selects only the relevant rows + select(id,from,to,trans,Tstart,Tstop,time,prog,death,status,treat) ``` ] .panel[ .panel-name[Output] ``` # A tibble: 810 × 13 id from to trans Tstart Tstop time prog death status treat prog_t death_t <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <int> <int> <dbl> <int> <dbl> <dbl> 1 223 1 3 2 0 16.3 16.3 1 0 0 0 16.3 37.1 2 117 1 3 2 0 8.52 8.52 1 0 0 0 8.52 14.8 3 116 1 3 2 0 15.7 15.7 1 0 0 0 15.7 22.0 4 753 1 3 2 0 32 32 0 0 0 0 32 32 5 769 1 3 2 0 36 36 0 0 0 0 36 36 6 150 1 3 2 0 21.5 21.5 1 0 0 1 21.5 30 7 778 1 3 2 0 38 38 0 0 0 0 38 38 8 191 1 3 2 0 16.9 16.9 1 0 0 1 16.9 32 9 487 1 3 2 0 40 40 0 0 0 1 40 40 10 545 1 3 2 0 26.5 26.5 0 1 1 1 26.5 26.5 # ℹ 800 more rows ``` ] .panel[ .panel-name[Examples (1)] Patients who have progressed, but not died (NB: these are **censored** in this case!), e.g. ``` # A tibble: 1 × 13 id from to trans Tstart Tstop time prog death status treat prog_t death_t <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <int> <int> <dbl> <int> <dbl> <dbl> 1 1 1 3 2 0 32.0 32.0 1 0 0 1 32.0 32 ``` Patients who have died *at* or *after* progression (NB: these are **censored** in this case!), e.g. ``` # A tibble: 2 × 13 id from to trans Tstart Tstop time prog death status treat prog_t death_t <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <int> <int> <dbl> <int> <dbl> <dbl> 1 10 1 3 2 0 0.173 0.173 1 1 0 1 0.173 0.458 2 134 1 3 2 0 6.90 6.90 1 1 0 1 6.90 14.3 ``` ] .panel[ .panel-name[Examples (2)] Patients who have died before progression ``` # A tibble: 2 × 13 id from to trans Tstart Tstop time prog death status treat prog_t death_t <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <int> <int> <dbl> <int> <dbl> <dbl> 1 527 1 3 2 0 1.50 1.50 0 1 1 1 1.50 1.50 2 528 1 3 2 0 2.07 2.07 0 1 1 1 2.07 2.07 ``` Patients who have been fully censored ``` # A tibble: 2 × 13 id from to trans Tstart Tstop time prog death status treat prog_t death_t <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <int> <int> <dbl> <int> <dbl> <dbl> 1 249 1 3 2 0 0.0575 0.0575 0 0 0 1 0.0575 0.0575 2 250 1 3 2 0 3.80 3.80 0 0 0 1 3.80 3.80 ``` ] ] --- count: false # Reconstructing the data <span style="display:block; margin-top: -10pt ;"></span> ## Subset 3: Death from progression <span style="display:block; margin-top: -5pt ;"></span> - Risk set: all individuals who have progressed and are at risk of dying - The individuals in the risk set have certainly progressed and may or may not also die - But we consider "Death" as the **event** and "No death" as **censoring** .panelset[ .panel[ .panel-name[Code] ```r *> data %>% filter(prog==1) %>% mutate( # NB: Filter for patients who *have* progressed! + id=patid, # patient ID + from=2, # starting state + to=3, # arriving state + trans=3, # transition code (2 = Pre -> Death) + Tstart=prog_t, # entry time + Tstop=death_t, # exit time + time=Tstop-Tstart, # time-to-event = Tstop-Tstart + status=case_when( # censoring indicator: + death==1~1, # 1 if died; 0 otherwise + TRUE~0 + ), + treat=treat # treatment arm + ) %>% + # Selects only the relevant rows + select(id,from,to,trans,Tstart,Tstop,time,prog,death,status,treat) ``` ] .panel[ .panel-name[Output] ``` # A tibble: 248 × 13 id from to trans Tstart Tstop time prog death status treat prog_t death_t <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <int> <int> <dbl> <int> <dbl> <dbl> 1 247 2 3 3 3.05 41.8 38.8 1 0 0 0 3.05 41.8 2 89 2 3 3 10.9 15.7 4.79 1 0 0 0 10.9 15.7 3 74 2 3 3 12.4 15.9 3.55 1 0 0 0 12.4 15.9 4 176 2 3 3 33.1 45.0 11.9 1 0 0 0 33.1 45.0 5 122 2 3 3 8.17 14.8 6.65 1 0 0 0 8.17 14.8 6 196 2 3 3 19.3 34.9 15.6 1 0 0 0 19.3 34.9 7 107 2 3 3 9.78 15.6 5.83 1 0 0 0 9.78 15.6 8 94 2 3 3 42.8 48 5.19 1 0 0 1 42.8 48 9 148 2 3 3 21.6 30 8.42 1 0 0 1 21.6 30 10 65 2 3 3 22.2 24.9 2.73 1 0 0 0 22.2 24.9 # ℹ 238 more rows ``` ] .panel[ .panel-name[Examples (1)] Patients who have died after progression, e.g. ``` # A tibble: 1 × 13 id from to trans Tstart Tstop time prog death status treat prog_t death_t <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <int> <int> <dbl> <int> <dbl> <dbl> 1 10 2 3 3 0.173 0.458 0.286 1 1 1 1 0.173 0.458 ``` Patients who have not died (NB: these are **censored** in this case!), e.g. ``` # A tibble: 1 × 13 id from to trans Tstart Tstop time prog death status treat prog_t death_t <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <int> <int> <dbl> <int> <dbl> <dbl> 1 1 2 3 3 32.0 32 0.00920 1 0 0 1 32.0 32 ``` ] ] --- # Example ## Estimating the survival curves - We can use the models we saw in ealier to estimate the survival curves for the 3 subsets - For example, we can test various alternative and settle for a Gompertz distribution ```r > # Sets up informative priors on the Gompertz parameters to stabilise inference > priors=list(gom=list(a_alpha=1.5,b_alpha=1.5)) > > # Runs survival models on the specific subsets to obtain estimate of the various transition probabilities > m_12=fit.models(Surv(time,status)~as.factor(treat),data=subdata1,distr="gom",method="hmc",priors=priors) > m_13=fit.models(Surv(time,status)~as.factor(treat),data=subdata2,distr="gom",method="hmc",priors=priors) > m_23=fit.models(Surv(time,status)~as.factor(treat),data=subdata3,distr="gom",method="hmc",priors=priors) ``` - Now can use the simulated values for the survival curves to *approximate* the transition probabilities - Technically, the models above estimate survival over continuous times, while the Markov model assumes discrete cycles - Can use the `survHE` function `make.surv` to generate simulations from the survival curves from each model over any arbitrary extrapolation --- # Survival curves and transition probabilities <img src="./img/survival1-1.png" style="display: block; margin: auto;" width="100%"> In general, given a survival curve representing a suitable transition, we can compute `$$\color{#24568c}\lambda_{s'sj}\approx 1-\frac{S_{j+k}}{S_j}$$` <span style="display:block; margin-top: -15px ;"></span> (intuitively, the transition probability can be read off as the reduction in the proportion of individuals who have *not* experienced the event between two consecutive times) --- count: false # Survival curves and transition probabilities We can **directly** estimate - `\(\lambda_{12j}\)` from the survival curves derived with subset 1 - `\(\lambda_{13j}\)` from the survival curves derived with subset 2 - `\(\lambda_{23j}\)` from the survival curves derived with subset 3 **Indirectly** (using the fact that the transitions are mutually exclusive and exhaustive) - `\(\lambda_{11j}=1-\lambda_{12j}-\lambda_{13j}\)` - `\(\lambda_{22j}=1-\lambda_{23j}\)` And because "Death" is an absorbing state, we can complete the transition matrix `\begin{align} \color{#24568c}\bm\Lambda_j = \left(\begin{array}{ccc} \lambda_{11j} & \lambda_{12j} & \lambda_{13j} \\ 0 & \lambda_{22j} & \lambda_{23j} \\ 0 & 0 & 1 \end{array}\right) \end{align}` <span style="display:block; margin-top: 30px ;"></span> We can also replicate this calculation for `\(n_{sim}\)` times to propagate the uncertainty in the survival curves onto the whole Markov model <span style="display:block; margin-top: 20px ;"></span> **NB**: May need more complex modelling (see for instance <svg viewBox="0 0 384 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <g label="icon" id="layer6" groupmode="layer"> <path id="path2" d="M 120.19265,177.73779 C 123.18778,77.35076 64.277527,63.999998 64.277527,63.999998 v 31.26245 C 40.834519,83.611374 18.32863,81.929634 18.32863,81.929634 V 337.10903 c 0,0 98.10414,-11.41744 98.10414,84.40952 0,0 36.58424,-153.37442 248.86103,26.48145 0,-61.59342 0.37757,-216.93925 0.37757,-268.28471 C 169.9561,37.131382 120.1931,177.73779 120.1931,177.73779 Z m 187.20631,173.82056 -12.37599,-97.65441 h -0.448 l -40.72819,97.65441 h -17.55994 l -38.9362,-97.65441 h -0.448 l -14.17589,97.65441 h -43.87514 l 28.8015,-169.61925 h 43.42716 l 34.43518,90.6496 36.46566,-90.6496 h 43.87513 l 25.6817,169.61925 h -44.13938 z" style="stroke-width:0.0675239"></path> </g></svg> [Williams et al, 2017](https://pubmed.ncbi.nlm.nih.gov/27698003/)) --- # Running the Markov model We can finally run the Markov model by initialising the state occupancy `\(\bm{m}_0\)` and simply apply the matrix algebra to determine the number of people in each state at each time point. <center><img src=./img/running-mm.png width='95%' title='INCLUDE TEXT HERE'></center> --- # Summary so far ## If we have the individual level data... - In that case, we can recreate direct estimates of all the relevant transition probabilities - In that case, running the Markov model is basically just a problem of matrix algebra - Modellers tend to do this using a combination of statistical software (for the survival analysis) and spreadsheet (to compute the actual Markov model) - ... But of course this can all be done in a **much** more efficient way using a proper statistical software (e.g. `R` – see [Practical](../practical/07_MM/)) -- ## What if we don't get the trial data?... - Unfortunately, very often we are **not** in a position of using individual level data - Either because we have trial data for "our" study, but not for the comparators - Or because we do not have access to the ILD for any of the relevant treatments - In these cases, we need to resort to **sub-optimal** methods of analysis - Specifically, we can use published summaries to obtain "pseudo-data" based on published Kaplan-Meier estimates - This practices is becoming very popular and is often termed as "modelling based on **digitised** data" --- # Digitised data - Use specialised software to extract data values from published graphs - Example: <svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M503.52,241.48c-.12-1.56-.24-3.12-.24-4.68v-.12l-.36-4.68v-.12a245.86,245.86,0,0,0-7.32-41.15c0-.12,0-.12-.12-.24l-1.08-4c-.12-.24-.12-.48-.24-.6-.36-1.2-.72-2.52-1.08-3.72-.12-.24-.12-.6-.24-.84-.36-1.2-.72-2.4-1.08-3.48-.12-.36-.24-.6-.36-1-.36-1.2-.72-2.28-1.2-3.48l-.36-1.08c-.36-1.08-.84-2.28-1.2-3.36a8.27,8.27,0,0,0-.36-1c-.48-1.08-.84-2.28-1.32-3.36-.12-.24-.24-.6-.36-.84-.48-1.2-1-2.28-1.44-3.48,0-.12-.12-.24-.12-.36-1.56-3.84-3.24-7.68-5-11.4l-.36-.72c-.48-1-.84-1.8-1.32-2.64-.24-.48-.48-1.08-.72-1.56-.36-.84-.84-1.56-1.2-2.4-.36-.6-.6-1.2-1-1.8s-.84-1.44-1.2-2.28c-.36-.6-.72-1.32-1.08-1.92s-.84-1.44-1.2-2.16a18.07,18.07,0,0,0-1.2-2c-.36-.72-.84-1.32-1.2-2s-.84-1.32-1.2-2-.84-1.32-1.2-1.92-.84-1.44-1.32-2.16a15.63,15.63,0,0,0-1.2-1.8L463.2,119a15.63,15.63,0,0,0-1.2-1.8c-.48-.72-1.08-1.56-1.56-2.28-.36-.48-.72-1.08-1.08-1.56l-1.8-2.52c-.36-.48-.6-.84-1-1.32-1-1.32-1.8-2.52-2.76-3.72a248.76,248.76,0,0,0-23.51-26.64A186.82,186.82,0,0,0,412,62.46c-4-3.48-8.16-6.72-12.48-9.84a162.49,162.49,0,0,0-24.6-15.12c-2.4-1.32-4.8-2.52-7.2-3.72a254,254,0,0,0-55.43-19.56c-1.92-.36-3.84-.84-5.64-1.2h-.12c-1-.12-1.8-.36-2.76-.48a236.35,236.35,0,0,0-38-4H255.14a234.62,234.62,0,0,0-45.48,5c-33.59,7.08-63.23,21.24-82.91,39-1.08,1-1.92,1.68-2.4,2.16l-.48.48H124l-.12.12.12-.12a.12.12,0,0,0,.12-.12l-.12.12a.42.42,0,0,1,.24-.12c14.64-8.76,34.92-16,49.44-19.56l5.88-1.44c.36-.12.84-.12,1.2-.24,1.68-.36,3.36-.72,5.16-1.08.24,0,.6-.12.84-.12C250.94,20.94,319.34,40.14,367,85.61a171.49,171.49,0,0,1,26.88,32.76c30.36,49.2,27.48,111.11,3.84,147.59-34.44,53-111.35,71.27-159,24.84a84.19,84.19,0,0,1-25.56-59,74.05,74.05,0,0,1,6.24-31c1.68-3.84,13.08-25.67,18.24-24.59-13.08-2.76-37.55,2.64-54.71,28.19-15.36,22.92-14.52,58.2-5,83.28a132.85,132.85,0,0,1-12.12-39.24c-12.24-82.55,43.31-153,94.31-170.51-27.48-24-96.47-22.31-147.71,15.36-29.88,22-51.23,53.16-62.51,90.36,1.68-20.88,9.6-52.08,25.8-83.88-17.16,8.88-39,37-49.8,62.88-15.6,37.43-21,82.19-16.08,124.79.36,3.24.72,6.36,1.08,9.6,19.92,117.11,122,206.38,244.78,206.38C392.77,503.42,504,392.19,504,255,503.88,250.48,503.76,245.92,503.52,241.48Z"></path></svg> [DigitizeIT](https://www.digitizeit.xyz/) -- - Point & click on the curves from published papers - Save suitable text files that can be fed to appropriate `R` scripts and algorithms to reconstruct the underlying Kaplan Meier curves (<svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M503.52,241.48c-.12-1.56-.24-3.12-.24-4.68v-.12l-.36-4.68v-.12a245.86,245.86,0,0,0-7.32-41.15c0-.12,0-.12-.12-.24l-1.08-4c-.12-.24-.12-.48-.24-.6-.36-1.2-.72-2.52-1.08-3.72-.12-.24-.12-.6-.24-.84-.36-1.2-.72-2.4-1.08-3.48-.12-.36-.24-.6-.36-1-.36-1.2-.72-2.28-1.2-3.48l-.36-1.08c-.36-1.08-.84-2.28-1.2-3.36a8.27,8.27,0,0,0-.36-1c-.48-1.08-.84-2.28-1.32-3.36-.12-.24-.24-.6-.36-.84-.48-1.2-1-2.28-1.44-3.48,0-.12-.12-.24-.12-.36-1.56-3.84-3.24-7.68-5-11.4l-.36-.72c-.48-1-.84-1.8-1.32-2.64-.24-.48-.48-1.08-.72-1.56-.36-.84-.84-1.56-1.2-2.4-.36-.6-.6-1.2-1-1.8s-.84-1.44-1.2-2.28c-.36-.6-.72-1.32-1.08-1.92s-.84-1.44-1.2-2.16a18.07,18.07,0,0,0-1.2-2c-.36-.72-.84-1.32-1.2-2s-.84-1.32-1.2-2-.84-1.32-1.2-1.92-.84-1.44-1.32-2.16a15.63,15.63,0,0,0-1.2-1.8L463.2,119a15.63,15.63,0,0,0-1.2-1.8c-.48-.72-1.08-1.56-1.56-2.28-.36-.48-.72-1.08-1.08-1.56l-1.8-2.52c-.36-.48-.6-.84-1-1.32-1-1.32-1.8-2.52-2.76-3.72a248.76,248.76,0,0,0-23.51-26.64A186.82,186.82,0,0,0,412,62.46c-4-3.48-8.16-6.72-12.48-9.84a162.49,162.49,0,0,0-24.6-15.12c-2.4-1.32-4.8-2.52-7.2-3.72a254,254,0,0,0-55.43-19.56c-1.92-.36-3.84-.84-5.64-1.2h-.12c-1-.12-1.8-.36-2.76-.48a236.35,236.35,0,0,0-38-4H255.14a234.62,234.62,0,0,0-45.48,5c-33.59,7.08-63.23,21.24-82.91,39-1.08,1-1.92,1.68-2.4,2.16l-.48.48H124l-.12.12.12-.12a.12.12,0,0,0,.12-.12l-.12.12a.42.42,0,0,1,.24-.12c14.64-8.76,34.92-16,49.44-19.56l5.88-1.44c.36-.12.84-.12,1.2-.24,1.68-.36,3.36-.72,5.16-1.08.24,0,.6-.12.84-.12C250.94,20.94,319.34,40.14,367,85.61a171.49,171.49,0,0,1,26.88,32.76c30.36,49.2,27.48,111.11,3.84,147.59-34.44,53-111.35,71.27-159,24.84a84.19,84.19,0,0,1-25.56-59,74.05,74.05,0,0,1,6.24-31c1.68-3.84,13.08-25.67,18.24-24.59-13.08-2.76-37.55,2.64-54.71,28.19-15.36,22.92-14.52,58.2-5,83.28a132.85,132.85,0,0,1-12.12-39.24c-12.24-82.55,43.31-153,94.31-170.51-27.48-24-96.47-22.31-147.71,15.36-29.88,22-51.23,53.16-62.51,90.36,1.68-20.88,9.6-52.08,25.8-83.88-17.16,8.88-39,37-49.8,62.88-15.6,37.43-21,82.19-16.08,124.79.36,3.24.72,6.36,1.08,9.6,19.92,117.11,122,206.38,244.78,206.38C392.77,503.42,504,392.19,504,255,503.88,250.48,503.76,245.92,503.52,241.48Z"></path></svg> [Guyot et al, 2012]( http://www.biomedcentral.com/1471-2288/12/9)) <center><img src=./img/digitised.png width='85%' title='INCLUDE TEXT HERE'></center> --- count: false # Digitised data ## What's wrong with that?... The problem is that often published papers report data on PFS and OS, **BUT**: 1. The curves are reported **separately** and **independently** - Although the data are correlated, because it is the same individuals undergoing the various transitions, there is no way to recover this level of correlation from the digitised data 2. The reported curves do not allow to control/stratify for a large number of covariates - It is possible that KM curves are reported, say, for males and females, separately; but stratification for many other variables is rare 3. It is then impossible to subset the underlying data and estimate all the relevant transition probabilities! -- <span style="display:block; margin-top: 40px ;"></span> So?... `\(\Rightarrow\)` .blue[**Partitioned Survival Modelling**] --- # Partitioned Survival Modelling (PSM) ### See <svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M503.52,241.48c-.12-1.56-.24-3.12-.24-4.68v-.12l-.36-4.68v-.12a245.86,245.86,0,0,0-7.32-41.15c0-.12,0-.12-.12-.24l-1.08-4c-.12-.24-.12-.48-.24-.6-.36-1.2-.72-2.52-1.08-3.72-.12-.24-.12-.6-.24-.84-.36-1.2-.72-2.4-1.08-3.48-.12-.36-.24-.6-.36-1-.36-1.2-.72-2.28-1.2-3.48l-.36-1.08c-.36-1.08-.84-2.28-1.2-3.36a8.27,8.27,0,0,0-.36-1c-.48-1.08-.84-2.28-1.32-3.36-.12-.24-.24-.6-.36-.84-.48-1.2-1-2.28-1.44-3.48,0-.12-.12-.24-.12-.36-1.56-3.84-3.24-7.68-5-11.4l-.36-.72c-.48-1-.84-1.8-1.32-2.64-.24-.48-.48-1.08-.72-1.56-.36-.84-.84-1.56-1.2-2.4-.36-.6-.6-1.2-1-1.8s-.84-1.44-1.2-2.28c-.36-.6-.72-1.32-1.08-1.92s-.84-1.44-1.2-2.16a18.07,18.07,0,0,0-1.2-2c-.36-.72-.84-1.32-1.2-2s-.84-1.32-1.2-2-.84-1.32-1.2-1.92-.84-1.44-1.32-2.16a15.63,15.63,0,0,0-1.2-1.8L463.2,119a15.63,15.63,0,0,0-1.2-1.8c-.48-.72-1.08-1.56-1.56-2.28-.36-.48-.72-1.08-1.08-1.56l-1.8-2.52c-.36-.48-.6-.84-1-1.32-1-1.32-1.8-2.52-2.76-3.72a248.76,248.76,0,0,0-23.51-26.64A186.82,186.82,0,0,0,412,62.46c-4-3.48-8.16-6.72-12.48-9.84a162.49,162.49,0,0,0-24.6-15.12c-2.4-1.32-4.8-2.52-7.2-3.72a254,254,0,0,0-55.43-19.56c-1.92-.36-3.84-.84-5.64-1.2h-.12c-1-.12-1.8-.36-2.76-.48a236.35,236.35,0,0,0-38-4H255.14a234.62,234.62,0,0,0-45.48,5c-33.59,7.08-63.23,21.24-82.91,39-1.08,1-1.92,1.68-2.4,2.16l-.48.48H124l-.12.12.12-.12a.12.12,0,0,0,.12-.12l-.12.12a.42.42,0,0,1,.24-.12c14.64-8.76,34.92-16,49.44-19.56l5.88-1.44c.36-.12.84-.12,1.2-.24,1.68-.36,3.36-.72,5.16-1.08.24,0,.6-.12.84-.12C250.94,20.94,319.34,40.14,367,85.61a171.49,171.49,0,0,1,26.88,32.76c30.36,49.2,27.48,111.11,3.84,147.59-34.44,53-111.35,71.27-159,24.84a84.19,84.19,0,0,1-25.56-59,74.05,74.05,0,0,1,6.24-31c1.68-3.84,13.08-25.67,18.24-24.59-13.08-2.76-37.55,2.64-54.71,28.19-15.36,22.92-14.52,58.2-5,83.28a132.85,132.85,0,0,1-12.12-39.24c-12.24-82.55,43.31-153,94.31-170.51-27.48-24-96.47-22.31-147.71,15.36-29.88,22-51.23,53.16-62.51,90.36,1.68-20.88,9.6-52.08,25.8-83.88-17.16,8.88-39,37-49.8,62.88-15.6,37.43-21,82.19-16.08,124.79.36,3.24.72,6.36,1.08,9.6,19.92,117.11,122,206.38,244.78,206.38C392.77,503.42,504,392.19,504,255,503.88,250.48,503.76,245.92,503.52,241.48Z"></path></svg> [NICE DSU report](http://scharr.dept.shef.ac.uk/nicedsu/wp-content/uploads/sites/7/2017/06/Partitioned-Survival-Analysis-final-report.pdf) <img src="./img/unnamed-chunk-65-1.png" style="display: block; margin: auto;" width="75%" title="The survival curves for OS and PFS can be used to derive the proportion of individuals who at each time point are progressed as the difference between the other two: if you are not dead and you are not in progression free, then you are progressed..."> --- count: false # Partitioned Survival Modelling (PSM) ### See <svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M503.52,241.48c-.12-1.56-.24-3.12-.24-4.68v-.12l-.36-4.68v-.12a245.86,245.86,0,0,0-7.32-41.15c0-.12,0-.12-.12-.24l-1.08-4c-.12-.24-.12-.48-.24-.6-.36-1.2-.72-2.52-1.08-3.72-.12-.24-.12-.6-.24-.84-.36-1.2-.72-2.4-1.08-3.48-.12-.36-.24-.6-.36-1-.36-1.2-.72-2.28-1.2-3.48l-.36-1.08c-.36-1.08-.84-2.28-1.2-3.36a8.27,8.27,0,0,0-.36-1c-.48-1.08-.84-2.28-1.32-3.36-.12-.24-.24-.6-.36-.84-.48-1.2-1-2.28-1.44-3.48,0-.12-.12-.24-.12-.36-1.56-3.84-3.24-7.68-5-11.4l-.36-.72c-.48-1-.84-1.8-1.32-2.64-.24-.48-.48-1.08-.72-1.56-.36-.84-.84-1.56-1.2-2.4-.36-.6-.6-1.2-1-1.8s-.84-1.44-1.2-2.28c-.36-.6-.72-1.32-1.08-1.92s-.84-1.44-1.2-2.16a18.07,18.07,0,0,0-1.2-2c-.36-.72-.84-1.32-1.2-2s-.84-1.32-1.2-2-.84-1.32-1.2-1.92-.84-1.44-1.32-2.16a15.63,15.63,0,0,0-1.2-1.8L463.2,119a15.63,15.63,0,0,0-1.2-1.8c-.48-.72-1.08-1.56-1.56-2.28-.36-.48-.72-1.08-1.08-1.56l-1.8-2.52c-.36-.48-.6-.84-1-1.32-1-1.32-1.8-2.52-2.76-3.72a248.76,248.76,0,0,0-23.51-26.64A186.82,186.82,0,0,0,412,62.46c-4-3.48-8.16-6.72-12.48-9.84a162.49,162.49,0,0,0-24.6-15.12c-2.4-1.32-4.8-2.52-7.2-3.72a254,254,0,0,0-55.43-19.56c-1.92-.36-3.84-.84-5.64-1.2h-.12c-1-.12-1.8-.36-2.76-.48a236.35,236.35,0,0,0-38-4H255.14a234.62,234.62,0,0,0-45.48,5c-33.59,7.08-63.23,21.24-82.91,39-1.08,1-1.92,1.68-2.4,2.16l-.48.48H124l-.12.12.12-.12a.12.12,0,0,0,.12-.12l-.12.12a.42.42,0,0,1,.24-.12c14.64-8.76,34.92-16,49.44-19.56l5.88-1.44c.36-.12.84-.12,1.2-.24,1.68-.36,3.36-.72,5.16-1.08.24,0,.6-.12.84-.12C250.94,20.94,319.34,40.14,367,85.61a171.49,171.49,0,0,1,26.88,32.76c30.36,49.2,27.48,111.11,3.84,147.59-34.44,53-111.35,71.27-159,24.84a84.19,84.19,0,0,1-25.56-59,74.05,74.05,0,0,1,6.24-31c1.68-3.84,13.08-25.67,18.24-24.59-13.08-2.76-37.55,2.64-54.71,28.19-15.36,22.92-14.52,58.2-5,83.28a132.85,132.85,0,0,1-12.12-39.24c-12.24-82.55,43.31-153,94.31-170.51-27.48-24-96.47-22.31-147.71,15.36-29.88,22-51.23,53.16-62.51,90.36,1.68-20.88,9.6-52.08,25.8-83.88-17.16,8.88-39,37-49.8,62.88-15.6,37.43-21,82.19-16.08,124.79.36,3.24.72,6.36,1.08,9.6,19.92,117.11,122,206.38,244.78,206.38C392.77,503.42,504,392.19,504,255,503.88,250.48,503.76,245.92,503.52,241.48Z"></path></svg> [NICE DSU report](http://scharr.dept.shef.ac.uk/nicedsu/wp-content/uploads/sites/7/2017/06/Partitioned-Survival-Analysis-final-report.pdf) <img src="./img/unnamed-chunk-66-1.png" style="display: block; margin: auto;" width="75%" title="This representation makes it even clearer"> --- # Markov models and PSM <center><img src=./img/3state2-1.png width='85%' title='INCLUDE TEXT HERE'></center> <span style="display:block; margin-top: -20px ;"></span> ## Problem - **Ideally**, want to estimate the transition probabilities `\(\bm\lambda\)` to run the MM - But, we're likely to only have access to (most likely digitised!) data on PFS/OS **separately** - PFS data record transition to either progression **or** death - **Digitised** OS data conflate `\(\lambda_{12}\)`, `\(\lambda_{13}\)` and `\(\lambda_{23}\)` --- count: false # Markov models and PSM <center><img src=./img/3state3-1.png width='85%' title='INCLUDE TEXT HERE'></center> <span style="display:block; margin-top: -20px ;"></span> ## (PSM) Solution - Can estimate the .red[**proportion of people in each state**] at each time point - Basically run the simulation to attach costs & utilities to the number of individuals in each state at each time - **NB**: Partitioned survival analysis only applies for diseases where patients can only move .red[forward] - In a partitioned survival analysis, mortality is determined by time-to-death and not linked to concurring event --- # Conclusions & further tools - MMs are ubiquitous in health economic evaluation and HTA - Once the transition probabilities have been estimated, the actual MM part is fairly easy - Based on matrix algebra – even Excel can handle it (in combination with statistical software for the main analysis...) - **But**: .red[**much**] more efficient to run the whole process through proper statistical software! .content-box-beamer[ ### Further tools <svg viewBox="0 0 581 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M581 226.6C581 119.1 450.9 32 290.5 32S0 119.1 0 226.6C0 322.4 103.3 402 239.4 418.1V480h99.1v-61.5c24.3-2.7 47.6-7.4 69.4-13.9L448 480h112l-67.4-113.7c54.5-35.4 88.4-84.9 88.4-139.7zm-466.8 14.5c0-73.5 98.9-133 220.8-133s211.9 40.7 211.9 133c0 50.1-26.5 85-70.3 106.4-2.4-1.6-4.7-2.9-6.4-3.7-10.2-5.2-27.8-10.5-27.8-10.5s86.6-6.4 86.6-92.7-90.6-87.9-90.6-87.9h-199V361c-74.1-21.5-125.2-67.1-125.2-119.9zm225.1 38.3v-55.6c57.8 0 87.8-6.8 87.8 27.3 0 36.5-38.2 28.3-87.8 28.3zm-.9 72.5H365c10.8 0 18.9 11.7 24 19.2-16.1 1.9-33 2.8-50.6 2.9v-22.1z"></path></svg> [heemod](https://cran.r-project.org/web/packages/heemod/index.html) - A general purpose package to run the whole MM process in <tt>R</tt> (can be linked to `BCEA`, but fundamentally a frequentist analysis) <svg viewBox="0 0 581 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M581 226.6C581 119.1 450.9 32 290.5 32S0 119.1 0 226.6C0 322.4 103.3 402 239.4 418.1V480h99.1v-61.5c24.3-2.7 47.6-7.4 69.4-13.9L448 480h112l-67.4-113.7c54.5-35.4 88.4-84.9 88.4-139.7zm-466.8 14.5c0-73.5 98.9-133 220.8-133s211.9 40.7 211.9 133c0 50.1-26.5 85-70.3 106.4-2.4-1.6-4.7-2.9-6.4-3.7-10.2-5.2-27.8-10.5-27.8-10.5s86.6-6.4 86.6-92.7-90.6-87.9-90.6-87.9h-199V361c-74.1-21.5-125.2-67.1-125.2-119.9zm225.1 38.3v-55.6c57.8 0 87.8-6.8 87.8 27.3 0 36.5-38.2 28.3-87.8 28.3zm-.9 72.5H365c10.8 0 18.9 11.7 24 19.2-16.1 1.9-33 2.8-50.6 2.9v-22.1z"></path></svg> [hesim](https://cran.r-project.org/web/packages/hesim/index.html) - A modular and computationally efficient <tt>R</tt> package for MMs; supports <svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <g groupmode="layer" id="layer6" label="icon"> <path style="stroke-width:0.07717" d="m 115.59247,222.50738 c -9.72601,0 -18.734334,7.07397 -24.986084,14.41694 -5.061076,5.95394 -7.591049,15.13238 -7.591049,22.77486 0,7.6402 2.870733,16.13879 7.931808,22.09274 6.152292,7.34297 12.778135,12.37522 22.603045,12.37522 8.83314,0 19.33786,-3.70766 25.389,-9.76105 6.1523,-6.05338 11.26931,-16.21737 11.26931,-25.04826 0,-8.73142 -2.39548,-19.18696 -8.54776,-25.24039 -6.15229,-6.15455 -17.33741,-11.61061 -26.06883,-11.61061 z m 174.6438,2.39944 c -10.12046,0 -18.35798,3.98058 -24.70919,11.93724 -5.15827,6.38628 -7.73967,13.66255 -7.73967,21.82831 0,8.27088 2.5814,15.59914 7.73967,21.98538 6.35064,7.95667 14.58873,11.93729 24.70919,11.93729 9.03149,0 16.67002,-3.25109 22.9212,-9.74241 6.25399,-6.59703 9.37846,-14.65259 9.37846,-24.18026 0,-9.422 -3.17646,-17.37639 -9.52708,-23.86775 -6.2495,-6.59477 -13.8428,-9.89721 -22.77258,-9.89721 z M 255.99998,7.9999981 C 119.03396,7.9999981 7.9999985,119.03394 7.9999985,255.99998 7.9999985,392.96602 119.03396,504 255.99998,504 392.96606,504 504,392.96602 504,255.99998 504,119.03394 392.96606,7.9999981 255.99998,7.9999981 Z M 197.17431,331.79065 h -45.93563 v -18.69931 c -4.66437,5.85506 -15.63869,11.82369 -20.40025,14.50172 -8.33473,4.66267 -19.65377,7.70067 -30.27265,7.70067 -17.167865,0 -32.44885,-5.425 -45.844653,-17.23173 -15.977193,-14.0903 -23.483472,-35.63322 -23.483472,-58.85447 0,-23.61798 8.186103,-42.47212 24.559999,-56.56242 12.999092,-11.21393 28.896046,-20.18949 45.766106,-20.18949 9.82264,0 21.93961,0.88269 30.57214,5.04865 4.96218,2.38076 13.84449,7.98548 19.10448,13.44381 v -98.50164 h 45.93564 v 229.34421 z m 157.21544,-21.13999 c -15.28099,17.58718 -36.66682,26.38303 -64.15348,26.38303 -27.58613,0 -49.01942,-8.79585 -64.30436,-26.38303 -12.60069,-14.44803 -18.90387,-32.19228 -18.90387,-53.23507 0,-18.94908 6.35065,-35.75132 19.0525,-50.4079 15.37988,-17.69285 37.26185,-26.54011 65.64139,-26.54011 26.09766,0 46.93585,8.84558 62.51694,26.54011 12.70185,14.44806 19.05247,31.66734 19.05247,51.66468 0.003,20.20586 -6.29921,37.53085 -18.90159,51.97886 z m 38.76899,-199.21794 c 5.35888,-5.35888 11.85868,-8.03746 19.49892,-8.03746 7.64024,0 14.14005,2.67858 19.49893,8.03746 5.35888,5.25945 8.03746,11.70955 8.03746,19.35034 0,7.73965 -2.67858,14.28864 -8.03746,19.64753 -5.25944,5.25944 -11.75925,7.8883 -19.49893,7.8883 -7.64247,0 -14.14227,-2.67861 -19.49892,-8.0375 -5.2594,-5.35885 -7.88829,-11.85871 -7.88829,-19.49892 -0.003,-7.6402 2.62889,-14.0903 7.88829,-19.35029 z m 43.91029,220.24265 H 388.24626 V 185.84118 h 48.82277 z" id="path2"></path> </g></svg> [cohort discrete time state transition models](doi:10.2165/00019053-199813040-00003), <svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <g groupmode="layer" id="layer6" label="icon"> <path style="stroke-width:0.07717" d="m 115.59247,222.50738 c -9.72601,0 -18.734334,7.07397 -24.986084,14.41694 -5.061076,5.95394 -7.591049,15.13238 -7.591049,22.77486 0,7.6402 2.870733,16.13879 7.931808,22.09274 6.152292,7.34297 12.778135,12.37522 22.603045,12.37522 8.83314,0 19.33786,-3.70766 25.389,-9.76105 6.1523,-6.05338 11.26931,-16.21737 11.26931,-25.04826 0,-8.73142 -2.39548,-19.18696 -8.54776,-25.24039 -6.15229,-6.15455 -17.33741,-11.61061 -26.06883,-11.61061 z m 174.6438,2.39944 c -10.12046,0 -18.35798,3.98058 -24.70919,11.93724 -5.15827,6.38628 -7.73967,13.66255 -7.73967,21.82831 0,8.27088 2.5814,15.59914 7.73967,21.98538 6.35064,7.95667 14.58873,11.93729 24.70919,11.93729 9.03149,0 16.67002,-3.25109 22.9212,-9.74241 6.25399,-6.59703 9.37846,-14.65259 9.37846,-24.18026 0,-9.422 -3.17646,-17.37639 -9.52708,-23.86775 -6.2495,-6.59477 -13.8428,-9.89721 -22.77258,-9.89721 z M 255.99998,7.9999981 C 119.03396,7.9999981 7.9999985,119.03394 7.9999985,255.99998 7.9999985,392.96602 119.03396,504 255.99998,504 392.96606,504 504,392.96602 504,255.99998 504,119.03394 392.96606,7.9999981 255.99998,7.9999981 Z M 197.17431,331.79065 h -45.93563 v -18.69931 c -4.66437,5.85506 -15.63869,11.82369 -20.40025,14.50172 -8.33473,4.66267 -19.65377,7.70067 -30.27265,7.70067 -17.167865,0 -32.44885,-5.425 -45.844653,-17.23173 -15.977193,-14.0903 -23.483472,-35.63322 -23.483472,-58.85447 0,-23.61798 8.186103,-42.47212 24.559999,-56.56242 12.999092,-11.21393 28.896046,-20.18949 45.766106,-20.18949 9.82264,0 21.93961,0.88269 30.57214,5.04865 4.96218,2.38076 13.84449,7.98548 19.10448,13.44381 v -98.50164 h 45.93564 v 229.34421 z m 157.21544,-21.13999 c -15.28099,17.58718 -36.66682,26.38303 -64.15348,26.38303 -27.58613,0 -49.01942,-8.79585 -64.30436,-26.38303 -12.60069,-14.44803 -18.90387,-32.19228 -18.90387,-53.23507 0,-18.94908 6.35065,-35.75132 19.0525,-50.4079 15.37988,-17.69285 37.26185,-26.54011 65.64139,-26.54011 26.09766,0 46.93585,8.84558 62.51694,26.54011 12.70185,14.44806 19.05247,31.66734 19.05247,51.66468 0.003,20.20586 -6.29921,37.53085 -18.90159,51.97886 z m 38.76899,-199.21794 c 5.35888,-5.35888 11.85868,-8.03746 19.49892,-8.03746 7.64024,0 14.14005,2.67858 19.49893,8.03746 5.35888,5.25945 8.03746,11.70955 8.03746,19.35034 0,7.73965 -2.67858,14.28864 -8.03746,19.64753 -5.25944,5.25944 -11.75925,7.8883 -19.49893,7.8883 -7.64247,0 -14.14227,-2.67861 -19.49892,-8.0375 -5.2594,-5.35885 -7.88829,-11.85871 -7.88829,-19.49892 -0.003,-7.6402 2.62889,-14.0903 7.88829,-19.35029 z m 43.91029,220.24265 H 388.24626 V 185.84118 h 48.82277 z" id="path2"></path> </g></svg> [partitioned survival models](https://doi.org/10.1002/sim.4780091106) and <svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <g groupmode="layer" id="layer6" label="icon"> <path style="stroke-width:0.07717" d="m 115.59247,222.50738 c -9.72601,0 -18.734334,7.07397 -24.986084,14.41694 -5.061076,5.95394 -7.591049,15.13238 -7.591049,22.77486 0,7.6402 2.870733,16.13879 7.931808,22.09274 6.152292,7.34297 12.778135,12.37522 22.603045,12.37522 8.83314,0 19.33786,-3.70766 25.389,-9.76105 6.1523,-6.05338 11.26931,-16.21737 11.26931,-25.04826 0,-8.73142 -2.39548,-19.18696 -8.54776,-25.24039 -6.15229,-6.15455 -17.33741,-11.61061 -26.06883,-11.61061 z m 174.6438,2.39944 c -10.12046,0 -18.35798,3.98058 -24.70919,11.93724 -5.15827,6.38628 -7.73967,13.66255 -7.73967,21.82831 0,8.27088 2.5814,15.59914 7.73967,21.98538 6.35064,7.95667 14.58873,11.93729 24.70919,11.93729 9.03149,0 16.67002,-3.25109 22.9212,-9.74241 6.25399,-6.59703 9.37846,-14.65259 9.37846,-24.18026 0,-9.422 -3.17646,-17.37639 -9.52708,-23.86775 -6.2495,-6.59477 -13.8428,-9.89721 -22.77258,-9.89721 z M 255.99998,7.9999981 C 119.03396,7.9999981 7.9999985,119.03394 7.9999985,255.99998 7.9999985,392.96602 119.03396,504 255.99998,504 392.96606,504 504,392.96602 504,255.99998 504,119.03394 392.96606,7.9999981 255.99998,7.9999981 Z M 197.17431,331.79065 h -45.93563 v -18.69931 c -4.66437,5.85506 -15.63869,11.82369 -20.40025,14.50172 -8.33473,4.66267 -19.65377,7.70067 -30.27265,7.70067 -17.167865,0 -32.44885,-5.425 -45.844653,-17.23173 -15.977193,-14.0903 -23.483472,-35.63322 -23.483472,-58.85447 0,-23.61798 8.186103,-42.47212 24.559999,-56.56242 12.999092,-11.21393 28.896046,-20.18949 45.766106,-20.18949 9.82264,0 21.93961,0.88269 30.57214,5.04865 4.96218,2.38076 13.84449,7.98548 19.10448,13.44381 v -98.50164 h 45.93564 v 229.34421 z m 157.21544,-21.13999 c -15.28099,17.58718 -36.66682,26.38303 -64.15348,26.38303 -27.58613,0 -49.01942,-8.79585 -64.30436,-26.38303 -12.60069,-14.44803 -18.90387,-32.19228 -18.90387,-53.23507 0,-18.94908 6.35065,-35.75132 19.0525,-50.4079 15.37988,-17.69285 37.26185,-26.54011 65.64139,-26.54011 26.09766,0 46.93585,8.84558 62.51694,26.54011 12.70185,14.44806 19.05247,31.66734 19.05247,51.66468 0.003,20.20586 -6.29921,37.53085 -18.90159,51.97886 z m 38.76899,-199.21794 c 5.35888,-5.35888 11.85868,-8.03746 19.49892,-8.03746 7.64024,0 14.14005,2.67858 19.49893,8.03746 5.35888,5.25945 8.03746,11.70955 8.03746,19.35034 0,7.73965 -2.67858,14.28864 -8.03746,19.64753 -5.25944,5.25944 -11.75925,7.8883 -19.49893,7.8883 -7.64247,0 -14.14227,-2.67861 -19.49892,-8.0375 -5.2594,-5.35885 -7.88829,-11.85871 -7.88829,-19.49892 -0.003,-7.6402 2.62889,-14.0903 7.88829,-19.35029 z m 43.91029,220.24265 H 388.24626 V 185.84118 h 48.82277 z" id="path2"></path> </g></svg> [individual-level continuous time state transition models](https://doi.org/10.1016/j.jval.2012.06.014) <svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M503.52,241.48c-.12-1.56-.24-3.12-.24-4.68v-.12l-.36-4.68v-.12a245.86,245.86,0,0,0-7.32-41.15c0-.12,0-.12-.12-.24l-1.08-4c-.12-.24-.12-.48-.24-.6-.36-1.2-.72-2.52-1.08-3.72-.12-.24-.12-.6-.24-.84-.36-1.2-.72-2.4-1.08-3.48-.12-.36-.24-.6-.36-1-.36-1.2-.72-2.28-1.2-3.48l-.36-1.08c-.36-1.08-.84-2.28-1.2-3.36a8.27,8.27,0,0,0-.36-1c-.48-1.08-.84-2.28-1.32-3.36-.12-.24-.24-.6-.36-.84-.48-1.2-1-2.28-1.44-3.48,0-.12-.12-.24-.12-.36-1.56-3.84-3.24-7.68-5-11.4l-.36-.72c-.48-1-.84-1.8-1.32-2.64-.24-.48-.48-1.08-.72-1.56-.36-.84-.84-1.56-1.2-2.4-.36-.6-.6-1.2-1-1.8s-.84-1.44-1.2-2.28c-.36-.6-.72-1.32-1.08-1.92s-.84-1.44-1.2-2.16a18.07,18.07,0,0,0-1.2-2c-.36-.72-.84-1.32-1.2-2s-.84-1.32-1.2-2-.84-1.32-1.2-1.92-.84-1.44-1.32-2.16a15.63,15.63,0,0,0-1.2-1.8L463.2,119a15.63,15.63,0,0,0-1.2-1.8c-.48-.72-1.08-1.56-1.56-2.28-.36-.48-.72-1.08-1.08-1.56l-1.8-2.52c-.36-.48-.6-.84-1-1.32-1-1.32-1.8-2.52-2.76-3.72a248.76,248.76,0,0,0-23.51-26.64A186.82,186.82,0,0,0,412,62.46c-4-3.48-8.16-6.72-12.48-9.84a162.49,162.49,0,0,0-24.6-15.12c-2.4-1.32-4.8-2.52-7.2-3.72a254,254,0,0,0-55.43-19.56c-1.92-.36-3.84-.84-5.64-1.2h-.12c-1-.12-1.8-.36-2.76-.48a236.35,236.35,0,0,0-38-4H255.14a234.62,234.62,0,0,0-45.48,5c-33.59,7.08-63.23,21.24-82.91,39-1.08,1-1.92,1.68-2.4,2.16l-.48.48H124l-.12.12.12-.12a.12.12,0,0,0,.12-.12l-.12.12a.42.42,0,0,1,.24-.12c14.64-8.76,34.92-16,49.44-19.56l5.88-1.44c.36-.12.84-.12,1.2-.24,1.68-.36,3.36-.72,5.16-1.08.24,0,.6-.12.84-.12C250.94,20.94,319.34,40.14,367,85.61a171.49,171.49,0,0,1,26.88,32.76c30.36,49.2,27.48,111.11,3.84,147.59-34.44,53-111.35,71.27-159,24.84a84.19,84.19,0,0,1-25.56-59,74.05,74.05,0,0,1,6.24-31c1.68-3.84,13.08-25.67,18.24-24.59-13.08-2.76-37.55,2.64-54.71,28.19-15.36,22.92-14.52,58.2-5,83.28a132.85,132.85,0,0,1-12.12-39.24c-12.24-82.55,43.31-153,94.31-170.51-27.48-24-96.47-22.31-147.71,15.36-29.88,22-51.23,53.16-62.51,90.36,1.68-20.88,9.6-52.08,25.8-83.88-17.16,8.88-39,37-49.8,62.88-15.6,37.43-21,82.19-16.08,124.79.36,3.24.72,6.36,1.08,9.6,19.92,117.11,122,206.38,244.78,206.38C392.77,503.42,504,392.19,504,255,503.88,250.48,503.76,245.92,503.52,241.48Z"></path></svg> [Cost-effectiveness analysis in `R` using multi-state modelling](https://www.gla.ac.uk/researchinstitutes/healthwellbeing/research/hehta/reports/cwilliams/) - A set of <tt>R</tt> scripts to run analyses based on individual level data (similar to the analysis shown in these slides + even more complex modelling structures) <svg viewBox="0 0 448 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z"></path> </svg> <i>Bayesian Methods in Health Economics</i>, chapter 5.4 .button[<img src="img/routledge.png" width="7%"> [Book website (CRC)](https://www-taylorfrancis-com.libproxy.ucl.ac.uk/books/9780429111396)] .button[<i class="fab fa-firefox"></i> [Book website](https://gianluca.statistica.it/bmhe)] .button[<i class="fab fa-github"></i> [Code](https://github.com/giabaio/BCEA)] <span style="display:block; margin-top: 15px ;"></span> - (**NB** This includes a relatively old example, based on a [cohort discrete time state transition models](doi:10.2165/00019053-199813040-00003), <svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <g groupmode="layer" id="layer6" label="icon"> <path style="stroke-width:0.07717" d="m 115.59247,222.50738 c -9.72601,0 -18.734334,7.07397 -24.986084,14.41694 -5.061076,5.95394 -7.591049,15.13238 -7.591049,22.77486 0,7.6402 2.870733,16.13879 7.931808,22.09274 6.152292,7.34297 12.778135,12.37522 22.603045,12.37522 8.83314,0 19.33786,-3.70766 25.389,-9.76105 6.1523,-6.05338 11.26931,-16.21737 11.26931,-25.04826 0,-8.73142 -2.39548,-19.18696 -8.54776,-25.24039 -6.15229,-6.15455 -17.33741,-11.61061 -26.06883,-11.61061 z m 174.6438,2.39944 c -10.12046,0 -18.35798,3.98058 -24.70919,11.93724 -5.15827,6.38628 -7.73967,13.66255 -7.73967,21.82831 0,8.27088 2.5814,15.59914 7.73967,21.98538 6.35064,7.95667 14.58873,11.93729 24.70919,11.93729 9.03149,0 16.67002,-3.25109 22.9212,-9.74241 6.25399,-6.59703 9.37846,-14.65259 9.37846,-24.18026 0,-9.422 -3.17646,-17.37639 -9.52708,-23.86775 -6.2495,-6.59477 -13.8428,-9.89721 -22.77258,-9.89721 z M 255.99998,7.9999981 C 119.03396,7.9999981 7.9999985,119.03394 7.9999985,255.99998 7.9999985,392.96602 119.03396,504 255.99998,504 392.96606,504 504,392.96602 504,255.99998 504,119.03394 392.96606,7.9999981 255.99998,7.9999981 Z M 197.17431,331.79065 h -45.93563 v -18.69931 c -4.66437,5.85506 -15.63869,11.82369 -20.40025,14.50172 -8.33473,4.66267 -19.65377,7.70067 -30.27265,7.70067 -17.167865,0 -32.44885,-5.425 -45.844653,-17.23173 -15.977193,-14.0903 -23.483472,-35.63322 -23.483472,-58.85447 0,-23.61798 8.186103,-42.47212 24.559999,-56.56242 12.999092,-11.21393 28.896046,-20.18949 45.766106,-20.18949 9.82264,0 21.93961,0.88269 30.57214,5.04865 4.96218,2.38076 13.84449,7.98548 19.10448,13.44381 v -98.50164 h 45.93564 v 229.34421 z m 157.21544,-21.13999 c -15.28099,17.58718 -36.66682,26.38303 -64.15348,26.38303 -27.58613,0 -49.01942,-8.79585 -64.30436,-26.38303 -12.60069,-14.44803 -18.90387,-32.19228 -18.90387,-53.23507 0,-18.94908 6.35065,-35.75132 19.0525,-50.4079 15.37988,-17.69285 37.26185,-26.54011 65.64139,-26.54011 26.09766,0 46.93585,8.84558 62.51694,26.54011 12.70185,14.44806 19.05247,31.66734 19.05247,51.66468 0.003,20.20586 -6.29921,37.53085 -18.90159,51.97886 z m 38.76899,-199.21794 c 5.35888,-5.35888 11.85868,-8.03746 19.49892,-8.03746 7.64024,0 14.14005,2.67858 19.49893,8.03746 5.35888,5.25945 8.03746,11.70955 8.03746,19.35034 0,7.73965 -2.67858,14.28864 -8.03746,19.64753 -5.25944,5.25944 -11.75925,7.8883 -19.49893,7.8883 -7.64247,0 -14.14227,-2.67861 -19.49892,-8.0375 -5.2594,-5.35885 -7.88829,-11.85871 -7.88829,-19.49892 -0.003,-7.6402 2.62889,-14.0903 7.88829,-19.35029 z m 43.91029,220.24265 H 388.24626 V 185.84118 h 48.82277 z" id="path2"></path> </g></svg>, but it's useful to have a look to!) ]