StoTree software for modeling medical interventions

Gordon Hazen, Ph.D.

StoTree is software tool for the formulation and solution of continuous-time Markov models of medical interventions. Markov chain models provide a convenient means to account for medical treatment options and risks that occur not only in the present but also in the near and distant future.

StoTree is implemented in the Excel spreadsheet environment in Windows (no Macintosh version is available). It is a Microsoft Excel addin for Microsoft Office 2007, 2010, 2013, 2016 that occupies its own tab on the Office ribbon. It represents Markov models using the graphic technique of stochastic trees.

Obtaining a copy of StoTree

Again, StoTree works only on a Windows computer running Microsoft Office 2007, 2010, 2013, 2016. I do not know whether it will work on a MacIntosh computer running one of these versions of Office. In principle it should as long as VBA for Excel is available.

You can read the available documentation for StoTree, or you can experiment with StoTree by following the directions below. You can also examine already constructed trees.

To obtain a free version of StoTree:

1.       Click here to download the Excel addin. Its name is StoTree7?x.xlam, where ? is a single character referring to a version. The latest version as of this writing is u.

2.       Save the addin file to your computer. The best place to save the file is to the standard location for Excel addins, which on a computer running Office 2016 is c:\users\[your name]\appdata\roaming\Microsoft\addins\. However, you can save it in any desired location, and then have Excel find it in the following step.

3.       Next you must install the addin in Excel. The procedure is the standard one for installing any Excel addin: Open Excel, and click through to File/Options/Addins. You should see something like this in Office 2016:

4.       As circled in red above, make sure Excel Add-ins is selected under Manage, and then click on Go.. . In Excel 2016, you should see a dialog that looks like the following (here the version in the picture is d, but you will see version u or later):

There is an alternate way to reach this dialog box that may be more useful subsequently: On the Developer tab on your ribbon, click on Excel Add-ins. (If the Developer tab is not visible, you can make it visible by clicking through the path File\Options\Customize Ribbon, and under Customize the Ribbon, click the checkbox for Developer.)

5.       If you did not save your copy of StoTree7?x.xlam in the preferred location mentioned in step 2, you will have to Browse.. to find the location where you saved it.

6.       In the Add-Ins dialog box, click the checkbox next to StoTree7?x and then click on OK.

7.       The StoTree tab should now appear on your Excel ribbon:

Playing with StoTree

You can click around the StoTree menu items (Hint: Start at the left). You may find my introductory video useful to get you started. But at some point, you should read the available documentation for StoTree, which will guide you through constructing a simple stochastic tree. You can also download an Excel workbook containing a completed stochastic tree model, and examine its features using the StoTree tab in Excel.

Excel workbooks containing completed stochastic tree models

The Excel workbooks below contain completed stochastic tree models that you may like to inspect. To download a workbook, click on the link provided below. When you open one of these workbooks, you should be aware of the following:

1.       These workbooks contain macros. Yes, StoTree does insert macros into the workbooks it creates. This means Excel believes they are dangerous workbooks. While macros can be used maliciously, the macros in these workbooks are not malicious. In order to inspect these workbooks properly, you need to enable all macros (Developer tab/ Macro Security/ Enable All Macros). Without doing so, you can view the workbooks, but not explore their structure or computational features.

Even with all macros enabled, Excel may issue various warnings:

2.       A PROTECTED VIEW warning about files from the Internet that can contain viruses. These workbooks do contain macros, which is what Excel is worried about. You can stay in protected view if you wish, but you will not be able to use the StoTree ribbon to explore the downloaded workbook. To be able to do so, you should Enable Editing.

3.       A warning about circular references. StoTree sets up circular references in workbooks it creates. Simply click OK to dismiss this warning.

4.       A security warning that automated updating of links has been disabled, and an option to enable content. The links Excel refers to are from the graphics in this workbook to the computer (probably my computer) on which this workbook was created. You do not want to update these links, so simply close the warning banner.

5.       When you click on a graphic, Excel may produce a warning that it cannot find the needed link. This is because the link is on another computer (again, probably mine). Click OK to dismiss the warning.

There is one more step:

6.       You need to convert the orphaned links in these workbooks to point to the version of StoTree that now resides on your computer. To do so, click on the Convert button in the About section of the StoTree tab. After a short pause in which conversion occurs, you should see the following acknowledgement:

You will now be able to use the StoTree ribbon in Excel to examine these workbooks. (This may seem like a lot of steps to deal with, but frankly it is a lot more trouble to read these instructions than to actually carry them out.)

Here is the list of workbooks you may find interesting.

-          Beck and Sonnenberg (1993). Modeling whether to cease post-transplant immunosuppression when melanoma occurs (the model illustrated in my introductory StoTree video). In FA Sonnenberg and JR Beck. Markov Models in Medical Decision Making: A Practical Guide. Med Decis Making 1993 (13): 322-338.

-          Test(7f).xlsm. A simple model of testing for a generic disease.

-          Exer 2_5 HIV-AIDS (StoTree 7f).xlsm. A stochastic tree cost-effectiveness model of the decision to use add lamivudine to zidovudine therapy for HIV-positive individuals. Based on Chapter 2 from Briggs, Sculpher, Claxton (2006), Decision Modeling for Health Economic Evaluation.

-          Exer 3_5 (StoTree7f).xlsm. A stochastic tree cost-effectiveness model of the decision to recommend a new prosthesis for hip replacement. Based on Chapter 3 from Briggs, Sculpher, Claxton (2006), Decision Modeling for Health Economic Evaluation.

-          Matchar and Pauker 1986.xlsm. A stochastic tree cost-effectiveness model of the decision to undertake carotid endarterectomy. Based on Matchar DB, Pauker SG. Transient ischemic attacks in a man with coronary artery disease: two strategies neck and neck. Med Decis Making 1986 (6): 239-49.

-          Tsevat et al (1989).xlsm. A multi-factor stochastic tree cost-effectiveness model of the decision to administer the anticoagulant warfarin. Based on Tsevat J, Eckman MH, McNutt RA, Pauker SG. Warfarin for dilated cardiomyopathy: a bloody tough pill to swallow? Med Decis Making 1989 (9): 162-9.

-          Chang Pelliessier Hazen 1996.xlsm. A multi-factor stochastic tree cost-effectiveness model of the hip replacement decision for elderly adults. Based on Chang RW, Pellissier JM, Hazen GB. A cost-effectiveness analysis of total hip arthroplasty for osteoarthritis of the hip. JAMA March 20, 1966-275(11) 858-865.

These workbooks have named cells that contain parameter settings used in the QALY and cost calculations. You might try changing values in these cells and recalculating the cohort sheet to do simple what-if analyses.