0% found this document useful (0 votes)
356 views438 pages

Treeage Pro 2004 User'S Manual

Uploaded by

vanyadj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
356 views438 pages

Treeage Pro 2004 User'S Manual

Uploaded by

vanyadj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 438

TreeAge Pro 2004 User's Manual

TreeAge Pro 2004 User's Manual


Copyright © 1988-2004 by TreeAge Software, Inc. All rights reserved. No part of
this manual may be reproduced in any manner or translated into another language
without the express, written permission of TreeAge Software, Inc.

TreeAge Pro, TreeAge Pro Interactive, Decision Analysis by TreeAge, DATA,


DATA Professional, DATA Pro, and DATA Interactive are trademarks of TreeAge
Software, Inc. Other product names mentioned herein may be trademarks and/or
registered trademarks of the respective holders.

The computer program (“Software”) described in this user’s manual is owned by


TreeAge Software, Inc. The Software may be used or copied only in accordance
with the terms of a License Agreement which accompanies the Software. Anyone
installing, copying, or otherwise using the Software is bound by the terms of that
License Agreement.

The License Agreement sets forth a warranty which is expressly limited to the
media on which the Software is provided and also contains a limitation on liability.
Please do not use the Software in any way without first reading, and concluding that
you are willing to be bound by the terms of, the License Agreement.

Nothing in this user’s manual, which is informational only, is intended to expand


the limited warranty specified in the License Agreement or to act as a representation
or warranty of merchantability or fitness for a particular purpose.

1075 Main Street


Williamstown, MA 01267
Voice: 413.458-0104
Fax: 413.458-0105
E-mail: [email protected]
Web: http://www.treeage.com
CONTENTS
INTRODUCTION......................................................................................................................................... 1
OPTIONAL MODULES........................................................................................................................................... 1
INSTALLATION AND SYSTEM REQUIREMENTS ......................................................................................................... 2
GETTING TECHNICAL SUPPORT............................................................................................................................. 2
FILE COMPATIBILITY ............................................................................................................................................ 3
ORGANIZATION OF THIS MANUAL ........................................................................................................................ 3

PART I: GETTING STARTED WITH TREEAGE PRO 2004 ................................................................ 5

CHAPTER 1: DECISION ANALYSIS PRIMER ...................................................................................... 7


WHAT IS DECISION ANALYSIS? ............................................................................................................................ 8
Modeling ................................................................................................................................................................... 8
Expected values and optimal decisions......................................................................................................... 9
Expected utilities and certainty equivalents ............................................................................................... 10
Sensitivity analysis and Monte Carlo simulation ...................................................................................... 10
A SIMPLE PROBLEM: HOW SHOULD I INVEST $1,000? .................................................................................... 11
DECISION TREES ............................................................................................................................................... 11
Tree structure......................................................................................................................................................... 12
Probabilities and payoffs................................................................................................................................... 13
Calculating the tree ............................................................................................................................................. 14
INFLUENCE DIAGRAMS ....................................................................................................................................... 15
Influence diagram structure ............................................................................................................................. 15
Analyzing influence diagrams ......................................................................................................................... 16
FURTHER READING ............................................................................................................................................ 17

CHAPTER 2: A DECISION TREE TUTORIAL..................................................................................... 19


CONSTRUCTING A TREE .....................................................................................................................................20
The tree window ..................................................................................................................................................20
The root node .......................................................................................................................................................20
Selecting and deselecting a node ..................................................................................................................21
Entering node text ...............................................................................................................................................21

Table of Contents iii


Adding branches (and nodes)..........................................................................................................................22
Deleting branches................................................................................................................................................22
Navigating the tree using the keyboard......................................................................................................23
ENTERING PAYOFF VALUES ................................................................................................................................24
ENTERING PROBABILITIES ...................................................................................................................................26
SETTING CALCULATION PREFERENCES .................................................................................................................27
CALCULATING THE TREE ....................................................................................................................................28
WHAT’S NEXT?................................................................................................................................................29

CHAPTER 3: AN INFLUENCE DIAGRAM TUTORIAL .................................................................... 31


CONSTRUCTING AN INFLUENCE DIAGRAM ...........................................................................................................32
The influence diagram window......................................................................................................................32
Creating and selecting nodes ..........................................................................................................................33
Entering node text ...............................................................................................................................................33
Adding arcs ............................................................................................................................................................34
Editing existing nodes ........................................................................................................................................35
Selecting and editing existing arcs ............................................................................................................... 36
ENTERING HIDDEN INFORMATION ......................................................................................................................37
Assigning alternatives and outcomes...........................................................................................................37
Entering probabilities......................................................................................................................................... 39
Entering values .................................................................................................................................................... 40
Creating asymmetry: arc information...........................................................................................................41
Entering values, revisited ..................................................................................................................................42
CALCULATING THE MODEL ................................................................................................................................43
Notes on conversion...........................................................................................................................................43
WHAT’S NEXT?................................................................................................................................................44

CHAPTER 4: PRINTING AND PRESENTING TREES AND INFLUENCE DIAGRAMS ...........45


PRINTING .........................................................................................................................................................46
Adjusting printouts using print preview...................................................................................................... 46
Headers and footers (trees only) ....................................................................................................................47
Printing preferences ........................................................................................................................................... 48
EXPORTING PICTURES ........................................................................................................................................48
Copying a picture using the clipboard ........................................................................................................ 49
Exporting a picture to a file............................................................................................................................. 50
Working with metafile and bitmap exported graphics ..........................................................................51
TREEAGE PRO ROLL BACK (.TRB) FILES ............................................................................................................52

iv TreeAge Pro 2004 User's Manual


PART II: WORKING WITH DECISION TREES....................................................................................53

CHAPTER 5: ANALYZING DECISION TREES ...................................................................................55


NUMERIC FORMATTING ....................................................................................................................................56
EXPECTED VALUES ............................................................................................................................................57
ROLL BACK.......................................................................................................................................................58
Customizing the roll back display ................................................................................................................. 59
RANKINGS ........................................................................................................................................................60
STANDARD DEVIATION ...................................................................................................................................... 61
PROBABILITY DISTRIBUTION ...............................................................................................................................62
Downstream decision nodes ...........................................................................................................................64
Cumulative probability distributions .............................................................................................................65
Comparative probability distributions ......................................................................................................... 66
Dominance in probability distributions....................................................................................................... 69
EXPECTED VALUE OF PERFECT INFORMATION ...................................................................................................... 71
How EVPI is calculated.......................................................................................................................................71
Avoiding EVPI errors ...........................................................................................................................................74
MISCELLANEOUS ANALYSES ...............................................................................................................................75
Range of possible payoffs.................................................................................................................................75
Over/under probabilities ...................................................................................................................................75
Verify probabilities...............................................................................................................................................76

CHAPTER 6: GRAPH WINDOWS........................................................................................................77


CUSTOMIZING INDIVIDUAL GRAPHS ....................................................................................................................78
Moving and sizing the graph...........................................................................................................................78
Creating custom labels.......................................................................................................................................82
Making changes to numeric axes ..................................................................................................................82
Adding a horizontal or vertical line...............................................................................................................85
VIEWING AND EXPORTING GRAPH DATA ............................................................................................................86
Viewing a graph’s text report ......................................................................................................................... 86
Printing text reports ............................................................................................................................................87
Exporting text reports.........................................................................................................................................87
DETAILS ON SPECIFIC GRAPH TYPES ...................................................................................................................88
Bar graphs ............................................................................................................................................................. 88
Line graphs............................................................................................................................................................ 89
Scatterplots............................................................................................................................................................ 90
Region graphs.......................................................................................................................................................91
Tornado diagrams ...............................................................................................................................................91
USING GRAPH TEMPLATES .................................................................................................................................92
Creating and applying graph templates ......................................................................................................92

Table of Contents v
CHAPTER 7: TREE CALCULATION METHODS AND PREFERENCES .......................................95
CHANGING WHAT THE TREE CALCULATES...........................................................................................................96
Numeric formatting............................................................................................................................................ 96
Optimal path..........................................................................................................................................................97
Payoff sets ..............................................................................................................................................................97
Calculation methods.......................................................................................................................................... 98
CHANGING WHAT ROLL BACK CALCULATES ........................................................................................................99
Maximin roll back............................................................................................................................................. 100
CALCULATIONS USING MULTIPLE ATTRIBUTES.................................................................................................... 101
How benefit-cost calculations are performed......................................................................................... 102
How weighted multi-attribute calculations are performed ................................................................ 102

CHAPTER 8: SELECTING SUBTREES AND MULTIPLE NODES ................................................105


SELECTING A SUBTREE .....................................................................................................................................106
SELECTING MULTIPLE, UNRELATED NODES ........................................................................................................106
SELECTING MULTIPLE NODES BY CHARACTERISTIC .............................................................................................107

CHAPTER 9: MAKING CHANGES TO TREE STRUCTURE..........................................................109


TREE-BUILDING COMMANDS – A REVIEW ......................................................................................................... 110
INSERTING, DELETING, AND REORDERING BRANCHES ......................................................................................... 110
CUT, COPY, PASTE, AND CLEAR ENDNODES AND SUBTREES ............................................................................... 114
Using the tree clipboards ................................................................................................................................117
CUT, COPY, PASTE, AND CLEAR TEXT............................................................................................................... 117
UNDO AND REDO .......................................................................................................................................... 119
REVERTING TO A FILE’S SAVED STATE .............................................................................................................. 119

CHAPTER 10: ANNOTATING THE TREE.......................................................................................... 121


LABEL NODES .................................................................................................................................................122
NODE COMMENTS ..........................................................................................................................................122
NOTE BOXES AND ARROWS ............................................................................................................................124
Creating note boxes......................................................................................................................................... 124
Binding a note box to a node ...................................................................................................................... 126
Creating arrows ..................................................................................................................................................127

CHAPTER 11: TREE DISPLAY PREFERENCES AND OPTIONS.................................................129


COLLAPSING SUBTREES ....................................................................................................................................130
ALIGNING SELECTED NODES............................................................................................................................. 131
CHANGING ROLL BACK DISPLAY .....................................................................................................................132
Roll back display options ............................................................................................................................... 132
Roll back columns ............................................................................................................................................ 133

vi TreeAge Pro 2004 User's Manual


OTHER TREE DISPLAY PREFERENCES..................................................................................................................137
Hiding and boxing payoffs.............................................................................................................................137
Displaying a "skeleton" tree...........................................................................................................................137
Terminal node numbers ................................................................................................................................. 138
Hiding probabilities and branch labels ..................................................................................................... 138
Horizontally aligning terminal nodes ........................................................................................................ 139
Increasing or decreasing vertical white space........................................................................................ 139
CHANGING FONTS........................................................................................................................................... 141

CHAPTER 12: MORE TREE-BUILDING TOOLS..............................................................................143


FIND AND REPLACE TEXT, FORMULAS, AND VALUES ..........................................................................................144
REGIONAL NUMERIC SETTINGS (DECIMALS AND THOUSANDS SEPARATORS).........................................................145
Replacing separators in existing numeric entries.................................................................................. 146
PROBABILITY WHEEL .......................................................................................................................................148
OVERRIDING THE OPTIMAL PATH AT SELECTED NODES .....................................................................................149
Force path............................................................................................................................................................ 150
Change optimal path....................................................................................................................................... 150

PART III: ANALYZING UNCERTAINTY USING VARIABLES AND DISTRIBUTIONS .............151

CHAPTER 13: INTRODUCTION TO VARIABLES AND SENSITIVITY ANALYSIS.................153


SENSITIVITY ANALYSIS BACKGROUND ...............................................................................................................154
Variables and sensitivity analysis................................................................................................................ 155
USING VARIABLES IN A TREE............................................................................................................................155
Guidelines for naming variables.................................................................................................................. 156
Steps for using variables ................................................................................................................................ 156
Using variables: an example......................................................................................................................... 157
Creating and defining variables................................................................................................................... 157
Finding and fixing problems with definitions ......................................................................................... 159
Adjusting complementary probabilities .................................................................................................... 160
PERFORMING SENSITIVITY ANALYSIS .................................................................................................................164
Setting the sensitivity analysis range......................................................................................................... 165
The sensitivity analysis graph and report ................................................................................................ 167
The Threshold Values legend ....................................................................................................................... 168

Table of Contents vii


CHAPTER 14: WORKING WITH VARIABLES................................................................................. 171
THE VARIABLES REPORT .................................................................................................................................172
VARIABLES TESTING TOOLS ..............................................................................................................................173
The Calculator/Evaluator ................................................................................................................................173
Variable sliders....................................................................................................................................................174
THE INSERT VARIABLE DIALOG ........................................................................................................................175
THE VARIABLE DEFINITIONS WINDOW............................................................................................................. 176
Updating and adding variable definitions ................................................................................................176
Changing the node selection.........................................................................................................................177
Using the Show inherited option..................................................................................................................177
Cut, copy, and paste definitions....................................................................................................................178
THE VARIABLES AND TABLES DIALOG ..............................................................................................................179
Selecting multiple variables at once............................................................................................................179
The Properties dialog ..................................................................................................................................... 180
THE DEFINE VARIABLE WINDOW.....................................................................................................................182
Using functions and the Function Helper................................................................................................. 183

CHAPTER 15: SENSITIVITY ANALYSIS TOOLS .............................................................................185


ANALYZING VARIABLES WITH MULTIPLE DEFINITIONS ........................................................................................186
TORNADO DIAGRAMS ......................................................................................................................................188
Additional calculations in the text report................................................................................................. 190
TWO-WAY SENSITIVITY ANALYSIS ..................................................................................................................... 191
Isocontours.......................................................................................................................................................... 193
THREE-WAY SENSITIVITY ANALYSIS...................................................................................................................195
THRESHOLD ANALYSIS .....................................................................................................................................196
Tolerance.............................................................................................................................................................. 197
Non-linearity....................................................................................................................................................... 197
ANALYZING A SINGLE OPTION .........................................................................................................................199
CORRELATED VARIABLES................................................................................................................................. 200
SENSITIVITY ANALYSIS ON VARIABLES WITH NON-NUMERIC DEFINITIONS ........................................................... 202
CHECKING PROBABILITY COHERENCE ............................................................................................................... 202

CHAPTER 16: DISTRIBUTIONS AND MONTE CARLO SIMULATION ................................... 203


SIMULATION USING MULTIPLE PROCESSORS...................................................................................................... 204
USES OF MONTE CARLO SIMULATION ............................................................................................................ 204
Probabilistic sensitivity analysis...................................................................................................................204
Nonlinearity ........................................................................................................................................................205
EVPI/value of information analysis............................................................................................................205
Microsimulation (first-order trials) ...............................................................................................................206

viii TreeAge Pro 2004 User's Manual


PERFORMING PROBABILISTIC SENSITIVITY ANALYSIS IN TREEAGE PRO ............................................................... 207
Defining and using a distribution in a tree .............................................................................................. 207
Running the Monte Carlo simulation..........................................................................................................211
Monte Carlo simulation reports and graphs ............................................................................................212
SIMULATION OPTIONS ..................................................................................................................................... 215
“Seeding” the random number generator .................................................................................................215
Turning off sampling of selected distributions ........................................................................................215
Recalculate using first-order trials or EV calculations ...........................................................................216
"Downstream" decision nodes during simulations................................................................................217
Identifying simulations.....................................................................................................................................218
DISTRIBUTION OPTIONS .................................................................................................................................. 219
Defining distribution parameters non-numerically................................................................................219
Advanced sampling properties .....................................................................................................................219
Sampling during EV calculations.................................................................................................................220

CHAPTER 17: TABLES AND TABLE-TYPE DISTRIBUTIONS ......................................................221


CREATING AND USING TABLES ........................................................................................................................ 222
Creating tables ..................................................................................................................................................222
Entering values in tables ................................................................................................................................223
Looking up table values in formulas .........................................................................................................225
More tables details ...........................................................................................................................................225
CREATING CUSTOM DISTRIBUTIONS ................................................................................................................. 226
Creating a Table-type distribution ..............................................................................................................226
Using a uniform distribution to sample from a table........................................................................... 227
Linking to an Excel spreadsheet distribution ..........................................................................................228
CREATING A TREE/TABLES "PACKAGE" OR REPORT .......................................................................................... 228
The Tables Used report ...................................................................................................................................229
TABLE LOOKUP METHODS ............................................................................................................................... 229

CHAPTER 18: USING STORED ANALYSES AND ANALYSIS SEQUENCES............................231


USING STORED ANALYSES ............................................................................................................................... 232
Using graph templates with stored analyses ..........................................................................................234
STORED ANALYSES IN A RUN-TIME CUSTOM INTERFACE.................................................................................... 235
BUILDING CUSTOM DECISION ANALYSIS APPLICATIONS ..................................................................................... 235
SEQUENCING STORED ANALYSES ..................................................................................................................... 235

Table of Contents ix
PART IV: MORE TREE-BUILDING TOOLS AND OPTIONS ......................................................... 241

CHAPTER 19: BUILDING COMPLEX FORMULAS USING VARIABLES................................. 243


VARIABLE FORMULAS .................................................................................................................................... 244
Building a complex cost formula: an example.......................................................................................244
Implementing a cost formula using variables ........................................................................................246
Using node-specific variable definitions ................................................................................................... 247
Variables with multiple definitions .............................................................................................................249
RECURSIVE VARIABLE DEFINITIONS .................................................................................................................. 249
How recursive definitions work ...................................................................................................................249

CHAPTER 20: LINKING WITH EXCEL AND OTHER APPLICATIONS.................................... 253


DYNAMIC LINKING WITH AN EXCEL SPREADSHEET ........................................................................................... 254
CALCULATING PAYOFFS USING DYNAMIC LINKS: AN EXAMPLE........................................................................... 254
Linking to a spreadsheet output cell..........................................................................................................255
Connecting tree variables to input cells (optional)................................................................................257
Using the cell output in the tree: the Bilink() function .........................................................................258
Calculation using dynamic links ..................................................................................................................259
USING BILINK() TO CREATE NON-DYNAMIC LINKS ............................................................................................ 260
USING DDE LINKS ...................................................................................................................................... 260
USING TREEAGE PRO AS A DDE SERVER ...................................................................................................... 265

CHAPTER 21: TOOLS FOR LARGE TREES: CLONES,


THE EXPLORER VIEW, AND LINKING ........................................................................................... 267
WORKING WITH VERY LARGE TREES .............................................................................................................. 268
THE EXPLORER VIEW ..................................................................................................................................... 269
CLONING SUBTREES........................................................................................................................................ 270
Creating clone masters and attaching copies......................................................................................... 271
Hiding clone copies.......................................................................................................................................... 275
THE NODE() FUNCTION ................................................................................................................................. 277
NESTED TREES ............................................................................................................................................... 278

x TreeAge Pro 2004 User's Manual


CHAPTER 22: ADVANCED CHANCE NODE TECHNIQUES AND OPTIONS ...................... 281
USING "NON-COHERENT" PROBABILITIES:........................................................................................................ 282
Modeling discrete and/or changing size "populations" ......................................................................283
Note on double-counting...............................................................................................................................283
SAMPLING PROBABILITIES FROM A MULTIVARIATE DIRICHLET DISTRIBUTION ...................................................... 284
USING DISTKIDS() TO CREATE INVISIBLE BRANCHES ........................................................................................ 286
DISTRIBUTING A FIXED SET OF CHANCE NODE BRANCHES ................................................................................. 288

CHAPTER 23: BAYES’ REVISION IN DECISION TREES ..............................................................291


AN INTRODUCTION TO BAYES’ REVISION ........................................................................................................ 292
Probability revision using Bayes' theorem...............................................................................................292
A simple numeric illustration ........................................................................................................................293
PERFORMING BAYES' REVISION IN THE TREE ................................................................................................... 294
Entering the probabilities ...............................................................................................................................294
Making changes to the test subtree...........................................................................................................299
Valid prior and likelihood probability expressions ...............................................................................300

CHAPTER 24: UTILITY FUNCTIONS AND RISK PREFERENCE............................................... 301


AN ILLUSTRATION .......................................................................................................................................... 302
Certainty equivalents and risk aversion ...................................................................................................302
CREATING A RISK PREFERENCE FUNCTION ........................................................................................................ 303
Other options .....................................................................................................................................................306
RISK PREFERENCE CURVES ............................................................................................................................... 307

CHAPTER 25: TREAGE PRO INTERACTIVE AND TREEAGE PRO RUN-TIME..................... 309
DEVELOPING TREEAGE PRO INTERACTIVE™ APPLICATIONS............................................................................... 310
Technical information.......................................................................................................................................311
CREATING RUN-TIME CUSTOM INTERFACES ...................................................................................................... 312
Creating a Basic Custom Interface ...............................................................................................................314
Testing the Basic Custom Interface..............................................................................................................318
Creating an Extended Custom Interface ....................................................................................................318
Protecting your intellectual property ......................................................................................................... 321

Table of Contents xi
PART V: WORKING WITH INFLUENCE DIAGRAMS .................................................................... 323

CHAPTER 26: BUILDING INFLUENCE DIAGRAMS.................................................................... 325


WHEN TO USE INFLUENCE DIAGRAMS ............................................................................................................. 326
Bayes’ revision ...................................................................................................................................................326
EVPI (expected value of perfect information) .........................................................................................326
Model size and other considerations.........................................................................................................326
Limitations of an influence diagram .......................................................................................................... 327
TIME ORDERING OF NODES............................................................................................................................. 327
TreeAge Pro’s node conversion algorithm............................................................................................... 327
Using graphical position to resolve time order......................................................................................328
ASYMMETRY .................................................................................................................................................. 329
VARIABLES AND VALUES ................................................................................................................................. 330
Node variables...................................................................................................................................................330
Node variables and asymmetry .................................................................................................................. 331
Value nodes ........................................................................................................................................................332
Deterministic nodes .........................................................................................................................................333
USING THE ASSESSMENT WINDOW .................................................................................................................. 333
Entering a new variable in the editor ........................................................................................................334
Using existing variables in the editor ........................................................................................................335
Probability wheel ..............................................................................................................................................335
Linked values .....................................................................................................................................................336
MISCELLANEOUS ............................................................................................................................................ 336
Node description...............................................................................................................................................336
Aligning nodes...................................................................................................................................................336
Arc operations.................................................................................................................................................... 337

CHAPTER 27: MORE INFLUENCE DIAGRAM TOOLS................................................................ 339


BAYES’ REVISION ........................................................................................................................................... 340
Setting up a single forecast ...........................................................................................................................340
Understanding the structure .........................................................................................................................342
Asymmetry inside the Bayesian model ....................................................................................................343
Bayes’ revision with sequential tests .........................................................................................................344
EXPECTED VALUE OF PERFECT INFORMATION ................................................................................................... 345
CLONES ......................................................................................................................................................... 346
SUB-MODELS ................................................................................................................................................. 346
Sub-models and clones................................................................................................................................... 347

xii TreeAge Pro 2004 User's Manual


APPENDICES........................................................................................................................................... 349

APPENDIX A: CHANGES FROM EARLIER VERSIONS................................................................351


CHANGES FROM DATA 3.5 TO TREEAGE PRO 2004.................................................................................. 352
CHANGES FROM DATA 4.0 AND DATA PROFESSIONAL TO TREEAGE PRO 2004 ....................................... 356

APPENDIX B: TOOL BAR AND MENU REFERENCE .................................................................. 361


THE TOOL BAR .............................................................................................................................................. 362
Navigation button.............................................................................................................................................362
Tree Window only ............................................................................................................................................362
Influence Diagram only ..................................................................................................................................362
THE STATUS BAR ........................................................................................................................................... 363
THE MENUS .................................................................................................................................................. 364
FILE MENU..................................................................................................................................................... 364
EDIT MENU.................................................................................................................................................... 365
DISPLAY MENU .............................................................................................................................................. 369
VALUES MENU ................................................................................................................................................371
OPTIONS MENU ............................................................................................................................................. 372
ANALYSIS MENU ............................................................................................................................................ 375
DIAGRAM MENU (INFLUENCE DIAGRAM WINDOW)........................................................................................... 377
GRAPH MENU ................................................................................................................................................ 378
TABLE MENU.................................................................................................................................................. 379

APPENDIX C: PREFERENCES ............................................................................................................ 381


THE PREFERENCES DIALOG ............................................................................................................................. 382
TREE FONT PREFERENCES ................................................................................................................................ 388

APPENDIX D: FUNCTIONS AND OPERATORS............................................................................ 393


OPERATORS................................................................................................................................................... 394
Arithmetic operators .......................................................................................................................................394
Relational operators.........................................................................................................................................394
Logical operators ..............................................................................................................................................395
Operator precedence.......................................................................................................................................395
MATHEMATICAL, STATISTICAL, AND OTHER FUNCTIONS ................................................................................... 397
Arithmetic functions.........................................................................................................................................397
Financial/Discounting functions..................................................................................................................398
Miscellaneous functions .................................................................................................................................399
Matrix/List functions ........................................................................................................................................400
Distribution functions ......................................................................................................................................402
Probability functions........................................................................................................................................403

Table of Contents xiii


APPENDIX E: SAMPLING DISTRIBUTION TYPES....................................................................... 405
COMMONLY-USED DISTRIBUTIONS ................................................................................................................... 406
Normal distribution ..........................................................................................................................................406
Uniform distribution (real number form) ..................................................................................................406
Uniform distribution (integer form).............................................................................................................406
Triangular distribution .....................................................................................................................................406
Fractile distributions (10/50/90 et al).........................................................................................................407
MORE CONTINUOUS DISTRIBUTIONS................................................................................................................ 407
Beta distribution (integer form) ....................................................................................................................407
Beta distribution (real number form)..........................................................................................................407
Dirichlet distribution (multivariate, normalized Beta)...........................................................................407
Chi distribution...................................................................................................................................................408
Chi-Squared distribution .................................................................................................................................408
Erlang distribution.............................................................................................................................................408
Exponential distribution..................................................................................................................................408
Gamma distribution .........................................................................................................................................409
Hyper-exponential distribution ....................................................................................................................409
Laplace distribution ..........................................................................................................................................409
Logistic distribution ..........................................................................................................................................409
Lognormal distribution.....................................................................................................................................410
Maxwell distribution .........................................................................................................................................410
Rayleigh distribution.........................................................................................................................................410
Weibull distribution ...........................................................................................................................................410
MORE DISCRETE DISTRIBUTIONS ......................................................................................................................411
Binomial distribution ........................................................................................................................................411
Poisson distribution...........................................................................................................................................411

APPENDIX F: TECHNICAL NOTES .................................................................................................... 413


CHANGING THE STORAGE LOCATION FOR TABLES ............................................................................................. 414
USING TREEAGE PRO'S COMMAND LINE ........................................................................................................ 414
Using custom start-up flags............................................................................................................................414
Multi-processor computer options ...............................................................................................................415
Startup files ..........................................................................................................................................................415
Defining variables..............................................................................................................................................415
Startup size...........................................................................................................................................................416
Influence diagrams............................................................................................................................................416

INDEX ........................................................................................................................................................ 417

xiv TreeAge Pro 2004 User's Manual


INTRODUCTION

Introduction
Welcome to Welcome to all new users of TreeAge Pro 2004!
TreeAge ProTM 2004 TreeAge Pro 2004, which replaces our earlier DATA™ and DATA
Pro™ software, has been designed to implement the techniques of deci-
sion analysis in an intuitive and easy-to-use manner. It transforms deci-
sion analysis from a potentially tedious exercise into an easily applied
and highly visual means of (1) organizing the decision making process,
(2) analyzing the problem at hand, and (3) communicating both the
structure of the problem and the basis for the decision reached.

If you are experienced in decision analysis, you will find TreeAge Pro
2004 easy to use following only a cursory review of the software com-
mands, although the richness of the program will become more apparent
with further study of the manual. If you have no, or only limited, experi-
ence with decision analysis, TreeAge Pro 2004 will make it much easier
to learn. See Chapter 1 for a basic decision analysis primer.

Optional modules
Optional modules TreeAge Pro 2004 includes both decision tree and influence diagram
functionality, Monte Carlo simulation, multi-way sensitivity analy-
sis, and much more. Additional features may be added in the form of
two optional software modules: a Healthcare module and an Excel™
module.

The TreeAge Pro Healthcare module integrates and updates the


healthcare-related features found in our DATA Pro software, including:

• Markov cohort models


• Markov Monte Carlo microsimulation
• cost-effectiveness analysis
• net health and net monetary benefits analysis

The TreeAge Pro Excel module is designed to:


• automate the creation of Excel charts and reports from
within TreeAge Pro
• simplify the integration of complex spreadsheets and
TreeAge Pro trees and influence diagrams
• convert a spreadsheet model into a fully-linked TreeAge
Pro influence diagram

Introduction 1
This manual focuses on the features of the core TreeAge Pro software.
Separate manuals for the optional software modules are available for
free download, in Adobe® Acrobat™ PDF format, at the TreeAge Soft-
ware web site:
http://www.treeage.com/treeagepro/manuals.htm

For information on adding software modules to TreeAge Pro, go to:


http://www.treeage.com/treeagepro/modules.htm

Installation and system requirements


Installation and system To install TreeAge Pro 2004, please follow the installation instructions
requirements available on the installation CD and from our web site, at:
http://www.treeage.com/treeagepro/install.htm

The installation instructions also cover hardware and software (operat-


ing system) requirements. See the next section for information on how
to contact TreeAge Software if you encounter difficulties during instal-
lation.

Getting technical support


Getting technical support There are several ways to get help in using TreeAge Pro 2004.

Using the PDF manuals


There are a number of ways to search the AcrobatTM PDF document.
The Bookmark list displayed on the left side of the Acrobat window
duplicates the manual’s Table of Contents; both includes hyperlinks
to sections within chapters. Page numbers in the document’s index are
also hyperlinked; scroll to the bottom of the Bookmark list to link to the
index. In addition, the Acrobat tool bar includes a Find button (the bin-
oculars icon), which can locate text phrases whether or not indexed.
This document relates only to the TreeAge Pro Healthcare module. Sep-
arate manuals are available for the Excel and Healthcare modules. The
latest versions of all manuals are available as free downloads, in Adobe®
Acrobat™ PDF format, at the TreeAge Software web site:
http://www.treeage.com/treeagepro/manuals.htm

Web site resources


The support section of our web site includes a variety of information for
users of the software:
http://www.treeage.com/treeagepro/support.htm

2 TreeAge Pro 2004 User‘s Manual


E-mail and telephone support
If you are a registered user of TreeAge Pro with a current maintenance
agreement, you are eligible for free e-mail and telephone support; lim-
ited technical support is available if you are evaluating the trial soft-
ware. We would like to make your use or evaluation of the software as
productive and pleasant as possible. If you need help, either:

• send an e-mail to [email protected], or


• call us at 1-413-458-0104 (1-888-TREEAGE in US/Canada)
Specify your problem or question, which release of the TreeAge Pro
Healthcare module you are using (see About TreeAge Pro, under the
Help Menu), and your serial number.

File compatibility
File compatibility TreeAge Pro 2004 can open trees, influence diagrams, graphs, and other
files created by DATA Pro or DATA. However, unless your TreeAge Pro
2004 software includes the Healthcare module, access to Markov and
cost-effectiveness models will be limited to viewing the file. The same
limitation will apply in the case of TreeAge Pro 2004 files which utilize
features specific to the Healthcare module.

TreeAge Pro trees, influence diagrams, and graphs are not directly back-
ward compatible with any versions of DATA or DATA Pro. However, an
Export command under the File menu can be used to export trees and
influence diagrams in a format compatible with DATA Pro, DATA 4.0,
or DATA 3.5. Certain features not present in the earlier software will be
lost in the conversion and, in any event, care should be taken following
conversion to confirm the accuracy of calculations.

Tables created in TreeAge Pro (*.tbl files) are backward compatible


with DATA 4.0 and DATA Pro, but not with DATA 3.5. See Chapter 17
for more details.

Note:
If you are familiar with our DATA software, please refer to Appendix A in this
manual for a description of new features and other changes in TreeAge Pro
2004. Refer to the documentation for the Healthcare module for an additional
list of changes specific to Markov and cost-effectiveness models.

Introduction 3
Organization of this manual
Organization of this This manual is for use with TreeAge Pro 2004. It includes basic tutori-
manual als for building and analyzing decision trees and influence diagrams in
TreeAge Pro, and provides a complete reference to the intermediate and
advanced functionality in the core TreeAge Pro software. Additional
reference information is available under TreeAge Pro’s Help menu.

Part I (Chapters 1–4) — For those unfamiliar with decision analy-


sis, Chapter 1 provides basic background information. It introduces a
simple investment problem used in the following two chapters. Chapter
2 shows how to use TreeAge Pro to represent the investment model as a
decision tree and then to perform expected value calculations. Chapter 3
shows how to build the same model as an influence diagram in TreeAge
Pro. Chapter 4 covers printing and exporting pictures of TreeAge Pro
documents.

Part II (Chapters 5–12) — These chapters document many modeling


and analysis features. Topics covered include: creating and customizing
graph windows; creating multi-attribute models; copying and pasting
tree structure; inserting text comment boxes in the tree window; and
customizing the appearance of the tree.

Part III (Chapters 13–18) — This crucial section of the manual covers
a central feature of TreeAge Pro, sensitivity analysis. Defining uncertain
parameters using variables is described in detail, as are tornado dia-
grams, multi-way sensitivity analysis, and probabilistic sensitivity anal-
ysis using Monte Carlo simulation and distributions. The last chapter in
the section describes the storage and reuse of analysis abstracts.

Part IV (Chapters 19–25) — The chapters in this section cover a vari-


ety of intermediate and advanced software features. These include chap-
ters on such topics as creating complex cost formulas, linking to spread-
sheets, using utility functions, and performing Bayes’ revision.

Part V (Chapters 26–27) — The two chapters in Part V detail TreeAge


Pro’s powerful and flexible influence diagram interface. These chap-
ters cover everything from the basics of influence diagrams to advanced
topics such as asymmetry, Bayes’ revision with multiple tests, expected
value of perfect information, and conversion to decision trees.

Appendices (A–F) — Following Part V are several appendices with a


description of feature updates, technical information and listings related
to TreeAge Pro’s menus, preferences, functions, and distributions.

A comprehensive index for the manual follows the appendices.

4 TreeAge Pro 2004 User‘s Manual


Part I
PART I: GETTING STARTED WITH TREEAGE PRO 2004

GETTING STARTED WITH


TREEAGE PRO 2004

The chapters in Part I provide background on decision analysis, decision trees, and
influence diagrams. They include step-by-step tutorials designed to help new users
learn how to use TreeAge Pro 2004 to build, analyze, and present decision trees and
influence diagrams.

In this part:

• Chapter 1, "Decision Analysis Primer"

• Chapter 2, "A Decision Tree Tutorial"

• Chapter 3, "An Influence Diagram Tutorial"

• Chapter 4, "Printing and Exporting Pictures of Your Model"


CHAPTER 1 CHAPTER 1: DECISION ANALYSIS PRIMER

DECISION ANALYSIS PRIMER

This chapter introduces the core concepts and methods of decision analysis
as implemented in TreeAge Pro 2004.

In this chapter:

• What is decision analysis? ............................................................ 8

• A simple problem: How should I invest $1,000?............................ 10

• Decision trees............................................................................ 11

• Influence diagrams..................................................................... 15

• Further reading.......................................................................... 17

Chapter 1: Decision Analysis Primer 7


What is decision analysis?
What is decision analysis? Decision analysis — as it is taught and practiced today in diverse fields
such as oil and gas exploration, business, health care, law, and engineer-
ing — is a systematic approach to decision making under uncertainty.
The process is designed to help decision makers think clearly about the
many elements of complex decisions, such as:

• the range of possible consequences of actions (or inaction)


• preferences among different sets of consequences
• the impact of complex, unpredictable systems and
processes (e.g., markets, geological structure, health)
• the actions of others (e.g., consumers, competitors,
regulators, patients)

The concepts and methods of decision analysis are uniquely suited to


incorporating into the decision making process both what is known
about a problem, and also what is uncertain. TreeAge Pro is used in two
of the key steps in decision analysis, modeling and analysis.

Modeling
Using decision analysis, a complex problem can be disaggregated into
smaller problems and elements, which can be more readily compre-
hended. These components are then employed in building a model of
the problem’s essential elements.

First, a set of alternatives is compiled. Then, events and other factors


that may affect the outcome of an alternative are identified. A factor
whose impact on the final outcome is not known at the time of the deci-
sion is referred to as an uncertainty, and can be represented as either a
structural element of the model, or a parameterized distribution used in
a formula in the model. Based on the decision maker’s objectives, one
or more attributes are selected to quantify preferences for the range of
possible final outcomes (and, ultimately, to rank alternatives). For exam-
ple, a monetary scale would be used to measure different project cost
scenarios and then to rank alternatives.

A particular strength of decision analysis, compared to basic spread-


sheet analysis or statistical modeling, is the intuitive, visual form of the
model. The model may be either a decision tree or an influence diagram,
which are different means of visually representing the same problem.

8 Part I: Getting Started with TreeAge Pro 2004


A decision tree is a branching structure in which various node symbols
are used to represent different kinds of events, including decisions and
uncertainties, and a node’s branches represent the outcomes or alter-
natives associated with that event. Every series of actions and outcomes
is clearly represented with a distinct path.

Alternatively, the same problem often may be represented more com-


pactly by an influence diagram. In an influence diagram, each factor
that directly or indirectly affects the final outcome is represented with a
single node. Arcs between nodes show that one factor either influences
another or precedes it in time.

Expected values and optimal decisions


While a model’s explicit identification of the sequence and linkage of
events is of great value in decision making, decision analysis is designed
to do much more. Using basic concepts from probability theory and sta-
tistics, the decision maker can calculate a mean, or expected, value for
each course of action. By calculating the value of each possible chain
of events, and weighting uncertain results by the probability of each
outcome, the decision maker can identify the sequence of decisions that
will maximize value, minimize costs, or balance multiple attributes.

These calculations are commonly illustrated with a decision about


playing a simple lottery, which can be thought of as a random variable
having a simple probability distribution of outcomes:
P lay
n't A gambler must decide whether or not to buy a ticket for a
Do
20,000 $20,000 lottery offering a 1-in-1000 chance of winning. The
Pla
y in expected value of playing this lottery — ignoring for a moment
W .001
0 the ticket price — equals 0.001*(20,000)+0.999*(0), or $20.
Lo Based on expected value, a reasonable decision would be to
0.9 se
99 purchase a ticket if it costs $20 or less.
0
Typically, decision analysis problems involve multiple uncertainties,
with the outcome of the first lottery being a second lottery, and so on.
The analysis of compound lotteries works backwards, calculating an
expected value for the final lottery and using this result in the calcula-
tion of the prior lottery. When all lotteries have been resolved in this
way, decisions are evaluated by optimization — picking the alternative
with the best expected value.

Chapter 1: Decision Analysis Primer 9


Expected utilities and certainty equivalents
A decision maker’s attitude towards risk can be incorporated into model
calculations. Using the techniques outlined in utility theory, a choice
between different lotteries can be made based on their expected utilities
or certainty equivalents, which in turn depend on the decision maker’s
attitude towards risk, quantified using a utility function.

Sensitivity analysis and Monte Carlo simulation


As illustrated with the lottery example, one way in which decision
analysis deals with uncertainty is to reflect it explicitly in the model’s
structure. Events which have a significant impact on outcomes, and
which are not under the decision maker’s control, can be described
using chance nodes and incorporated into the model calculation. A
problem may involve numerous uncertainties; not all of them can or
should be represented in the structure of the model. To deal with this,
deterministic sensitivity analysis and Monte Carlo simulation are used
to examine the potential impact of parameter assumptions and other
uncertainties.

Deterministic sensitivity analysis can take a variety of forms, including


1-, 2-, and 3-way sensitivity analysis and tornado diagrams; it can be
used to identify critical uncertainties by examining the extent to which
a model’s calculations and recommendations are affected as a conse-
quence of changing selected assumptions. Monte Carlo simulation,
also referred to as probabilistic sensitivity analysis, can incorporate all
parameter uncertainties. Probabilistic sensitivity analysis provides simi-
lar insights to deterministic sensitivity analysis, and can also quantify
the level of confidence that can be placed in the model’s results.

Sensitivity analysis, Monte Carlo simulation, and other analytical tools


can also be used to improve decision making by determining the poten-
tial value of obtaining various kinds of information (perfect, imperfect,
or sampling information) that might help resolve critical uncertainties.

A simple problem: How should I invest $1,000?


A simple problem: How Now consider a simple example. You have $1,000 to invest, and two
should I invest $1,000? potential investments: a volatile equity investment, and a risk-free cer-
tificate of deposit (CD). You will reconsider your investment decision at
the end of one year, but not earlier. You have no fees or taxes to con-
sider, just an identical $1,000 investment in either case.

10 Part I: Getting Started with TreeAge Pro 2004


The CD pays simple interest at a rate of 5% annually — your return
would be $50.

In researching the equity investment, you have come up with a simple


probability distribution describing its year-end performance: 1) a 30%
probability that its market value will have gone up by $500; 2) a 40%
probability of a modest $100 increase in value; and 3) a 30% probabil-
ity of a substantial drop in value, -$600. Your investment objective is to
maximize growth, and you are sufficiently wealthy that the possible loss
of $600 does not pose a material threat.

Note:
Assigning 30%/40%/30% probabilities to the outcomes of the risky investment
in the example follows a standard method for representing a probability dis-
tribution of outcomes based on expert opinion. This particular type of discrete
distribution is referred to as a Swanson’s mean, or 10/50/90, distribution.
The three outcomes represent the 10th, 50th, and 90th percentile values
elicited from the expert. A similar approach uses 25%/50%/25% probabilities
for the three outcomes.

For a primer on applying the basic techniques of decision analysis to


this problem, complete the rest of this chapter. If you are already famil-
iar with the fundamentals of decision analysis, you may prefer to go
directly to Chapter 2 or 3 to learn how to build this model in TreeAge
Pro 2004 as either a decision tree or an influence diagram.

Decision trees
Decision trees In building a decision tree, there are some basic guidelines to be con-
sidered:
• In the tree, events are ordered from left to right. The
decision tree should follow a rough time ordering of
events, as outcomes become known to the decision
maker. Time ordering is only critical, however, when
a decision is made prior to knowing the outcome of a
different event or when the probabilities of one event are
conditioned on another.
• Different kinds of events are distinguished using shapes
called “nodes.” A decision node (square) indicates a
choice facing the decision maker. A chance node (circle)
represents an event which has multiple possible outcomes
and is not under the decision maker’s control. A terminal
node (triangle) denotes the endpoint of a scenario.

Chapter 1: Decision Analysis Primer 11


• Branches “sprouting” from a decision node represent
the set of actions being considered. Decision alternatives
are not required to be mutually exclusive (for example,
one set of options could be “install smoke detectors,”
“install fire extinguishers,” and “install smoke detectors
and fire extinguishers").
• Branches from a chance node represent the set of
possible outcomes of the event. The branches must be
mutually exclusive and exhaustive — in other words,
defined such that all possibilities are covered and none
overlap. Their probabilities must sum to 1.0 (100%).
• Terminal nodes are assigned a value, referred to
generically as a payoff. All right-most nodes (those
without branches) must be terminal nodes and have a
payoff representing the net value — e.g., profit, cost, or
utility — of that particular scenario’s series of actions and
events.
Using these guidelines, let’s design (on paper) a decision tree that repre-
sents the investment problem posed above.

Tree structure
The first event, the decision between the
available investment options, is represented
by a square, decision node. This is the root
node of the tree. It is labeled using a branch
line to its left.

The two branches “sprouted” from the right side of the decision node
represent the alternatives under consideration: (1) Risky investment and
(2) CD paying 5%. Since there is no risk associated with investment
in the CD, this action really represents a final outcome, and a terminal
node is drawn at the end of its branch. For the risky equity investment,
however, we decided that there were three possible outcomes, so Risky
investment is drawn as a chance node.

12 Part I: Getting Started with TreeAge Pro 2004


The three outcomes of the risky investment, Large increase, Small
increase, and Large decrease, are drawn as branches emanating from
the chance node. They are final outcomes, and are represented using ter-
minal nodes.

Probabilities and payoffs


Now the structure of the tree is complete. All that remains is to place the
probabilities and payoff values in the tree.

Probabilities must be assigned to the branches emanating from a chance


node, with the branch probabilities summing to 1.0. The probability for
a particular outcome is indicated below the appropriate branch line.

Payoffs are assigned at every terminal node, and appear to the right of
the node.

Chapter 1: Decision Analysis Primer 13


Calculating the tree
The investment decision tree is now complete, and can be evaluated.
Decision tree calculations work backward, from right to left. Thus, cal-
culating a tree is often referred to as “folding back” or “rolling back”
the tree. The value of each node is determined as follows:

• The value of a terminal node is its assigned payoff value.


• The value of a chance node is its expected value. As
described earlier, this is the mean value of the probability
distribution specified by the chance node’s branches.
• The value of a decision node is equal to its best option.

Now let’s apply these rules to the investment tree. The payoffs of the
three terminal nodes are displayed. Working backward, starting from
the topmost terminal nodes, you can find the expected value (EV) of the
Risky investment chance node as follows:

EV(Risky investment) = (500 * 0.3) + (100 * 0.4) + (-600 * 0.3)

= 150 + 40 - 180 = 10.

All that remains is to calculate the value of the decision node — by


comparing the expected values of the alternatives, and deciding which
one is better. The expected value of CD paying 5% is $50, while the
expected value of Risky Investment is $10. The CD offers the higher
expected value and so it is optimal.

When a tree is rolled (or folded) back, the expected value of each
node is drawn in a box to the right of the node. At decision nodes, the
branches of non-optimal alternatives are identified by two slash marks.

Chapter 2 provides detailed instructions on how to use TreeAge Pro to


build and calculate the simple investment decision tree.

14 Part I: Getting Started with TreeAge Pro 2004


Influence diagrams
Influence diagrams Influence diagrams tend to be simpler on their face than decision trees.
While they do not display the level of detail found in a tree (i.e., sce-
narios, probabilities, and payoffs), influence diagrams portray more
clearly the factors to consider in decision making, and how those factors
are related. Even in complex problems, where the decision tree is far too
large to fit on a single printed page, the corresponding influence diagram
is almost certain to be small enough for simple reproduction and effi-
cient communication.

The design of an influence diagram is subject to a number of guidelines.


Here are the basic ones:
• “Nodes” of different shapes represent the factors
relevant to the problem. Each element of the problem
— the final objective (e.g., maximizing profit), along with
each decision, variable, and random event that can affect
the objective — is represented by a single node. A value
node (diamond) denotes a measure of the final objective.
A decision node (square) is used to indicate a decision.
A chance node (circle) is used to represent a variable (or
event) whose value (or outcome) is unknown currently.
• Related nodes are connected by arcs. An arc ending in
an arrow is drawn between two nodes to indicate that:
(a) the first event precedes the second, and/or (b) the first
event or action influences, or conditions, the second. An
influence arc might indicate that the probabilities for one
event depend on the outcome of a prior event or action.
An influence arc might also indicate that an action or event
makes some contribution to, or deduction from, the final
objective (e.g., project cost, or profit).

In accordance with these core guidelines, let’s design an influence dia-


gram that, like the decision tree constructed earlier in this chapter, repre-
sents the investment problem posed on pg. 11.

Influence diagram structure


There are no strict rules for the order or manner in which you place the
required nodes in the influence diagram. However, it may be helpful to
start with the value node, which represents the overall objective — in
this case, maximizing profit.

Chapter 1: Decision Analysis Primer 15


Next, you must consider what events and decisions may affect your
return on investment. In this case, the first event to occur is the invest-
ment of the $1,000 investment. Your choice of investment will deter-
mine, at least in part, what the profit on the investment will be. So, add a
square (or rectangular) node for the investment decision, and then draw
an arc from the decision node to the value node (“Profit”) to indicate the
direction of influence.

In our simple model, the only unknown variable to consider is the fluc-
tuation of the market. Thus, a circular (or oval) chance node is added
to the influence diagram to represent the market risk, and an arc drawn
from the chance node to the value node.

If the outcome of a chance event is known before a decision, then an arc


must be drawn to indicate this. However, no arc is required when the
opposite is true — as is the case in this model, a decision is assumed to
precede all chance events, unless an arc indicates otherwise.

Analyzing influence diagrams


Based on the guidelines covered so far, the influence diagram shown
above is visually complete, and reflects the contours of the decision
problem. However, much of the information visible on the face of the
completed tree on pg. 13 cannot be shown in the influence diagram —
the equity investment outcomes, including their probabilities and values,
and the investment options are not pictured.

16 Part I: Getting Started with TreeAge Pro 2004


In the influence diagram tutorial in Chapter 3, you will learn both how
to build the visible influence diagram in TreeAge Pro, and then how to
include the hidden information within nodes and arcs.

Tip:
Influence diagrams can be very helpful in understanding and presenting
complex decisions. Quantitative analysis in TreeAge Pro, however, requires
an influence diagram to be converted into a decision tree. If you plan to ana-
lyze influence diagrams, read the sections on decision trees in this chapter,
and both Chapters 2 and 3.

Further reading
Further reading For additional background on decision analysis in general, here are
some suggested references:

• Making Hard Decisions, Clemen (1996), Wadsworth.


• Decision Making and Forecasting, Marshall and Oliver
(1995), McGraw-Hill, Inc.
• Decision Analysis: Introductory Lectures on Choices
under Uncertainty, Raiffa (1968), Random House.
There are also numerous books and journals dealing with the applica-
tion of decision analysis in specific fields and industries. Here are a just
a few selected references:

• Decision Making in Health and Medicine, Hunink, and


Glasziou (2001), Cambridge University.
• Decision Analysis for Petroleum Exploration, 2nd Ed.,
Newendorp and Schuyler (2000), Planning Press.
• Coping with Risk in Agriculture, Hardaker, Huirne, and
Anderson (1998), CAB International.
• Introduction to Decision Analysis: A Practitioner’s
Guide to Improving Decision Quality, Skinner (1996),
Probabilistic Publishing.
Visit the TreeAge Software web site for additional resources and useful
links:

http://www.treeage.com/resources.htm

Chapter 1: Decision Analysis Primer 17


18 Part I: Getting Started with TreeAge Pro 2004
CHAPTER 2: A DECISION TREE TUTORIAL

CHAPTER 2

A DECISION TREE TUTORIAL

This chapter is designed to help new users of TreeAge Pro become


familiar with the basic steps of using the software to build decision
trees and perform simple calculations.

Users of the Healthcare module should refer to the separate


documentation for that module for instructions on setting up cost-
effectiveness decision trees.

In this chapter:

• Constructing a tree..................................................................... 20

• Entering payoff values ................................................................ 24

• Entering probabilities .................................................................. 26

• Setting calculation preferences..................................................... 27

• Calculating the tree .................................................................... 28

• What’s next?............................................................................ 29
Constructing a tree
Constructing a tree The tutorial in this chapter is based on the investment decision problem
described in Chapter 1, on pg. 11.

Tutorial Notes:
• A word in boldface followed by the > symbol indicates a menu selection.
For example, Options > Add Branches refers to the Options menu's Add
Branches command. Other words in boldface are button names.
• Words to be typed by you as part of the tutorial are shown in Courier
typeface (e.g., "Branch X").
• Some procedures explained in this chapter are not required steps for build-
c
ing the investment decision tree. Lines starting with the character are
required tutorial steps; other instructions start with the s character.

The tree window


When you first start TreeAge Pro (or if you choose File > New… and
select Tree), a new tree document is displayed below the menu bar and
tool bar. A tree window is initially divided into two views: the regu-
lar tree view on the right (white background); and the compact “tree
explorer” view on the left (grey background). The explorer view is
described in Chapter 21.

Tree building instructions in this chapter and throughout the manual


generally involve the right-hand side of the tree window; the tutorial
will refer specifically to the “tree explorer view” when necessary.

The root node


Each new decision tree document starts with a single decision node — a
blue square, with a line and text box to its left. This is the root node of
the tree. Although the root node cannot be deleted, you can change it to
a different type of node, when necessary. A litigation model, for exam-
ple, might have a chance node as the root node.

20 Part I: Getting Started with TreeAge Pro 2004


Selecting and deselecting a node
In a new tree, the root node is initially selected. TreeAge Pro shows that
a node is selected by filling in the node symbol.

® To deselect a node using the mouse:

s In the tree window (right-hand side), click in the empty white


space anywhere away from the node and its branch line.

When a node is not selected, its symbol is hollow.

® To select a single node using the mouse:

s Click directly above the line to the left of the node. (When
positioned correctly, the pointer should change to a text
cursor.)

If you double-click on the node instead, it will sprout two branches. In


this case, it is okay to leave the branches, as they will be needed later.

Entering node text


When a single node is selected, a box and a blinking text insertion caret
appear above the line to the left of the node. You can enter a brief phrase
in the box to describe the event — in this case, the investment decision.

® To enter a name or short description for a node:

c Select the root node.


c Type How should I invest $1000? in the text area.
Optionally, you may want to press ENTER after typing the word
“I” to insert a carriage return in the text.

c When you are done, click outside the node to deselect it.
Tip:
Rather than entering extensive comments in the node itself, it is often better
to use note boxes or node comments (see Chapter 10).

If the text appears too small on the screen, one way to fix the problem is
by zooming in.

® To zoom in (or zoom out):

s Choose Display > Zoom In (or Zoom Out). Or, use Display >
Zoom… to specify an exact magnification factor.

Chapter 2: A Decision Tree Tutorial 21


Adding branches (and nodes)
Branches must be added to the decision node to represent the available
investment choices.

® To add branches:

c Select the root node.


c From the menu bar, choose Options > Add Branches.
Two branches are added to the node, each ending in a chance node.
Once you have two branches, repeating the Add Branch(es) command
will add additional branches, one at a time.

Another method for adding branches to a node is to double-click on the


node symbol. When the mouse pointer is positioned over the node’s
symbol, the cursor will change to a branch cursor (shown at left) to indi-
cate that double-clicking will add branches.

Tip:
Most tree-building commands are found under the Options menu (with the
exception of generic commands like Undo and Cut/Copy/Paste). Also, many
commonly-used commands can be found grouped together under the quick
menu, accessed by right-clicking on a node.

Deleting branches
If you add an extra branch by mistake (for example, if you double-click
on a node when trying to select it, instead of just clicking), there are a
couple of ways to fix the tree.

® To undo the previous action or actions:

s Choose Edit > Undo [last action].

Or, if you do not want to undo other actions performed after mistakenly
adding the extra branch, you can select a branch and delete it.

® To delete a branch:

s Select the branch to remove and choose Options > Delete


Branch.

Tip:
If you delete a branch that is a parent (i.e., that has branches), its subtree
(i.e., its children as well as their descendants) will not be deleted; instead
the children and their descendants will move up one generation.

22 Part I: Getting Started with TreeAge Pro 2004


Navigating the tree using the keyboard
In addition to using the mouse to select a particular node, it is also pos-
sible to use the keyboard to change the selected node.

Even if no node is currently selected, there is a keyboard shortcut that


will select the root node.

® To select the root node:

s Hold down the CONTROL key and press the HOME key.

To move the selection from the current node to an adjacent node, use the
arrow keys. Try using the arrow keys to select the top branch.

® To move the selection one node to the right:

s Press the right arrow key.

Try using the other arrow keys, to get a feel for this technique.

Tip:
To move the text cursor left or right within node text, hold down the CTRL
key while pressing the arrow keys. Toggling the Navigation tool bar button
will reverse this behavior (i.e., using the arrow keys alone will move within
node text, while using the arrow keys with the CTRL key will move the node
selection). See Appendix B for details.

Now, use the actions you have learned to complete the tree structure.

c Select the top branch of the decision node, and type in its
name, Risky investment.

c Add three branches to Risky investment, and name them


Large increase, Small increase, and Large
decrease.

Chapter 2: A Decision Tree Tutorial 23


c Select the bottom branch of the decision node, and name it CD
paying 5%. The tree should now look like this:

Now that all necessary branches have been added, it is a good time to
save your work.

Models you create in TreeAge Pro are documents. You save, open, and
close trees and other documents in TreeAge Pro the same way you do in
other programs — using the File menu commands.

® To save a TreeAge Pro document:

c Choose File > Save…, or click the icon on the tool bar.
c In the Save As dialog, select or create an appropriate direc-
tory, type Stock Tree for the file name, and press ENTER or
click Save.

You should save your work periodically. Rather than saving your tree
files into the TreeAge Pro directory, it is a good idea to create a subdi-
rectory for tree files in an existing documents or projects directory on
your computer or a network shared drive. This is particularly important
if you do not perform regular backups of your computer’s entire hard
drive, but only of directories where documents are usually stored.

Entering payoff values


Entering payoff values Note that each branch you create ends, by default, in a chance node. If a
node represents a path endpoint, you must change it from a chance node
to a terminal node in order to assign a payoff value.

® To change an endpoint to a terminal node:

c Select a node with no branches — in this case, Large increase.


c Choose Options > Change Node Type…, or click on the
Change Node Type tool bar button.

24 Part I: Getting Started with TreeAge Pro 2004


c In the Change Node Type dialog, click on Terminal, and press
ENTER or click OK.

Tip:
The keyboard can be used to select options in dialogs. The hotkey for a
particular option is indicated by underlining that letter in the option’s label.
For example, pressing the ALT + t keys while the Change Node Type dialog
is displayed will select the Terminal option.

After changing Large increase to a terminal node, TreeAge Pro auto-


matically opens an Enter Payoff window for the node.

Use the Enter Payoff window to assign the numeric payoff for the Large
increase terminal node.

® To assign a payoff:

c In the Enter Payoff window for Large increase, type 500 for
Payoff 1, and press ENTER or click OK.

The numeric payoff 500 should be displayed to the right of the new ter-
minal node.

Chapter 2: A Decision Tree Tutorial 25


c Follow the same steps for the nodes Small increase, Large
decrease, and CD paying 5% — change the node type to termi-
nal and then enter the payoff (100, -600, and 50, respectively).

Your investment decision tree should now look like this:

If you find that you have made a mistake in entering payoffs, you can
open the Enter Payoff window again.

® To change an existing payoff:

s Select a terminal node and choose Values > Change Payoff, or


double-click on the terminal node symbol.

Notes on payoffs:
• The investment decision tree, and most other examples in this manual,
require only Payoff 1. However, each tree can use up to nine different
payoffs, or attributes; see Chapter 7 for details. See the Healthcare module
documentation for details on setting up cost-effectiveness trees.
• Chapter 11 and Appendix C describe how to customize the appearance
of payoffs and other visual elements of trees in TreeAge Pro.
• The tutorial in Chapter 19 will show you how to use formulas in assigning
complex payoffs.

Entering probabilities
Entering probabilities Now, the probabilities must be entered for the three possible outcomes
of Risky investment.

To enter a probability for a chance node’s branch, click below the


branch line. Or, if the branch is already selected, pressing TAB will
switch the text cursor from above the branch line to below the line, and
vice versa.

® To enter probabilities:

c Select the Large increase terminal node.

26 Part I: Getting Started with TreeAge Pro 2004


c Press TAB to move into the probability editor.
c Type 0.3, and then press TAB to save the probability.
c Follow the same procedure to enter a probability of 0.4 for
Small increase, and 0.3 for Large decrease.

Note on regional (European) numeric settings!


If your computer is set up to use commas (“,”) to represent decimals, rather
than periods (“.”), you should enter numbers in TreeAge Pro in this fashion,
just as you would in a spreadsheet or calculator. TreeAge Pro also has pref-
erence settings that enable a tree to override a computer’s regional settings
or reverse the usage of decimals; see Chapter 12 for details.

Setting calculation preferences


Setting calculation The investment example’s tree structure is complete and all values
preferences required for calculation have been entered. Before you evaluate the tree,
however, a few basic preferences should be specified.

Most importantly, TreeAge Pro needs to know how to select an optimal


path at decision nodes. For the investment tree, a strategy that maxi-
mizes your income is preferred. You can also specify the appropriate
numeric formatting to use when displaying calculated values (number of
decimal places, currency symbols, and abbreviations).

® To set the calculation method and numeric formatting:

c Choose Edit > Preferences…, or click the tool bar button.


c The Calculation Method settings should be Simple, using
payoff 1, with the optimal path set to High, for maximization.

Chapter 2: A Decision Tree Tutorial 27


c Confirm that the example value shown next to the Numeric
Format… button uses appropriate formatting. Click the button
to change these preferences.

c Press ENTER or click OK to apply any changes, and save the tree
again now, by choosing File > Save.

Changes to these preferences will affect this tree only. Each tree can
have its own set of preferences. See Chapter 5 and Appendix C for more
details on numeric formatting and other tree preferences.

Calculating the tree


Calculating the tree Now the tree should be ready for analysis. Start by simply rolling back
the tree, which will perform the expected value calculations described in
Chapter 1.

® To roll back the tree:

c Choose Analysis > Roll Back.


The rolled-back tree should look essentially like this:

If TreeAge Pro reports an error message, read it to find out what needs
to be fixed. Possible problems include endpoints that are not terminal
nodes, and missing probability or payoff values.

If roll back works, but reports different results than those shown above,
you may need to fix a probability or payoff that was entered incorrectly.
Or, perhaps you have specified different numeric formatting.

Changes cannot be made to structure or values while Roll Back is on


(look for a check mark next to the Analysis > Roll Back menu item).

® To turn off roll back display:

c Choosing Analysis > Roll Back again will turn off roll back,
and allow you to make changes to your tree.

28 Part I: Getting Started with TreeAge Pro 2004


What’s next?
What's next? This completes the basic decision tree tutorial. You are now ready to use
TreeAge Pro to build your own decision trees.

The tutorial in the next chapter shows how to build the same investment
model, but starting from an influence diagram.

Some questions you may have at this point:

• How can I build a tree to calculate cost-effectiveness?


The cost-effectiveness form of multi-attribute calculations is
a feature of the TreeAge Pro Healthcare module. For a tuto-
rial on building and analyzing cost-effectiveness models,
refer to the Healthcare module documentation.

• How can I include my model in a presentation? See


Chapter 4, Printing and Presenting Trees and Influence Dia-
grams.

• How can I do sensitivity analysis? See Chapter 13, Vari-


ables and Sensitivity Analysis.

• How can I generate a risk profile histogram? See Chap-


ter 5, Analyzing Decision Trees (section on probability dis-
tributions).

• What if I have very complex cost formulas? See Chap-


ter 19, Building Complex Formulas Using Variables, or
Chapter 20, Linking with Excel and Other Applications.

• How can I assign a utility function? See Chapter 24, Util-


ity Functions and Risk Preference.

You might take some time now to review the topics in these chapters,
especially those in Part II, “Working with Decision Trees.” As you work
with the software and have questions about functionality, bear in mind
that the table of contents at the front of the manual and the index at the
rear were designed to simplify finding answers.

Chapter 2: A Decision Tree Tutorial 29


30 Part I: Getting Started with TreeAge Pro 2004
CHAPTER 3: AN INFLUENCE DIAGRAM TUTORIAL

CHAPTER 3

AN INFLUENCE DIAGRAM TUTORIAL

The tutorial in this chapter is designed to help new users of TreeAge


Pro become familiar with the basic steps of using the software to build
an influence diagram. Chapters 26 and 27 cover intermediate and
advanced influence diagram topics.

Users of the Excel module should refer to Chapter 3 of the Excel


module manual for special instructions on automatically converting a
spreadsheet into a deterministic influence diagram.

If you plan to use TreeAge Pro to build only decision trees, you can
proceed to Chapter 4.

In this chapter:

• Constructing an influence diagram ................................................ 32

• Entering hidden information ........................................................ 37

• Calculating the model................................................................. 43

• What’s next .............................................................................. 44

Chapter 3: An Influence Diagram Tutorial 31


Constructing an influence diagram
Constructing an influence The tutorial in this chapter explains in detail the software commands
diagram needed to build an influence diagram model of the investment decision
described in Chapter 1. If you have questions while working through the
tutorial, you may find it helpful to refer to the original explanation of the
problem, on pg. 11, and the guidelines for building influence diagrams,
on pp. 15–17.

Tutorial Notes:
• A word in boldface followed by the > symbol is used to indicate a menu
selection. For example, Diagram > Change Node Type... refers to the
Diagram menu's Change Node Type... command.
• Words to be typed are shown in Courier typeface (e.g., "Node X").
• Some procedures covered in this chapter are not required steps for build-
ing the investment influence diagram. Software instructions starting with
the c character are required tutorial steps; other instructions start with
the s character.

The influence diagram window


If you completed the tutorial in Chapter 2 on building a decision tree,
the Stock Tree window may still be open and active. The tree document
does not need to be open while you work on the influence diagram tuto-
rial.

® To close a file:

s Choose File > Close.

s If you made any changes to the tree which you have not saved,
TreeAge Pro will prompt you to do so.

Now, to get started, you will need a new influence diagram document.

® To create a new influence diagram:

c Choose File > New.


c Click on Influence Diagram in the list of file types, and press
ENTER or click OK.

32 Part I: Getting Started with TreeAge Pro 2004


Creating and selecting nodes
Unlike a new tree, which starts with a root node, a new influence dia-
gram window is completely blank. The first step in building the dia-
gram is to add the required nodes. As in the influence diagram primer in
Chapter 1, let’s start by showing the final objective — profit.

® To add a node to an influence diagram:

c Click on the tool bar button that represents the kind of node
you want — in this case, the red diamond, for a value node.

c Click somewhere in the influence diagram to place the node.


You will see a new, selected value node. TreeAge Pro indicates that the
node is selected by showing it in thick outline. Now, see what the node
looks like when not selected.

® To deselect a node using the mouse:

s Click in the influence diagram window anywhere away from


the node.

You can tell the node is no longer selected because its outline is now
thin. Now, reselect the node so that you can enter a text label.

® To select a node for text editing:

s Click in the white space inside the node. (When positioned cor-
rectly, the mouse pointer should change to a text cursor.)

When a node is selected in this fashion, a blinking text cursor and text
box will appear inside the node.

Entering node text


You can enter a word or brief phrase in the text box to describe this ele-
ment of the problem — in this case, the investment objective.

® To enter a name or brief description for a node:

c Click inside the value node to select it for text editing.


c Type Profit in the text area.
c When you are done, click outside the node to deselect it.

Chapter 3: An Influence Diagram Tutorial 33


Adding arcs
Following the same steps as in Chapter 1, now add a node for the first
event that influences return on investment — the decision.

c Create a decision node (blue square).


c For its label, enter How should I invest $1000?,
pressing ENTER after the word “I” to insert a carriage return.

In the influence diagram primer in Chapter 1, arcs were introduced as a


means of displaying the relationships between actions, variables, events,
and objectives. The direction of influence between the two nodes added
so far is from the investment decision to Profit, so an arc should be cre-
ated that points to the value node.

There are three ways to create an arc between two nodes using the
mouse. One easy method uses the arc button on the tool bar.

® To draw an arc:

c Click on the arc button on the tool bar. Now, when you move
the mouse pointer over a node, TreeAge Pro will highlight that
node.

c Using the mouse, click and drag from the influencing node to
the conditioned node — in this case, click on How should I
invest… and drag to Profit.

Tip:
Another way to create an arc is
to right-click on the influencing
node, choose Draw New Arc from
c Release the mouse button to create the arc.
the quick menu, and then click on You should now have an arc pointing from the decision node to the
the conditioned node to complete
the arc. Or, CONTROL-click and drag value node. The square “handle” on the arc shows that it is selected. If
from the influencing node to the your have made any mistakes, skip to the section on editing nodes and
conditioned node. arcs.

34 Part I: Getting Started with TreeAge Pro 2004


Now, add the other required node — a chance node representing the risk
inherent in choosing the stock — and its influence arc.

c Create a chance node (green circle), and for the node name
enter Market activity.

c Create an arc from Market Activity to Profit.


Here is essentially how your three-node influence diagram should look
now:

Now that all nodes and arcs have been added, take a moment to save
your document. You save, open, and close influence diagrams and other
documents in TreeAge Pro the same way you do in other programs
— using the File menu commands.

® To save a TreeAge Pro document:

c Choose File > Save, or click the icon on the tool bar.
c In the Save As dialog, select or create an appropriate directory,
type Investment Decision for the file name, and press
ENTER or click Save.

TreeAge Pro does not perform auto-saves, so save your work periodi-
cally.

Editing existing nodes


If you place the wrong type of node, instead of deleting the node and
creating a new one, you can change its type (e.g., from decision to
chance).

® To change a node’s type:

s Select the node by clicking anywhere on or in the node.

s Choose Diagram > Change Node Type….

s Click on the correct node type and press ENTER or click OK.

Chapter 3: An Influence Diagram Tutorial 35


There are no strict rules about placement of influence diagram nodes. If
nodes overlap, however, you can rearrange them at any time to achieve
better spacing.

® To move a node:

s Click on (or just inside) the node’s outline, and drag it to a new
location.

If you add an unnecessary node by accident, you can remove it.

® To clear (delete) a node:

s Select the node by clicking once on its outline, and choose


Edit > Clear.

Selecting and editing existing arcs


To change or remove an arc, you must be able to select it.

® To select an existing arc:

s Click on, or very close to, the arc — either the line or its arrow.
A selected arc will display a square handle.

Instead of moving a node out of the way of an arc, it is possible to make


the arc curve around the node.

® To curve an arc:

s Select the arc.

s Click and drag the arc’s square handle to create the curve.
Release the mouse button when you have the desired curve.

If you draw an arc between the wrong two nodes, you can remove it.

® To clear (delete) an arc:

s Select the arc and choose Edit > Clear Arc. Or, right-click on
the arc and choose Clear Arc from the quick menu.

If you draw an arc in the wrong direction, you also have the option of
flipping the arc (instead of deleting it).

® To flip an arc:

s Select the arc and choose Diagram > Flip Arc.

36 Part I: Getting Started with TreeAge Pro 2004


Entering hidden information
Entering hidden TreeAge Pro extends the capabilities of the standard influence diagram
information by adding information inside nodes and arcs — including lists of event
outcomes, probabilities and payoff values. This hidden information is
used to convert the influence diagram into a fully-configured tree, ready
for analysis. If you do not plan to convert the influence diagram to a tree
for analysis, then you may skip this section

Assigning alternatives and outcomes


Before you convert an influence diagram into a tree, all decision nodes
must have a list of alternatives, and all chance nodes must have a list
of all possible outcomes. These lists correspond to the branches of the
decision or chance node in the tree.

® To enter a list of alternatives at a decision node:

c Double-click on the outline of the node (or select it and choose


Diagram > Alternatives, or right-click on the node).

c In the Edit Node Alternatives dialog, click the Add… button.


c In the Add Alternatives dialog, enter the name of the first alter-
native, Risky investment, and click More.

c Enter the name for the second and last alternative, CD


paying 5%, and then press ENTER or click OK to close the
Add dialog.

c Review the list of alternatives in the Edit Node Alternatives


dialog. If it looks correct, click OK to return to the influence
diagram window.

Chapter 3: An Influence Diagram Tutorial 37


Now enter the list of possible outcomes at the Market activity node.

® To enter a list of outcomes at a chance node:

c Double-click on the outline of the node, or select it and choose


Diagram > Outcomes.

c In the Edit Node Outcomes dialog, click the Add… button.


c In the Add Alternatives dialog, enter the name the first out-
come, Large increase, and click More. Repeat for
the second and third outcomes, Small increase and
Large decrease. Press ENTER or click OK to return to the
list of outcomes.

c If the list looks correct, click OK.


If there is a problem with an item in the list of alternatives or outcomes,
use the buttons in the dialog to make changes.

® To rename an alternative or outcome:

s Select the item to rename in the list, retype the name in the
Name text edit box, and click Rename.

® To delete an alternative or outcome:

s Select the item to remove from the list, and click the Delete
button.

® To reorder alternatives or outcomes:

s Select the item to move up or down in the list order, and click
the Move Up or Move Down button.

38 Part I: Getting Started with TreeAge Pro 2004


Entering probabilities
One you have assigned outcomes to a chance node, you can enter their
probabilities.

® To enter probabilities at a chance node:

c Select Market activity and choose Diagram > Probabilities.


Tip:
Instead of using the regular menus to edit nodes and arcs, try right-clicking
on the node or arc and using the pop-up quick menu.

Probabilities and other values associated with influence diagram nodes


are entered using a “mini-tree” view. The mini-tree is created based on
the lists of outcomes and alternatives found at the selected node and any
nodes that influence it. The Market activity node has no conditioning
events, so only its own outcomes are shown in the mini-tree.

Each node in the mini-tree that requires your attention will have a red
diamond symbol. The active node will have its red diamond filled in
and its name in boldface.

c Enter the probabilities for Large increase and Small increase as


0.3 and 0.4, respectively. Click in the mini-tree, or use the
Next button or the down arrow key, to move to the next node.

c TreeAge Pro automatically fills in the last branch with its


remainder symbol, the hashmark (“#”). Either accept this, or
type in a 0.3, if you prefer to see a numeric value.

Chapter 3: An Influence Diagram Tutorial 39


c Press ENTER or click OK to return to the influence diagram.

Entering values
Since there are only a small number of possible scenarios in the invest-
ment example, the easiest approach for this model is to enter the
numeric value (i.e., profit or loss) for each possible scenario, rather than
creating a formula to calculate payoffs. Although the manual refers to
these values generically as payoffs, they can be costs or any other attri-
bute.

® To enter/edit a list of payoffs at a value node:

c Double-click on the Profit node, and then click the Values…


button. Or, select the Profit node and choose Diagram >
Values.

As with assigning probabilities, a mini-tree is used for assigning pay-


offs. The mini-tree is created based on the lists of outcomes and alter-
natives found at the chance and decision nodes that influence the value
node.

Note that the conditioning nodes/events How should I invest… and


Market activity both appear in the mini-tree, based on the arcs you have
drawn. The model does not yet reflect the fact that market fluctuations
are irrelevant if you decide to invest in a CD.

40 Part I: Getting Started with TreeAge Pro 2004


Entering the same $50 payoff value at each CD paying 5% endpoint
would allow us to work around the problem. A better solution, however,
is to get rid of the unnecessary branches. This asymmetry can be created
by adding a special arc between the decision node and the chance node.

Creating asymmetry: arc information


Start by creating an arc from the decision node, which causes the asym-
metry, to the chance node.

c Close the mini-tree and Edit Node Variables dialogs.


c Click on the arc button on the tool bar. Click and drag from the
decision node to the Market activity node. Release the mouse
button to create the arc.

An arc, like a node, can contain hidden information — in particular, an


arc between any two chance and/or decision nodes.

® To create asymmetry using an arc:

c Double-click on the arc you just created, from the decision


node to the chance node. Or, right-click on the arc and choose
Arc Info….

The Arc Data dialog shows numerous options. First, turn your attention
to the lower section, labeled Influence.

Each alternative in the conditioning node has a separate group of influ-


ence settings. Since the conditioned node is a chance node, settings
include probabilistic and/or value influence (the check boxes) and struc-
tural influence (the pop-up menu, currently reading Symm).

c Uncheck all four boxes, to indicate that your decision has no


value or probabilistic influence on market activity.

c For CD paying 5%, change the symmetry menu to Skip.

Chapter 3: An Influence Diagram Tutorial 41


c Click OK to close the Arc Info dialog.
This arc now indicates to TreeAge Pro that, in the CD paying 5% path,
the Market Activity event should be skipped for structural and analytical
purposes. Because there is no probabilistic or value influence through
this arc, TreeAge Pro uses a dotted gray line for the arc.

Entering values, revisited


Verify that this change has had the desired effect on the enumeration of
endpoints requiring payoffs at the Profit node.

c Double-click on the Profit node, and click Values…. Or, select


Profit and choose Diagram > Values.

The mini-tree should now terminate the CD paying 5% path. If not, go


back and check the arc information for the influence from the decision
node to the chance node.

c Enter 500 for the payoff of Risky investment followed


by Large increase, 100 for Risky investment and Small
increase, -600 for Risky investment and Large decrease, and
50 for CD paying 5%.

c Click OK twice to return to the influence diagram.

42 Part I: Getting Started with TreeAge Pro 2004


Before going on, take a moment to save the changes you have made to
the influence diagram.

Calculating the model


Calculating the model In TreeAge Pro, all analyses are performed on trees. To perform calcu-
lations on the model you have constructed, you must convert it into a
tree. This will not affect your influence diagram, but instead will create
a new tree document.

® To convert an influence diagram to a tree:

c Choose File > Convert to Tree, or press the Convert tool bar
button.

If no serious problems were found in your influence diagram, you will


see the converted tree.

To see if the tree is complete, try calculating the model using roll back,
described in Chapter 1.

® To roll back the tree:

c Choose Analysis > Roll Back.

Notes on conversion
• Your converted tree will probably have some extra
information initially — these are node variables. See
Chapter 26 (and Chapter 13).
• Incomplete influence diagrams may still convert without
error. For example, you may skip entering values and
probabilities in the influence diagram to see the full tree
structure.

Chapter 3: An Influence Diagram Tutorial 43


• Failure to draw arcs between nodes where influences
should exist, or the introduction of unnecessary arcs, can
cause conversion problems.
• You are required to assign alternatives and outcomes to
decision and chance nodes before conversion.

IMPORTANT!
There is no "hot-link" between a converted tree and the influence diagram used to create it. Changes made to
the tree document will not be included in the influence diagram. To keep your influence diagram current, make
structural and value changes in the influence diagram and convert it into a new tree when you need to do
calculations.

What’s next?
What's next? This completes the basic influence diagram tutorial. You are now ready
to use TreeAge Pro to build your own models.

Some questions you may have at this point:

• How can I include my model in a presentation? See


Chapter 4, Printing and Presenting Trees and Influence Dia-
grams.

• What if I have very complex cost formulas? See Chap-


ters 26 and 27, which cover a wide variety of influence dia-
gram topics.

You might take some time now to review the topics in these chapters.
As you work with the software and have questions about functionality,
use this manual’s table of contents or index, as well as TreeAge Pro’s
Help menu, to find answers.

To learn more about the use of influence diagrams, refer to one of the
general decision analysis texts listed at the end of Chapter 1 (for exam-
ple, Decision Making and Forecasting or Making Hard Decisions).

44 Part I: Getting Started with TreeAge Pro 2004


CHAPTER 4: PRINTING AND PRESENTING TREES AND INFLUENCE DIAGRAMS

CHAPTER 4

PRINTING AND PRESENTING


TREES AND INFLUENCE DIAGRAMS

This chapter provides basic instructions on how to customize printouts


of your TreeAge Pro models, and how to import pictures of models into
document and presentation programs like Microsoft® PowerPoint™,
Excel™, or Word™.

In this chapter:

• Printing .................................................................................... 46

• Exporting graphics...................................................................... 48

• Roll back files............................................................................ 52

Chapter 4: Printing and Exporting Graphics 45


Printing
Printing Printing documents in TreeAge Pro is similar to printing documents
from any other Windows application.

® To print an active document without customization:

s Choose File > Print..., and press ENTER or click OK.

A small model, like the Stock Tree or influence diagram, easily prints on
a single page. A large tree may not initially print on a single page, but
you may be able to get it to fit by shrinking it, or by changing the page
orientation to landscape. As with other Windows applications, before
printing you can select a different printer, or change the selected print-
er’s settings by selecting File > Page Setup….

Adjusting printouts using print preview


In the Print Preview dialog, you can see how your printed document
will appear (although fonts may be distorted). You can also adjust the
size and location of the model on the printout.

® To preview the print layout of a document:

s Choose File > Print Preview....

The picture will be aligned to the upper left corner of the preview area.
A half-filled red square should be visible at the top left of an invis-
ible rectangle surrounding the picture, and a similar black square at the
bottom right. These squares enable you to move and resize the picture
within the printout.

® To move the picture within the printed page:

s Click and drag the red square in the upper left corner of the
picture.

46 Part I: Getting Started with TreeAge Pro 2004


® To resize the picture within the printed page:

s Click and drag the black square. The growing (or shrinking)
picture-rectangle retains its proportions, to prevent distortion
of the picture.

Tip:
The square print preview handles may not be visible if the file's printing
preferences specify that the image should be automatically centered on a
single page. In Appendix C, see “Printing preferences” for further instructions
on turning off this setting.

Headers and footers (trees only)


Headers and footers can be printed with a tree (not influence diagrams
or graphs). Headers and footers can be set up in the Print Preview
dialog.

® To add headers or footers to a tree:

s Click on the Headers... button in the Print Preview dialog.

s Enter the desired text in the Header field and/or the Footer
field. Add special text (page number, date, file name, etc.)
using the Insert pop-up menu.

s Change the font and alignment of the text by clicking the


appropriate buttons.

s Press ENTER or click OK to return to the Print Preview dialog.

Headers and footers that you setup will appear in the print preview.

Headers and footers can also be set up using the Preferences dialog, as
described in Appendix C.

Chapter 4: Printing and Exporting Graphics 47


Printing preferences
Several additional features for customizing printing are available in the
Printing page of the Preferences dialog.

® To change printing preferences:

s Close the Print or Print Preview dialog, if open.

s Choose Edit > Preferences (or press F11) and select the Print-
ing category.

Details about printing preferences can be found in Appendix C, “Prefer-


ences.”

s Click OK to leave the Preferences dialog.

Exporting pictures
Copying and exporting To include a picture of a tree or other TreeAge Pro document in another
pictures to other programs program, such as Microsoft® Word™ or PowerPoint™, you can either
export a picture to a graphics file, or copy it over the clipboard. Note the
following differences between the two methods:

• To get a picture of only part of tree, use the copy method.


• Copying a picture of a tree or subtree over the clipboard will
not capture arrows or unbound note boxes.
• Copying a picture of a tree or subtree over the clipboard will
show all nodes as selected, using solid node coloring.
• A picture copied to the clipboard will be pasted into the target
document. A picture exported to a graphics file will be inserted
(or placed) into the target.

48 Part I: Getting Started with TreeAge Pro 2004


Copying a picture using the clipboard
In an influence diagram or graph window, it is not necessary to select
anything before copying the picture.

® To copy a picture of an influence diagram or graph to another


program via the clipboard:

s Choose Edit > Copy Special…, or > Copy as Bitmap/Metafile.


If Copy Special... is used, select the Copy as Bitmap/Metafile
in the ensuing dialog.

s Switch to the target document in the other program, and choose


Edit > Paste, or > Paste Special.

To copy a picture of a tree to the clipboard, you must first select it.

® To copy an entire tree to the clipboard:

s Hold down the CONTROL key and click on the root node. Or,
select the node and choose Options > Select Subtree.

s Choose Edit > Copy Special…, or > Copy as Bitmap/Metafile.

It is also possible to copy a picture of only part of a tree.

® To copy a partial “subtree” to the clipboard:

s Hold down the CONTROL key and click on an internal node to


select its subtree (or, choose Options > Select Subtree).

s Choose Edit > Copy Special… or > Copy as Bitmap/Metafile.

Subtrees — parts of trees — are explained in more detail in Chapters 8


and 9.

Consult the target document program’s documentation for more infor-


mation on pasting and then manipulating copied pictures. More infor-
mation on choosing between available graphic formats is provided later
in this chapter.

Chapter 4: Printing and Exporting Graphics 49


Exporting a picture to a file
Unlike copying a picture over the clipboard, exporting a graphics file
includes all of a model’s visual elements, including note boxes and
arrows.

® To export a picture of the active document (tree, influence dia-


gram, or graph) to a grahics file:

s Choose File > Export….

s In the Export Format dialog, pick the desired format for the
saved graphics file: metafile, JPEG, or bitmap.

s If you specify the JPEG format, you will need to specify the
quality of the image — if file size is not an issue, specify the
highest quality setting, 100.

s Click OK to display the standard “Save As” dialog. Note where


you save the file, as you will need to find it in order to import it
or open it in another program.

To add saved graphic files to a Microsoft® Office™ document, use the


appropriate program’s Insert menu — usually Insert > Picture > From
File. If you are using other presentation software, consult that program’s
documentation for instructions on inserting files.

Graphics design applications can be used to open and edit exported


graphics, in order to edit the picture and save it in other formats. For
additional information about working with the different graphic file for-
mats in other programs, see the next section.

50 Part I: Getting Started with TreeAge Pro 2004


Working with metafile and bitmap exported graphics
The graphics export formats supported by TreeAge Pro are described
here.

Metafile (.wmf files) – A Windows metafile is a lot like a doc-


ument. It stores text, shapes, and their exact layout, which are
then reproduced on-screen in your word processing or presen-
tation program, and then on your printer. A metafile is a much
smaller file than a bitmap, but will always print at the highest
resolution available — just like other documents. Metafiles
inserted into Microsoft® Office™ documents, or opened in a
graphics programs like Paint Shop Pro™ (Jasc Software), can
be edited. The text, colors, and other elements of the picture
can be modified relatively easily, using drawing and text tools.
The image can also shrink or stretch without losing quality.

JPEG (.jpg file) – A JPEG is a compressed bitmap. By speci-


fying a high quality setting (higher number) when you export
the file, you get the same quality as a standard bitmap, but a
much smaller file. Exported bitmaps and JPEGs do not always
resize smoothly, their content cannot be modified, and they do
not print at high resolution. JPEGs are used for on-screen pre-
sentation, for example, in web pages.
Bitmap (.bmp file) – In some cases, however, a bitmap may
be preferred. For example, if you are designing PowerPoint
presentations for projection on screen, a bitmap will display
more clearly than a metafile, which is optimized for high reso-
lution printing. In addition, if a PowerPoint slide uses a dark
background, a tree will show up better if exported as a bitmap,

Chapter 4: Printing and Exporting Graphics 51


because bitmaps utilize a white background (versus the trans-
parent background used by a metafile).

Using a screenshot capture program


In cases where neither a bitmap (.BMP) nor a metafile (.WMF) is the
appropriate format for an exported picture of a TreeAge Pro model or
graph, a third-party screenshot capture program may be used.

Using TreeAge Pro Interactive


TreeAge Pro Interactive is a programming interface to TreeAge Pro
decision trees. The Interactive version can analyze models built in
TreeAge Pro, and also has capabilities not in TreeAge Pro, including the
ability to export PNG graphic files. See Chapter 25 for details.

TREEAGE PRO roll back (.TRB) files


TreeAge Pro roll back A roll back file is an uneditable copy of your rolled-back tree. You may
(.trb) files use this type of file to distribute a viewable representation of your calcu-
lated tree to other TreeAge Pro users. The file type is proprietary; .TRB
files can only be opened using TreeAge Pro.

When a .TRB file is opened, the tree is already rolled back. The values
and structure of the tree are fixed, but display settings can be changed.

® To create a roll back (.TRB) file:

s Roll back your tree.

s While the tree is still rolled back, choose File > Export.

s In the Export Format dialog, select the button named Rollback


Format (.TRB).

s Save your .TRB file using the standard Save As dialog box
which appears.

Tip:
See Chapter 25 for information on using TreeAge Pro Interactive or TreeAge
Pro Run-time to distribute TreeAge Pro decision trees, which allows non-
TreeAge users to access your model, change selected values, and perform
selected analyses.

52 Part I: Getting Started with TreeAge Pro 2004


Part
Part IIII
WORKING WITH DECISION TREES

The chapters in Part II provide provide information about commonly-used tree-building


and analysis features in TreeAge Pro.

In this part:

• Chapter 5, "Analyzing the Tree"

• Chapter 6, "Graph Windows"

• Chapter 7, "Tree Calculation Methods and Preferences"

• Chapter 8, "Selecting Subtrees and Multiple Nodes"

• Chapter 9, "Making Changes to Tree Structure"

• Chapter 10, "Annotating the Tree"

• Chapter 11, "Customizing the Tree Display"

• Chapter 12, "More Tree-Building Tools"

PART II: WORKING WITH DECISION TREES


CHAPTER 5
CHAPTER 5: ANALYZING DECISION TREES

ANALYZING DECISION TREES


This chapter describes in detail the variety of expected value analyses
available in TreeAge Pro.

Sensitivity analysis and Monte Carlo simulation are covered in Part III
of the manual.

In this chapter:

• Numeric formatting .................................................................... 56

• Expected values......................................................................... 57

• Roll back .................................................................................. 58

• Rankings .................................................................................. 60

• Standard deviation..................................................................... 61

• Probability distributions............................................................... 62

• Expected value of perfect information ........................................... 71

• Miscellaneous analyses............................................................... 75

Chapter 5: Analyzing Decision Trees 55


Numeric Formatting
Numeric formatting TreeAge Pro’s display of calculated values is governed by numeric for-
matting preferences, as described at the end of Chapter 2. Calculations
are always performed at the highest available precision, but results are
displayed using a specified number of decimal places — up to 9 — with
the option to use abbreviations and unit symbols.

Each tree (and graph) has its own set of numeric formatting preferences.

® To view/modify a document’s numeric formatting:

s Choose Edit > Numeric Formatting, or press the F10 key. (Or,
click the Numeric Format… button in the Calculation Method
preferences category.)

In a tree, the numeric formatting dialog shows the label “For Payoff X,”
circled in the above picture, indicating the currently active payoff (#1–9,
as specified in the Calculation Method preferences).

Under Payoffs & Expected Values, you can specify:

• Decimal places: The number of digits (0-9) after the


decimal point to display for calculated values;
• Use thousands separators: Whether to incorporate
thousands separators into numbers greater than 1000;

56 Part II: Working with Decision Trees


• Show numbers: Whether to show numbers exactly or
abbreviated (K=thousands / M=millions / B=billions);
• Units: Whether to display numbers with a built-in or
custom prefix or suffix.
If you choose “Currency” units, expected values will be reported using
the type of currency set in your operating system’s control panel. If you
select either “Custom prefix” or “Custom suffix,” you can enter units of
your choice in the Tag editor.

Under Probabilities, you can specify the number of decimal places (0-9)
to use when displaying calculated probabilities. (In some reports, very
small values may display using scientific notation.)

Notes on entering numbers


• Independent of numeric formatting preferences, payoffs and other values can be entered
using K/M/B abbreviations and thousands separators (e.g., typing 2K is equivalent to
typing 2,000). Scientific notation can also be used when entering very small or very
large numbers (e.g., typing 1e3 is equivalent to typing 1000).
• If your computer is set up to use commas (“,”) to represent decimals, rather than periods (“.”)
you can enter numbers in TreeAge Pro in this fashion, just as you would in a spreadsheet
or calculator. TreeAge Pro also has features that enable a tree to override a computer’s
regional settings or reverse the usage of decimals; see Chapter 12 for details.
Expected values
Expected values In addition to calculating and displaying expected values for all nodes
in a tree (see Roll back, below), TreeAge Pro can also report a single
expected value for a selected node. This provides a useful method of
verifying the completeness of a single part of an incomplete tree.

® To calculate the expected value of a node:

s Select a node.

s Choose Analysis > Expected Value.

Using the Expected Value command with multiple nodes selected will
report the sum of the nodes’ expected values.

Chapter 5: Analyzing Decision Trees 57


The result is displayed using the tree’s current numeric formatting pref-
erences; see the section on numeric formatting at the beginning of this
chapter for details.

Note:
Chapter 1, “Decision Analysis Primer,” includes a detailed description of the
basic concepts used in calculating expected values in decision trees. Refer
to that chapter, or one of the books listed at the end of Chapter 1, if you are
unfamiliar with, or need to review, the concept of expected value.

Roll back
Roll back As described in Chapter 1, roll back refers to the calculation of expected
values starting at the terminal nodes and continuing back to the root
node. In TreeAge Pro, a variety of information is reported in the tree
when it is rolled back.

® To roll back the tree:

s Select Analysis > Roll Back.

The rolled back Stock Tree, from Chapter 2, is shown below:

Here is a list of the information displayed:

• Decision nodes: A box to the right of the node reports


the name and expected value of the preferred alternative.
TreeAge Pro marks the branches of non-optimal
alternatives using hashes, and colors the optimal branch.
• Chance nodes: A box to the right of the node reports the
expected value. Probabilities are calculated (if necessary)
and displayed beneath the node’s branches.
Definition: A path probability
is the likelihood of reaching a • Terminal nodes: A box to the right of the node reports
particular node, and is equal to the node’s payoff. If the terminal node is in the optimal
the product of all the probabilities
path (i.e., is an outcome of the preferred strategy), its path
between the root node and the
node in question. probability (“P =”) is also shown in the box.

58 Part II: Working with Decision Trees


The rolled back tree can be printed or exported to a graphic file, as
described in Chapter 4. See the next section for information on custom-
izing how the rolled back tree will appear when printed or exported.

Some commands used to analyze or modify the tree are available if the
tree is rolled back, while others require roll back to be turned off.

® To turn off roll back:

s Select Analysis > Roll Back.

Customizing the roll back display


Values calculated for roll back are displayed using the tree’s numeric
formatting settings; see the section on numeric formatting at the begin-
ning of this chapter for details on modifying these preferences.

When roll back is turned on, initially all nodes in the optimal path of the
are selected (highlighted). Clicking on the tree will deselect these nodes.

Occasionally, a roll back box will cover the text of a branch description
or probability. This can be corrected by moving the box.

® To move a roll back box:

s Hold down the CONTROL key, and click and drag the box to a
better location.

Be careful not to move a roll back box too far from its node, or you may
forget which node it belongs to.

Tip:
Chapter 11 covers a number of important tree display preferences related
to roll back. For example, setting up terminal node columns allows you to
use roll back to display (and export) columns of values at terminal nodes
(e.g., expected values, path probabilities, incremental values, and values
of variables defined in the path).

Chapter 5: Analyzing Decision Trees 59


Rankings
Rankings The Rankings analysis, available when a single decision node is
selected, displays a text report listing the alternatives at that node and
their expected values, in rank order.

Try the Rankings analysis on the example tree called Rankings Analysis,
which is a slightly more complex version of the Stock Tree from Chap-
ter 2. A copy of the tree can be found in TreeAge Pro’s Tutorial Example
subdirectory. The Start menu includes a shortcut to this subdirectory.

® To calculate and rank decision alternatives:

s Select the decision node.

s Choose Analysis > Rankings.

A dialog box appears which ranks the options, and specifies their
expected values. In the case of suboptimal options, it also specifies a
marginal (or incremental) value — the amount by which one option is
outperformed by the next best option.

The text report dialog includes a button to copy the displayed text to the
clipboard, in order to import the results into another program. Columns
can be resized for better viewing by clicking and dragging on the divid-
ers between column headings.

60 Part II: Working with Decision Trees


Standard deviation
Standard deviation In addition to comparing strategies based on their expected values,
TreeAge Pro also offers several ways to look at an option’s risk — the
degree of variability in outcomes. The basic, statistical measure of risk
is standard deviation. In TreeAge Pro, a standard deviation can be cal-
culated for a single strategy (or any other chance node), based on the
path probabilities and payoffs of all terminal nodes in its path.

To try the standard deviation calculation, use the exam-


ple decision tree called Standard Deviation (in TreeAge
Pro’s Tutorial Examples subdirectory). In this tree,
despite the fact that the three alternatives look different,
a rankings or roll back analysis is indifferent between
them — all three have the same expected value, 90. In
this case, a choice might be based on minimizing risk as
measured by standard deviation.

® To calculate a standard deviation:

s Select the chance node labeled A.

s Choose Analysis > Standard Deviation.

The calculation used is:

SD(Strategy A) = 0.5 (60 − 90)2 + 0.5 (120 − 90)2 = 30

where 90 is the strategy A’s expected value, or mean. Compare this to


the calculated standard deviations for strategies B and C:

If you were to choose a strategy based on minimizing risk, as measured


by standard deviation, strategy A would be preferred. Note that B and C
are statistically identical, having the same terminal node values and path
probabilities, and thus the same standard deviation:

0.25 ( 40 − 90)2 + 0.25 (80 − 90)2 + 0.5 (120 − 90)2 = 33.166

Chapter 5: Analyzing Decision Trees 61


Probability distribution
Probability distributions The risk associated with alternatives under consideration can be dis-
played graphically, using a probability distribution histogram, or risk
profile. A probability distribution graphs the values (i.e., payoffs) and
path probabilities of all terminal nodes within a strategy.

Open a tree called Oil Drilling Problem, found in TreeAge Pro’s Tuto-
rial Examples subdirectory. This model has some interesting elements,
including multiple decisions nodes. Also note the K and M abbrevia-
tions used for thousands and millions in the tree’s payoffs.

To create your first probability distributions using TreeAge Pro, start by


analyzing a chance node.

® To view a probability distribution histogram:

s Select a chance node – in this case the topmost chance node


labeled Drill for Oil, in the No Soundings section of the tree.

s Choose Analysis > Probability Distribution.

TreeAge Pro displays the analysis results in a histogram, using a graph


window. Graphs are documents; like trees, they can be saved, as well
as exported to a graphic file or printed, as described in Chapter 4. See
Chapter 6 for information on customizing a graph’s text labels, line
markers, axes, and other visual elements.

62 Part II: Working with Decision Trees


Although the histogram displays initially with a separate bar for each
possible payoff, this will not always be the case. The payoff range is
divided into a reasonable number of intervals, initially. The height (i.e.,
probability) of each bar is the sum of the path probabilities of all termi-
nal nodes falling in that interval (no bar = 0%). The height of the bars
will add up to 1.0 (100%).

Clicking once on a histogram bar will display the total probability for
that interval. To get a detailed breakdown of the terminal nodes summa-
rized by the bar, use the Bar Details text report.

® To see a report for all outcomes included in one bar:

s Double-click on a bar in the histogram.

s To copy the report to the clipboard, in order to paste it into a


spreadsheet or other document, click To Clipboard.

s Click OK to return to the graph window.

Every graph window includes a row of buttons at the top. These cor-
respond to commonly-used commands found in the Graph menu. The
probability distribution graph includes three buttons.

• Options: Opens the Graph Options dialog, which has multiple


categories. Options specific to probability distributions are cov-
ered in this chapter; see Chapter 6 for information on the axes
and lines categories.
• Text Report: Enables viewing and exporting of the calculated
values underlying the graph. See Chapter 6 for details.

Chapter 5: Analyzing Decision Trees 63


• Statistics: Displays a dialog showing the mean, standard devi-
ation, and other basic statistics of the distribution.

Downstream decision nodes


As noted above, the Oil Drilling Problem tree includes multiple deci-
sions. To see how the probability distribution analysis is affected by
downstream decision nodes, analyze the leftmost chance node in the
tree, found in the Seismic Soundings subtree (i.e., portion of the tree).
Each of the Soundings node’s branches is a decision node.

s Select the chance node Seismic Soundings.

s Choose Analysis > Probability Distribution.

64 Part II: Working with Decision Trees


If there are decision nodes anywhere to the right of the analyzed node,
as in this analysis, TreeAge Pro calculates expected values, and then
selects an optimal strategy at each downstream, or deferred, decision.
The histogram only includes terminal nodes from the optimal path,
therefore the path probabilities in the histogram will still sum to 1.0. To
see which terminal nodes are in the optimal path, you can roll back the
tree.

Double-clicking on the middle bar will show the three outcomes whose
payoffs fall into that interval, and whose path probabilities add up to the
bar’s height.

Cumulative probability distributions


A probability distribution bar graph can also be displayed in cumula-
tive form. Rather than using discrete bars to indicate the probability of
outcomes within specific payoff intervals, the cumulative graph shows
a continuous series of bars. The top of each interval’s bar indicates the
probability of an outcome within or less than the interval’s top value.

Try the cumulative setting on the probability distribution graph gener-


ated on the previous page, in the Soundings tree.

® To change a probability distribution to cumulative form:

s In the graph window, click on the Options button (or choose


Graph > Options…).

s Under the Options category, check the Cumulative option.


Click OK to return to the Graph window.

Chapter 5: Analyzing Decision Trees 65


TreeAge Pro does not generate a new graph window, but instead
changes the current graph to the cumulative form.

® To revert back to the non-cumulative form of histogram:

s Re-open the Graph Options dialog, and uncheck the Cumula-


tive option.

Comparative probability distributions


Multiple, cumulative probability distributions can be displayed in a
single graph, allowing graphical comparison of options. In a compara-
tive distributions graph, the cumulative distributions are displayed in
outline, instead of using filled bars. This format enables graphical com-
parison of strategies’ based on their risk profile.

Details about the graphical interpretation of comparative probability dis-


tributions is provided later in this chapter, in the section on dominance.

When a single decision node is selected, the Analysis menu displays the
Comparative Distributions command. The comparative distributions
analysis can be tried at the root, decision node in the Oil Drilling Prob-
lem tree.

Tip:
A comparative distribution can also be generated for a subset of strategies,
by selecting multiple nodes prior to performing the analysis. See Chapter 8
for information on selecting multiple nodes.

66 Part II: Working with Decision Trees


® To generate a comparative distribution line graph:

s Select the root, decision node.

s Choose Analysis > Comparative Distributions.

The resulting graph displays the outlines of the cumulative probabil-


ity distributions for the competing options Seismic Soundings and No
Soundings. The outline for a strategy is marked at each corner (where
the cumulative probability “curve” rises) with that strategy’s symbol, as
listed in the legend to the right of the graph.

The expected value of a strategy is indicated in the graph using a verti-


cal, dotted line labeled with the strategy's legend symbol. Here, Seismic
Soundings has the higher expected value by a small margin.

There are two options for displaying the lines in the comparative distri-
bution graph. In addition to the step-wise outlines initially used in the
graph, shown above, lines can also be drawn that directly connect the
top-left corner of each interval’s bar. This alternative format is available
as in the Graph Options dialog.

Chapter 5: Analyzing Decision Trees 67


® To change the comparative distribution’s line format:

s In the graph window, click on the Options button.

s Under the Options category, check the Draw lines directly…


option. Click OK to return to the Graph window.

Using numerous, short intervals helps to differentiate strategies in the


comparative distributions graph. However, the many line markers that
appear in the direct-line version of the graph may be distracting.

Double-clicking on a line marker in the legend opens the Modify Line


Marker dialog, which can be used to turn off line markers and to specify
that colored lines be used instead, as in the example below. Details on
modifying graph lines and line markers are given in Chapter 6.

68 Part II: Working with Decision Trees


Dominance in probability distributions
Comparative probability distributions can be interpreted graphically, by
evaluating conditions of dominance. There are two types of dominance
that can be identified relatively easily: deterministic and stochastic (also
called absolute and extended dominance). Conditions of dominance can
provide more insight into a decision than simple expected value com-
parison.

Deterministic dominance occurs when one option not only has the best
expected value, but its worst possible outcome is better than (or equal
to) the best outcome of any other option. It can be identified as follows:

• if optimization requires maximizing value (e.g., profit), the


worst “bar” of the dominant option (its left-most vertical
line) lies on, or to the right of, the best (right-most) “bar”
of the dominated option(s);
• if optimization requires minimizing value (e.g., costs), the
worst “bar” of the dominant option (its right-most vertical
line) lies on, or to the left of, the best (left-most) “bar” of
the dominated option(s).
Both situations can be visualized in the graph below; note the gap
between A’s highest value, 8, and B’s lowest value, 10. Assuming
expected values are being maximized, B dominates A. If, instead,
expected values are being minimized, then A dominates B.

Chapter 5: Analyzing Decision Trees 69


The kinds of problems in which decision analysis is applied will not
often display deterministic dominance, however. Stochastic domi-
nance is more likely. Conditions of stochastic dominance — also called
extended or probabilistic dominance — are identified as follows:

• if optimization requires maximizing value, the entire


outline describing the stochastically dominant option lies
to the right of the dominated option’s outline — the lines
can touch for part of the graph, but never cross;
• if optimization requires minimizing value, the outline
describing the stochastically dominant option lies on, or to
the left of, the dominated option’s outline.
Just as in looking for deterministic dominance, the critical section of the
graph in the case of stochastic dominance is found between the lowest
value of the dominant option and the highest value of the other. In this
case, instead of a gap on the x-axis, there is overlap. This is illustrated
in the graph below.

Since the lines do not cross, some kind of dominance must exist. X’s
highest value is greater than Y’s lowest value, so it a condition of sto-
chastic, not deterministic, dominance. Assuming that the objective is to
maximize profit, Y is the stochastically dominant option.

If neither form of dominance exists, the strategies’ lines will cross at


one or more points.

70 Part II: Working with Decision Trees


Expected value of perfect information
Expected value of perfect Assume that you could buy information that perfectly predicted the out-
come of a future uncertainty. What would this information be worth to
information (EVPI)
you?

In a decision tree, access to perfect information can be modeled by


moving the chance node representing the uncertainty to the left of the
decision — although the uncertain event still follows the decision in
time, the decision maker is assumed to have knowledge of the event
outcome before making the decision. Keep in mind that perfect informa-
tion does not mean that you can control the event’s outcome, only that
you can predict the outcome.

Ignoring for the moment the cost of the perfect information, the revised
tree cannot have a worse expected value than the original tree, and
may have a better expected value. This difference in expected value is
referred to as the expected value of perfect information (EVPI).

While predictive information is rarely perfect, the usefulness of EVPI


is in calculating a maximum reasonable price for information. If perfect
information in a particular situation has a base value of x, one should
certainly not pay more than x for imperfect information. To see how
imperfect information is dealt with in decision analysis, see Chapter 23,
Bayes’ Revision.

The rest of this section details the use of EVPI in decision trees. For
information on a somewhat more flexible implementation of EVPI using
influence diagrams, see Chapter 27.

How EVPI is calculated


Before trying TreeAge Pro’s shortcut for calculating EVPI in a decision
tree, it is instructive to work through the extra steps required to calculate
EVPI manually.

s Open the file Stock Tree from TreeAge Pro’s Tutorial Exam-
ples subdirectory.

s Also open the example file called Perfect Information from the
Tutorial Examples subdirectory. This version of the investment
problem shows the time reversal of the Market uncertainty and
the decision.

The two trees are shown on the following page.

Chapter 5: Analyzing Decision Trees 71


s Roll back Stock Tree. The tree’s expected value is $50 (equal
to CD paying 5%’s value).

s Roll back the Perfect Information tree. The root node’s


expected value is $205.

s To calculate EVPI, take the difference between the expected


value of the Stock Tree and that of the Perfect Information tree.
The difference is $155. (If you were minimizing costs rather
than maximizing profit, you would subtract the perfect infor-
mation value from the regular expected value.)

In the investment model, the expected value of having perfect informa-


tion about the market activity is $155. This is the most you should be
willing to pay to obtain this information, and it affords some basis for
appraising the value to you of a less than perfect predictor of market
activity.

Now, try TreeAge Pro’s shortcut for calculating EVPI in a tree. It


requires only the original Stock Tree.

® To calculate EVPI automatically:

s Open the Stock Tree.

s Select the Risky investment chance node and choose


Analysis > Expected Value of Perfect Info.

72 Part II: Working with Decision Trees


A dialog reports the value of $155.

It is also possible to calculate EVPI automatically in a decision tree


when the same event appears in more than one strategy, as in example
shown below. The assumption in the model is that each of the two stock
investments under consideration is followed by the same uncertainty
— whether the market will be up or down at the end of the year.

In order to calculate EVPI in this model, both market uncertainty


chance nodes must be selected. To generalize, before choosing Analy-
sis > Expected Value of Information, select all nodes in the tree which
represent the same event. In addition, if multiple chance nodes are ana-
lyzed, they: 1) must be descendants of the same decision node; 2) must
be “siblings”; and 3) must have identical branches using identical prob-
abilities. It does not matter if there are differences in the subtrees further
to the right.

If there is more than one decision prior to the selected chance event,
TreeAge Pro will prompt you to identify the decision for which EVPI
should be calculated.

Chapter 5: Analyzing Decision Trees 73


Avoiding EVPI errors
It is important to understand that it is possible to force invalid EVPI cal-
culations. For example,

s Open the Oil Drilling Problem tree again.

s Select the Drill for Oil node in the No Soundings subtree and
choose Analysis > Expected Value of Perfect Info.

In the resulting dialog boxes, you are presented with the option of
having the analysis performed at the root, soundings decision node or at
the drilling decision.

Performing the calculation at the No Soundings node is similar to the


analysis undertaken above in connection with the EVPI tree. It certainly
makes sense to calculate the value of knowing the state of oil reserves
before deciding whether or not to drill.

However, what if you perform the EVPI calculation at the root decision
node? The value reported is $437,500, or $87,500 higher than at the No
Soundings node. Is this a meaningful EVPI calculation?

The structure of the tree already includes the option of securing


imperfect information in the form of a seismic test — this is the ini-
tial decision. Performing EVPI by placing the chance node represent-
ing the uncertain amount of oil to the left of this decision is meaning-
less. Having already received perfect information, the decision whether
to obtain additional imperfect information regarding the same subject
should have no value or relevance. See Chapter 23, Bayes’ Revision, for
more information on imperfect information

74 Part II: Working with Decision Trees


Miscellaneous analyses
Miscellaneous analyses A number of other important analysis tools in TreeAge Pro, including
sensitivity analysis and Monte Carlo simulation, are covered in Part
III of this manual. The last section of this chapter covers three simple
analysis tools.

Range of possible payoffs


This analysis will tell you the highest and lowest payoffs which may
occur from the selected node in your tree.

® To view the minimum and maximum payoffs in a tree:

s Select a node, and choose Analysis > Payoff Range.

In computing the payoff range, TreeAge Pro assumes the decision


maker will choose an alternative at each decision node in accordance
with optimizing (i.e., maximizing or minimizing) expected value. Ter-
minal nodes not in the optimal path are ignored.

Over/under probabilities
The Over/Under analysis calculates the probability of achieving an out-
come with a payoff over a target value, and the complementary prob-
ability of an outcome under the target.

® To calculate the over/under probabilities:

s Select a node and choose Analysis > Over/Under….

s Enter a target value. Indicate whether payoffs equal to the


target value should be included in the “under” range. Press
ENTER or click OK.

Chapter 5: Analyzing Decision Trees 75


The resulting dialog reports the probabilities of exceeding the target
value and of falling below it.

As with the Payoff Range analysis, the probability analysis includes


only those outcomes which will be reached if the decision maker fol-
lows the optimal path at each decision point.

Verify probabilities
The Verify Probabilities analysis ignores payoffs, and simply calculates
the probabilities at every chance node in the tree, reporting any prob-
lems it finds. This is a useful way to test the integrity of the probability
expressions used in your tree.

® To verify probabilities:

s Choose Analysis > Verify Probabilities.

Errors in probabilities will be reported and problem nodes highlighted,


if appropriate.

Each analysis in TreeAge Pro performs the Verify Probabilities analysis


at appropriate points in the analysis. It is possible to turn off this prob-
ability error checking in a tree, as described in Chapter 22.

76 Part II: Working with Decision Trees


CHAPTER 6
CHAPTER 6: GRAPH WINDOWS

GRAPH WINDOWS
Each graph created in TreeAge Pro can be customized before being
printed or exported. This chapter includes details on customizing the
various types of graphs available in TreeAge Pro, and on using graph
templates to simplify graph customization. It also explains how to
export calculation results from graphs.

Users of the Excel module should refer to the Excel module


documentation for instructions on using the Excel module to chart
analysis results directly in Microsoft® ExcelTM.

In this chapter:

• Customizing graphs.................................................................... 78

• Viewing and exporting graph data................................................ 84

• Details on specific graph types ..................................................... 88

• Using graph templates................................................................ 92

Chapter 6: Graph Windows 77


Customizing individual graphs
Customizing graphs There are several kinds of changes that can be made to a TreeAge Pro
graph, including modifications to: the contents, location, and style of
labels; the axis scales and numeric format; and the size and location of
the entire graph area. To explore these options, a graph is needed.

The methods covered in this section apply to all types of graphs cre-
ated in TreeAge Pro, not just histograms. Options specific to particular
graph types are covered later in this chapter, or in the chapters describ-
ing the underlying analyses (like the section on probability distributions
in Chapter 5).

s Open the Oil Reserves tree, from the TreeAge Pro Tutorial
Examples subdirectory.

s Select the root, chance node.

s Choose Analysis > Probability Distribution.

After TreeAge Pro has completed the calculations, a graph window will
open displaying a histogram, like the one shown below.

Moving and sizing the graph


The graph area — comprised of the axes, graph lines, histogram bars,
plotted points, axis labels, and the graph legend — can be moved or
resized using the handles (small, half-filled squares) at the upper left and
bottom right corners of the graph area.

78 Part II: Working with Decision Trees


® To move or resize an entire graph:

s To resize the graph area, click and drag the black handle at the
bottom right corner.

s To move the graph area (relative to the window’s edges and the
heading), click and drag the red handle at the upper left corner.

Tip:
Use the Display menu’s Zoom commands to change the on-screen size of
all elements of the graph window.

Making changes to labels


When you create a probability distribution graph in TreeAge Pro, three
kinds of labels are created: a heading; an x-axis label; and a y-axis label.
The default heading created for the example graph is “Probability Dis-
tribution at Oil Reserves.” Each graph label can include only a single
line of text; to create multi-line labels like the graph heading, text is
divided among multiple labels.

Chapter 6: Graph Windows 79


It is possible to edit the contents of text labels, as well as change their
fonts.

® To modify a graph label’s text:

s Double-click on the top line of the heading, which currently


reads “Probability Distribution at.”

s In the dialog box, change the description of the analysis to


Risk Profile at. Press ENTER or click OK.

® To modify a graph label’s font:

s A rectangle should appear around the text label you just edited,
to indicate that it is still selected. (Click on the label once to
select it, if necessary.)

s Select Display > Font, or press the Font button on the tool bar.

80 Part II: Working with Decision Trees


s Choose a different font, for example Arial. You might also
want to experiment with changing font size and style.

s Click OK to apply the changes in the graph.

The selected line of the heading will reflect any changes made in the
Font dialog.

Since changing the font has increased the width of the text, in this case,
you can move the label box in order to re-center it over the second head-
ing label and graph area.

® To move a graph label:

s Click and drag the label to a new location.

s After releasing the mouse button, the label is still shown


as selected. To deselect the label, click anywhere in the
whitespace of the graph window.

Some notes on the positioning and alignment of graph text labels:

• heading labels and custom labels (see below) are not


anchored to the graph area;
• axis and legend labels are anchored to the edges of the
graph area (i.e., they move with the graph area);
• although axis and legend labels move with the graph area,
you can change their distance and alignment from the edge
by dragging the label
Unlike text labels, the numbers labeling axis intervals cannot be moved.
However, the font, interval width, and numeric formatting of these
labels can be modified in the Graph Options dialog. Details on the
Graph Options dialog are provided in the section Making changes to
numeric axes, on the next page.

Chapter 6: Graph Windows 81


Creating custom labels
Use custom labels if you want to add notes to the graph, either inside or
outside the graph area. Like other labels, these can only have one line of
text.

® To add a custom label to the graph window:

s In the graph window, choose Graph > New Label.

s Enter the text of your new label, and press ENTER or click OK.

s Change the font of the new label, if necessary, and then drag
the new label to the desired location.

Making changes to numeric axes


The numeric ranges and intervals TreeAge Pro uses in creating the
graph axes can be changed either directly from the graph window or by
using the Options dialog.

® To modify a numeric axis using the Options dialog:

s In the graph window, either click the Options button or choose


Graph > Options….

82 Part II: Working with Decision Trees


s In the Options dialog, select the Axes tab.

s Click on the Range or Format button for X-axis to change the


range, intervals, and numeric formatting applied to the hori-
zontal scale. The Y-axis buttons change the vertical axis.

s Each button opens an appropriate dialog box in which you


can change aspects of the selected axis. The dialogs for the
example probability distribution are shown here, with changed
values (X-axis dialogs first, then Y-axis dialogs).

Chapter 6: Graph Windows 83


Graph axes may start out with a small number of intervals. By changing
the range and/or interval width, the number of intervals can be increased
(as in the example graph’s horizontal axis on the previous page) or
decreased. The maximum allowable number of intervals is 500. In some
graphs (e.g., sensitivity analyses), an axis’ range can only be viewed, not
changed. (Charts created in Excel, using the Excel add-in, offer greater
flexibility.)

In the example, the horizontal axis has many numeric formatting


options. See Chapter 5 for a detailed discussion of these numeric for-
matting options. In probability axes, like the vertical axis in the exam-
ple, only the number of decimal places can be modified. For more infor-
mation on the options available with different graph types, see the last
section of this chapter.

While the Graph Options dialog is open, changes that you make to the
range and format of the axes will be reflected in the graph window in

the background.

s If you are done making changes in the Axes options, press


ENTER or click OK to return to the graph.

It is also possible to modify axes directly from the graph window,


instead of using the Graph Options dialog.

® To modify an axis scale from the graph window:

s Double-click on the numbers appearing to the left of the


graph’s vertical axis, or below the graph’s horizontal axis, to
open the range dialog.

84 Part II: Working with Decision Trees


® To change the numeric formatting of an axis from the graph
window:

s Select an axis by clicking once on the numbers to the left of


the graph’s vertical axis, or below the graph’s horizontal axis.
A selection rectangle should appear around the axis.

s With the axis selected, choose Edit > Numeric Formatting (or
press F10).

Adding a horizontal or vertical line


In some instances, you may wish to add a dotted horizontal or vertical
line as a reference point. In the probability distribution graph, for exam-
ple, a vertical line can be added at $200,000 to represent the expected
value of the node being analyzed.

® To display a dotted line on the graph:

s In the graph window, either click the Options button or choose


Graph > Options… to open the Graph Options dialog.

s In the dialog, select the Lines tab, check the option labeled
Draw dotted vertical line, and type 200k for the x-axis
value.

s Press ENTER or click OK.

TreeAge Pro does not automatically create a label for the line. Do this
manually, using the Graph > New Label… command, as shown above.

Chapter 6: Graph Windows 85


Viewing and exporting graph data
Viewing and exporting In addition to the numeric information displayed on the face of the
graph, every graph window (with one exception) can display its under-
graph data
lying, calculated values. Information can be reported for the entire
analysis, or for selected bars in a histogram. Particularly complex text
reports may include notes to aid in understanding the results. Text
reports can be easily exported to a spreadsheet or other programs.

See the section on specific graph types later in this chapter for other
ways of viewing a graph’s underlying numbers.

Viewing a graph’s text report


With the exception of animated, three-way sensitivity analysis graphs,
all graphs created in TreeAge Pro have an associated text report. Also, a
number of analyses (e.g., Rankings) display text reports automatically,
without showing a graph first.

Tip:
The numeric formatting of a text report cannot be modified directly. To change
the display of numbers in a text report generated from a graph, you must first
change the formatting of the graph axes (see the section Making changes
to graph axes, above). If the text report is generated without a graph, then
you must change the numeric formatting of the tree (see Chapter 5) and
re-run the analysis.

® To view a graph’s text report:

s In a graph window, click on the Text Report button in the tool


bar, or choose Graph > Text Report.

86 Part II: Working with Decision Trees


The top, main section of the text report provides the primary view of
the underlying values from the analysis. This main section is arranged
in a tabular format, with resizable columns.

® To resize text report columns:

s Place the mouse on the right edge of the column header, and
click and drag to the desired width.

Many text reports include an additional Notes section below the main
section. This section may include alternate forms or layouts of the
report in the main section, and/or text explanations of the report. The
Notes section contents are included when you export the text report.

Exporting the text report, as described below, may be the easiest way
to view the entire report on screen. It is possible, however, to resize the
text report dialog so that it fills more of the screen, in order to see more
columns.

® To resize the text report dialog:

s Click and drag the bottom right corner of the text report dialog.

Printing text reports


Since the width of the contents of text report columns vary consider-
able, the best method for printing text reports is to export the informa-
tion to a spreadsheet (or a table in a word processing document), and
then adjust the column widths before printing. See the next section on
exporting.

TreeAge Pro Excel module:


With the optional TreeAge Pro Excel™ module, an additional button in the
text report dialog allows you to automatically export the text report to a
blank Excel worksheet. Consult the documentation for the Excel module
for additional information.

Exporting text reports


You can export the graph data via the text report dialog, or directly from
most graphs.

® To export a graph’s text report via the Text Report dialog:

s Click on the Export pop-up menu, and choose either To Clip-


board (to copy the text) or To File (to save a text file).

Chapter 6: Graph Windows 87


The text report is exported in tab-delimited format, in an arrangement
that is easily pasted or imported by spreadsheet, statistical, and word
processing programs, for printing, graphing, or analysis.

In many graphs, the same text report can be placed on the clipboard
without opening the Text Report first.

® To copy a text report to the clipboard in the graph window:

s Choose Edit > Copy Special….

s In the Copy Special dialog, click on Copy as spreadsheet-


accessible text, and then press ENTER or click OK.

Details on specific graph types


Details on specific TreeAge Pro creates a number of different types of graphs, including bar
graph types graphs (histograms), line graphs, and scatterplots. Many graphs can be
converted into different graph types, and each graph can be customized
in a number of ways. Customizations and other features that are specific
to particular graph types are described below.

Bar graphs
In certain situations, a bar graph will have a non-scalar, non-numeric
horizontal axis (for instance, in a Monte Carlo simulation strategy selec-
tion graph, each strategy gets a bar). More commonly, bar graphs will
display a probability distribution of outcomes or distribution samples.

For details on working with particular kinds of bar graphs, see the sec-
tion on probability distributions in Chapter 5, and the section on simula-
tion strategy selection graphs in Chapter 16.

In bar graphs, if a bar is too high for the range set for the vertical axis,
a small white arrow will be displayed at the top of the bar. This arrow
may be hard to see, however, if a bar does not use a solid color.

88 Part II: Working with Decision Trees


Line graphs
In line graphs (including comparative distributions and one-way sen-
sitivity analyses), each option is represented by a line. For easy identi-
fication, each of these lines uses a different style of line marker.

You can selectively hide lines in the graph.

® To turn the display of selected lines off or on:

s Choose Graph > Show/Hide.

s In the dialog’s list of alternatives, click on a highlighted line to


de-select it (i.e., hide it). To show a currently hidden line, re-
select it in the list.

It is also possible to change the marker used for a particular line (includ-
ing using no marker), or change the color of the line itself.

® To change the marker used at each point of a line:

s Double-click on the appropriate marker symbol in the legend to


the right of the graph area. (Double-clicking on a marker inside
the graph will not work.)

s In the Modify Line Marker dialog, select a marker from the list
displayed in the resulting dialog box. Click OK.

Chapter 6: Graph Windows 89


If you choose “(No Mark)” from the
list, you will then need to change the
line to use a color other than black.

® To change the color of a line:

s In the Modify Line Marker


dialog, click on the Color…
button.

s In the Color dialog, either


select a predefined color or
define a custom color. Click
OK to return to the Modify
Line Marker dialog.

Any line in the graph may be converted into a table for subsequent use
in formulas (instead manually copying the report to a spreadsheet, creat-
ing a table in TreeAge, and then copying a column into the table).

® To create a table from a graph line:

s Choose Graph > Line To Table, and enter the desired table
name and other properties.

See Chapter 17 for more information on creating and using tables in


TreeAge Pro.

In addition to using the text report to view all of the results underlying a
line graph, it is also possible to look at individual points in the graph.

® To display the coordinates of a point on a line:

s Hold down the CONTROL key and place the cursor close to a line.
A gray dot will appear on the closest point along that line, and
the x- and y-axis coordinates of the gray dot will appear in the
status bar.

Scatterplots
The color of an alternative’s points in a scatterplot can be modified. The
process for changing the color is identical to that described above for
line graphs. The Graph Options dialog also includes settings to change
the size of the points used in the plot; see the Help documentation for
information on particular scatterplot formats.

90 Part II: Working with Decision Trees


Region graphs
Region graphs are generated from two- and three-way sensitivity analy-
ses. A strategy graph, generated from a one-way sensitivity analysis, is
also a type of region graph.

® To change the pattern used to fill each region:

s Double-click on the marker as it is displayed in the legend to


the right of the graph. Clicking on a region inside the graph
will not work.

s Select the desired hatch pattern from the list displayed in the
dialog box, or select “no hatch” for a solid region.

s You may optionally change the color used for drawing regions
by pressing the Color button.

s Press ENTER or click OK.

Tornado diagrams
In a tornado diagram, the process for changing the pattern used to fill
each bar is identical to that described above for region graphs.

Similar to a line graph, it is possible to hide selected bars in a tornado


diagram. Select Graph > Show/Hide, and specify which bars should be
displayed. See Chapter 15 for more details on tornado diagrams.

Chapter 6: Graph Windows 91


Using graph templates
Using graph templates Any number of graph templates can be created to store display pref-
erences and other information about the appearance of a TreeAge
Pro graph. One or more templates can then be applied to new graphs,
making it much easier to maintain consistency of fonts, numeric format-
ting, graph area size, and text labels.

What a graph template can contain


Each graph template automatically contains the size of the graph area.
Additional options that may be available include (some may be disabled
if they do not apply to the active graph window):

• Title labels – Graphs usually have two title labels; one


or both can be stored. For example, you may prefer all
probability distribution titles to read “Risk Profile at”
on the first line. If only one title line is included in the
template, the other label will be created dynamically, as
usual.
• Axis labels – The template may include either or both
axes’ text labels.
• Custom labels – The text, positions, and fonts or all labels
added with the New Label command can be included in
the template.
• Fonts – The font settings to apply to standard items in the
graph.
• Numeric formats – The numeric formatting to use with
graph axes.
• Custom lines – Available if the graph options specify a
custom dotted line be displayed in your graph.

Creating and applying graph templates


Graph templates are created based on an active graph window. After
customizing a graph to have the appropriate appearance, then you can
create a template based on the graph.

® To create a graph template:

s Open or create and customize a graph, then choose Graph >


Create Template.

92 Part II: Working with Decision Trees


s Give the template a description. This is for your reference,
when choosing a template to apply to a new graph.

s Check the appropriate boxes in the list to indicate those items


to apply when this template is used on a new graph.

s To change the fonts or title and axis texts that will be included
in the template, click the Set Fonts… or Set Texts… buttons.

s Click OK or press ENTER to apply the changes.

Tip:
When a template is applied to a graph, only the selected settings will be
used. However, even unselected settings and items are stored with the
template. It is possible to edit an existing template later (see below), and
change which options will be applied.

® To apply a template to a graph:

s Create a new graph or open an existing graph, and choose


Graph > Apply Template.

s Select the desired template from the list. Click OK or press


ENTER to update the graph.

Chapter 6: Graph Windows 93


Creating a default graph template
A particular graph size and font settings can be automatically applied to
every new graph you create. Unlike normal graph templates, the default
template will apply only font and graph size information.

® To set a default graph size and font for new graphs:

s In a new or existing template, select the option labeled Use for


new graphs.

If you need to change the default graph size and font settings, create a
new template with the desired attributes and select it as the template to
use for new graphs.

Modifying an existing graph template


It is possible to change which of an existing template’s attributes are
applied to graphs.

® To edit a graph template’s properties:

s Open a graph window (in order to activate the Graph menu).

s Choose Graph > Maintain Templates.

s Select the template from the list, and press the Properties…
button.

You may also indicate that the template’s graph size and fonts should be
the default used for new graphs.

Using graph templates with stored analyses


A graph template can be applied automatically to graphs created from a
stored analysis. See Chapter 18 for a full description of running stored
analyses.

94 Part II: Working with Decision Trees


CHAPTER 7
CHAPTER 7: TREE CALCULATION METHODS AND PREFERENCES

TREE CALCULATION METHODS


AND PREFERENCES

Any single tree may be calculated and evaluated in a variety of ways,


simply by switching between different payoffs or from single- to
multi-attribute calculations. This chapter covers tree calculation method
preferences, and two kinds of multi-attribute calculation methods.

Another calculation method available to users of the Healthcare module


is Cost-Effectiveness; see the Healthcare module documentation for
details.

In this chapter:

• Changing what the tree calculates ................................................ 96

• Changing what roll back displays.................................................. 99

• Calculation using multiple attributes............................................ 101

Chapter 7: Tree Calculation Methods and Preferences 95


Changing what the tree calculates
Changing what the tree There are a few basic calculation preferences in a tree, which were
calculates introduced at the end of Chapter 2 and the beginning of Chapter 5:
• the calculation method
• the active payoff(s)
• the optimal path criterion
• numeric formatting
Some information about the currently selected calculation method can
be seen in the status bar at the bottom of the TreeAge Pro window. If
the tree is currently set to use only one payoff — the Simple calculation
method — "Payoff n" will appear, where n is the active payoff set.

The combination of settings that is appropriate depends on your model


and your analysis objectives. To view in detail the tree’s current calcula-
tion method, or to make changes to these settings, open the Preferences
dialog.
® To view/edit the calculation method preferences:

s Choose Edit > Preferences…. By default, the Calculation


Method preferences category will be visible.

Numeric formatting
The number in the bottom left corner of the dialog, labeled Numeric
format, is an example of how calculated values will be formatted during
roll back display and in most other analyses, based on the current set-
tings. The default numeric formatting shows two decimal places, with
no abbreviations, using your computer’s currency display settings.

96 Part II: Working with Trees


The settings can be modified by clicking the Numeric Format… button
to open the Numeric Formatting dialog. See Chapter 5 for details on the
Numeric Formatting dialog.

Optimal path
All calculation methods in TreeAge Pro require you to specify how
decisions should be made in the tree (i.e., during roll back). This is
done using the option labeled Optimal path is. The default optimal path
criterion used for new trees is High, unless you save new default set-
tings. This setting would be changed if, for example, you were model-
ing project costs (to find the strategy with the lowest expected cost).

® To set the optimal path criterion:

s Choose Edit > Preferences. The Calculation Method category


will be visible.

s Next to the label Optimal path is, select the appropriate set-
ting: High for a tree that should maximize expected values,
Low for a tree that should minimize.

For a tree set to High (e.g., one whose payoffs are in terms of life
expectancy), at each decision node TreeAge Pro will select the alterna-
tive with the highest numeric value. For a tree that minimizes, such as
one whose payoff formula is in terms of costs, the alternative with the
lowest numeric value is selected.

Note:
Each of the nine payoff sets stores its own optimal path criterion for Simple
calculations, and each form of multi-attribute calculations also has its own
optimal path setting.

Payoff sets
In TreeAge Pro, you can enter up to nine different payoffs at each ter-
minal node (although 5–9 are disabled by default). While many analy-
ses will require only one attribute (e.g., cost), some models may have
multiple attributes (e.g., benefits and costs, or direct costs and indirect
costs) or different perspectives on the same attribute (e.g., societal, per-
sonal, or institutional costs of disease).

In a benefit-cost model, for example, monetary benefits could be


assigned to payoff #1 and monetary costs to payoff #2 (or vice versa).
You would then have the option of performing simple, single-payoff

Chapter 7: Tree Calculation Methods and Preferences 97


analysis on payoff #1 or payoff #2 or, as will be explained in a later sec-
tion, of performing multi-attribute analysis.

® To change the active payoff used for Simple calculations:

s Open the Preferences dialog, and with the Simple method


selected change to a different payoff set number in the Use
payoff pop-up menu.

s When you change to a new active payoff for the first time,
ensure that you select the appropriate optimal path criterion
and numeric formatting for that payoff.

Calculation methods
The choice of calculation method determines the formula used to cal-
culate values for nodes in your tree. There are two kinds of calculation
methods:

• single-attribute (Simple) calculations;


• multiple-attribute calculations, including: Benefit-Cost and
Multi-Attribute (weighted).

Healthcare module users:


A third form of multi-attribute calculations, Cost-Effectiveness, is available
with the TreeAge Pro Healthcare module.

Simple calculations are just that — expected values are calculated for
the nodes in the tree based simply on the values in the active payoff set.
If, as described above, your tree included multiple attributes — such as
monetary benefits in payoff #1 and costs in payoff #2 — the two sets of
payoff values could be combined in a single calculation using the Ben-
efit-Cost calculation method’s formula.

® To change the calculation method:

s With the Preferences dialog open, select the appropriate calcu-


lation method from the Method pop-up menu.

s If you select a calculation method for the first time in a par-


ticular tree, the settings for payoffs, optimal path criterion, and
numeric format may need to be modified.

More information on the multi-attribute calculation methods is provided


later in this chapter.

98 Part II: Working with Trees


Notes:
• Changing calculation method (or other) preferences will not affect the
content of your tree. No values or formulas used in payoff #1 are lost
by switching the Simple calculation from using payoff #1 to payoff #2,
for example. Only the calculation and display of values will be affected,
and these only temporarily; the changes to the calculation preferences
can be reversed at any time.

• When the Preferences dialog is closed, TreeAge Pro indicates the cal-
culation method information in the right-hand corner of the status bar.
If you have selected Simple calculations using payoff 3, “Payoff 3” will
appear in the status bar. If you select Benefit-Cost using payoffs 4 and
2, the status bar will read “B-C, 4-2.” If you select Multi-Attribute, then
“MultiAttr” will show in the status bar.

Changing what roll back displays


Changing what roll back Before dealing with multiple-attribute analysis methods, let’s look at
displays some calculation preferences related to roll back.

Typically, roll back boxes display the expected value of each node,
along with the path probability at terminal nodes. TreeAge Pro can
display a variety of other calculated values during roll back; these are
described below.

® To change the quantity to be calculated during rollback:

s Choose Edit > Preferences, and select the Roll Back category.

s Select an option from the group labeled Roll back calculates.

Here is a brief description of the other options:

Payoffs only: Only the values of terminal nodes will be


displayed. Optimal paths will be calculated and indicated using
the usual hash marks and colored lines, but no expected values
will be displayed.
Path probabilities: Both the calculation and display of expected
values is suppressed. The calculation of path probabilities does
not take into account the optimal path. Thus, the sum of the
path probabilities of all terminal nodes in a decision tree will be
greater than 1.0.
Maximin: This option will consider only the most pessimistic
possibility at each uncertainty, regardless of probabilities. Then,
at each decision point, the best option is selected. More details
are provided in the following section.

Chapter 7: Tree Calculation Methods and Preferences 99


Maximin roll back
Maximin calculations may be useful during early stages of certain
models, before probabilities have been assigned to the tree. Here, spe-
cifically, is how a tree is rolled back under Maximin:

• The value assigned to every chance node is equal to


the worst (least optimal) value of any of its potential
outcomes. Probabilities are ignored, and may be omitted.
• The value assigned to every decision node is equal to that
of the best alternative, as usual.
Maximin calculations take a pessimistic view of events. They are based
on the idea that one way to deal with risk is to identify the worst case
scenario for each alternative and then select the strategy which yields
the best of these worst case scenarios.

Note:
Maximin is generally treated as an additional perspective only, and not as
a substitute for standard, probabilistic calculations. Its primary distinction
— the fact that it doesn't look at probabilities — it also its primary weakness.
It would ignore information that the strategy with the worst outcome has a
very low probability of this event occurring, for example.

Below is a picture of the example file Rock Climber using Maximin roll
back. The value of the Treat foot strategy is simply its worst outcome,
which is the patient dying (utility = 0). The Amputate foot option has no
uncertainty, and it is simply equal to its payoff. The decision then maxi-
mizes between the available options, as usual.

In a Maximin roll back of a tree whose optimal path preference is set to


High, the roll back boxes at chance nodes will be labeled MIN: at deci-
sion node the boxes will be labeled MAX:, in order to indicate the oper-
ation being performed. These prefixes are switched if the optimal path
preference is set to low (minimization).

100 Part II: Working with Trees


Calculations using multiple attributes
Calculation using multiple TreeAge Pro includes two calculation methods that combine multiple
attributes payoffs: benefit-cost and weighted multi-attribute calculations. (If you
have the optional Healthcare module, a third calculation method using
multiple payoffs is available: Cost-Effectiveness. See the Healthcare
module documentation for details.)

The first step in preparing a multi-attribute model is setting the calcu-


lation preferences.

® To set up a tree for multi-attribute modeling:

s Choose Edit > Preferences. By default, the Calculation


Method page will be active.

s From the Calculation Method pop-up menu, choose Benefit-


Cost or Multi-Attribute.

s If you select Benefit-Cost, select two payoff sets to represent


the two attributes in your tree. The optimal path will automati-
cally be High (maximize value).

s If you select Multi-Attribute, click the Weightings… button


to enter weightings (details are provided below), and select the
optimal path criterion.

s Click Numeric Format… to change the formatting applied to


values calculated using the relevant multi-attribute formula.

Entering multiple payoffs


With both kinds of multiple-attribute models — benefit-cost and multi-
attribute — you will enter at least two payoffs at each terminal node.
The process of entering multiple payoffs values at a terminal node is
very simple — the payoff sets in the Enter Payoff window correspond
to the Use payoff selections made in the Preferences dialog.

Chapter 7: Tree Calculation Methods and Preferences 101


The Enter Payoff window does not flag one of the nine payoffs as active
if the Simple calculation method is active. However, if a multi-attribute
calculation method is used, the payoff titles in the window will indi-
cate which payoffs are to be used. For benefit-cost, they will be labeled
“Benefit” and “Cost.” For weighted multi-attribute models, they will be
labeled “Attr 1” through “Attr 9.”

If you require more than four separate payoff sets in your model, for
instance for weighted multi-attribute calculations, additional payoffs up
to #9 can be activated by changing the Enable payoffs… setting.

How benefit-cost calculations are performed


This calculation will subtract the cost of a scenario, represented by one
payoff, from its benefit, represented by a different payoff. Therefore,
both attributes in a benefit-cost analysis must be measured in the same
monetary units. All analyses available under Simple calculations (1-, 2-,
3-way sensitivity analysis, for example) are available under the Benefit-
Cost calculation method, as well.

This calculation does not divide costs by benefits, as is done in some


kinds of cost-benefit analyses.

How weighted multi-attribute calculations are performed


Unlike the Benefit-Cost calculation method, the weighted Multi-Attri-
bute calculation method does not require that all attributes/payoffs be
assigned using the same units. Instead, a linear equation is set up that
combines up to nine payoffs; attributes given a non-zero weighting are
made part of the multi-attribute calculations.

For example, if you assigned a weight of 1 to Attribute 1 and a weight of


0.5 to the next three attributes, each terminal node would be evaluated
based on the expression Attribute 1 + 0.5 * Attribute 2 + 0.5 * Attribute
3 + 0.5 * Attribute 4.
102 Part II: Working with Trees
The Weightings dialog can be accessed either by clicking the Set
Weightings… button in the Calculation Method category of the Prefer-
ences dialog, or by choosing Values > Multi-Attribute Weights from the
tree window. All analyses available under Simple calculations are avail-
able under Multi-Attribute calculations, as well.

Tip:
Variables (see Chapter 13) can be used in the weighting expressions. This
is useful when there is uncertainty concerning how much one factor should
be weighted versus another.

Chapter 7: Tree Calculation Methods and Preferences 103


104 Part II: Working with Trees
CHAPTER 8
CHAPTER 8: SELECTING SUBTREES AND MULTIPLE NODES

SELECTING SUBTREES AND


MULTIPLE NODES
While some tree-building tasks require that a single node be selected,
other operations can, or must, be performed on multiple nodes. This
chapter describes the different methods used to select multiple nodes.

In this chapter:

• Selecting a subtree .................................................................. 106

• Selecting multiple, unrelated nodes ............................................ 106

• Selecting multiple nodes by characteristic .................................... 107

Chapter 8: Selecting Subtrees and Multiple Nodes 105


Selecting a subtree
Selecting a subtree In decision trees, a subtree refers to a part of a tree, defined in this way:
starting with a node with branches, that node’s subtree is comprised of
all nodes and branches to its right (its “descendants”).

A few tree-building operations — copying, pasting, cutting, clearing,


and cloning — require a special method for selecting a subtree.

® To select a subtree:

s Select a single node that has branches attached (i.e., not a ter-
minal node).

s Choose Options > Select Subtree.

The methods of selecting multiple, individual nodes described in the


next sections cannot be used to select a subtree.

Tip:
It is also possible to select a subtree by holding down the CONTROL key while
clicking on the subtree’s root node.

Selecting multiple, unrelated nodes


Selecting multiple, TreeAge Pro offers several methods for selecting multiple, unrelated
nodes. These techniques can be used when changing node types, enter-
unrelated nodes ing payoffs, and a few other tasks.

® To select a set of unrelated nodes:

s Select any node.

s While holding down the SHIFT key, select another node by


clicking on it. Continue adding to the selection using the same
shift-clicking operation.

® To remove nodes from the selection:

s Hold down the SHIFT key and click, one after the other, on each
of the selected nodes that you wish to deselect.

It is possible to select multiple nodes by dragging a selection rectangle


around them.

® To select several adjacent nodes:

s Click and drag to create a selection rectangle that encloses the


adjacent nodes you wish to select.

s Release the mouse button.


106 Part II: Working with Trees
You may also use the selection rectangle described above to add or
remove nodes from the current selection, by holding the SHIFT key.

Selecting multiple nodes by characteristic


Selecting multiple nodes The Select Nodes dialog makes it possible to automatically select sets
by characteristic of nodes that share a particular characteristic, such as:

• a character, word, or phrase in the node text


• the location of the node
• a value used or defined at the node
• a node’s type, or its parent’s type

A common application of this feature is to select all rightmost nodes in


the tree, prior to performing the Change Node Type command — creat-
ing all endpoints at once. This selection is illustrated below.

® To select a set of nodes based on a shared characteristic:

s Choose Options > Select If….

s Click on a category in the Select If list, and specify the selec-


tion criteria.

The Select Nodes dialog includes an option to add to the current


set of selected nodes; otherwise, any initially selected nodes will be
unselected. The search can also be restricted to particular subtrees.

Text searches are not case-sensitive.

Chapter 8: Selecting Subtrees and Multiple Nodes 107


108 Part II: Working with Trees
CHAPTER 9 CHAPTER 9: MAKING CHANGES TO TREE STRUCTURE

MAKING CHANGES TO TREE


STRUCTURE
Building a tree is often a process of frequent revision. Also, new tree
projects can often make use of subtrees from existing models. This
chapter starts with a review of the basic tree building commands from
Chapter 2, and then covers a set of features designed to help you
move, remove, and duplicate parts of a tree (called “subtrees”).

In this chapter:

• Tree building commands – a review ........................................... 110

• Inserting, deleting, and reordering branches................................. 110

• Cut, copy, paste, and clear nodes and subtrees............................. 114

• Cut, copy, paste, and clear text.................................................. 117

• Undo and Redo ....................................................................... 119

• Reverting to a file’s saved state ................................................. 119

Chapter 9: Making Changes to Tree Structure 109


Tree-building commands – a review
Tree-building Here is a quick review of some of the basic tree-building commands
commands – a review introduced in Chapter 2.

® To add branches:

s Select a node.

s Choose Options > Add Branches (or double-click on the


node).

® To delete a branch:

s Select the branch to remove.

s Choose Options > Delete Branch.

® To change a node’s type:

s Select a node.

s Choose Options > Change Node Type… (or click on the


Change Node Type button).

s In the Change Node Type dialog, select the desired node type,
and press ENTER or click OK.

Note that these tree-building commands are all found under the Options
menu. The next section describes in more detail how the Delete Branch
command works, and also introduces two other useful commands found
under the Options menu: Insert Branch and Reorder Branches.

This chapter also details the commands used to add and delete entire
sections of a tree, rather than single nodes

Inserting, deleting, and reordering branches


Inserting, deleting, and Many revisions to a tree’s structure can be accomplished by insert-
reordering branches ing or deleting one branch or node at a time, or by changing the order
of branches emanating from a node. These commands are described in
detail in this section.

The Cut, Copy, and Paste commands described later in this chapter can
be used to efficiently carry out similar, but more complex, tree modifica-
tions – including inserting, deleting, and reordering subtrees, as well as
duplicating nodes or subtrees.

110 Part I: Working with Trees


A note on tree terminology:
Tree diagrams may have first been used in describing family ancestry, so
familial terms are often used to describe the relationships between nodes
and branches of decision trees. All nodes to the left of a referenced node
are its ancestors; nodes to the right, its descendants. The branches of a
parent node are its children (and each other‘s siblings).

Inserting Branches
The Insert Branch command, in comparison to the Add Branches com-
mand, provides greater control over where new branches and nodes are
created. While the Add Branches command can only add more chil-
dren to a node, the Insert Branches command can be used to either add
branches or make “generational” changes — i.e., to insert a new node
between an existing parent and its children. Inserting a node causes
existing nodes to move – up, down, to the left, or to the right.

® To insert a branch:

s Open the Rock Climber tree, from the TreeAge Pro Tutorial
Examples subdirectory.

s Select the chance node labeled Use standard antibiotic.

s Choose Options > Insert Branch….

s Click on To Left (or press the L shortcut key), and press ENTER
or click OK.

A new branch, ending in a chance node, is inserted between the root,


decision node and the Use standard antibiotic node.

Chapter 9: Making Changes to Tree Structure 111


s Again, select the Use standard antibiotic node and choose
Options > Insert Branch….

s Click the To Right radio button, and click OK.

This time the new branch is inserted after the Use standard antibiotic
node. The two branches that were the children of the Use standard anti-
biotic node are now attached to the new chance node.

s Again, select the Use standard antibiotic node and choose


Options > Insert Branch….

s Click the Above radio button, and click OK.

In this case, the new branch is added as a sibling of the selected, Use
standard antibiotic node. Choosing the Below radio option, instead,
would have added the new sibling below Use standard antibiotic.

Using the Insert Branch command at a node with no branches works just
like the Add Branches command, except that it adds one branch instead
of two.

Deleting branches
To illustrate the different ways the Delete Branch command can be used,
let’s now reverse the changes made using the Insert Branch command.

Tip:
The Delete Branch command is used in this situation for illustrative purposes.
The Undo command, covered later in this chapter, may be more efficient
when you need to reverse the sequence of changes you have just made.
The Delete Branch command is more flexible, however, as it allows you to
reverse changes that were made at any time in the past, and leave in place
more recent revisions.

112 Part I: Working with Trees


The Delete Branch command can be used to remove any node, except
the root node.

® To delete an end node:

s Select the blank node above the Use standard antibiotic node.

s Choose Options > Delete Branch.

The selected node has been deleted. The tree again looks like the pic-
ture at the top of the previous page.

The next step is to remove the blank node inserted between the Use
standard antibiotic node and its original set of branches.

® To delete an internal node:

s Select the blank node to the right of the Use standard antibi-
otic node.

s Choose Options > Delete Branch.

The deleted node’s children move one generation to the left, joining any
siblings of the deleted branch. To see another example of this, delete
the blank node to the left of the Use standard antibiotic node.

s Select the blank node to the left of the Use standard antibiotic
node.

s Choose Options > Delete Branch.

The Rock Climber tree should now be back in its original state. If not,
you can either use the Undo command repeatedly, or close the file with-
out saving changes and then re-open it.

Reordering branches
The Reorder Branches command enables you to change the vertical
sequence of a node’s branches.

® To reorder a node’s branches:

s In the Rock Climber tree, select the decision node.

s Choose Options > Reorder Branches….

The resulting dialog box lists the branches of the selected node in order,
from top to bottom.

Chapter 9: Making Changes to Tree Structure 113


s In the list of branches, select Use standard antibiotic and click
Move Down.

s Press ENTER or click OK.

The order of the two options has been reversed; Use standard antibiotic
is now the bottom branch of the decision node.

Cut, copy, paste, and clear endnodes and subtrees


Cut, copy, paste, and clear Frequently, sections of a tree can be reused in another part of the same
tree, or a different tree that you are working on. TreeAge Pro allows you
endnodes and subtrees
to select an endnode or an entire subtree, copy or cut it, and then paste it
to one or more nodes in any open tree.

A different node or subtree can be copied or cut onto each of TreeAge


Pro’s four tree clipboards. The tree clipboards are described in more
detail at the end of this topic.

In addition to being able to duplicate and move subtrees in the tree


window using the Edit menu commands described in this chapter, it is
also possible to manipulate subtrees using the mouse and CONTROL key
in the tree Explorer view. See Chapter 21 for details on working in the
tree Explorer.

Tip:
Besides text, tree nodes, and subtrees, other items that can be copied and
pasted in TreeAge Pro include influence diagram nodes, variable definitions,
and links with Excel. Items that can be copied from, but not pasted into,
TreeAge Pro include text reports, model images, and graph images.

Endnodes
The Cut, Copy, and Clear Node commands will be available only if you
have selected a single endnode (i.e., any node without branches, except
the root node). Once a endnode has been cut or copied to the active tree
clipboard, it can be pasted to any node.

® To copy an endnode:

s Select a node without branches.

s Choose Edit > Copy Node. Or, choose Edit > Copy… and
select the Node option in the Copy Options dialog.

114 Part I: Working with Trees


Once copied to the clipboard, the node can be pasted to any node as
a new branch. It can be pasted to a node with or without branches, in
the same tree or a different one. All aspects of the node, except for its
branches, are included with the copy.

To paste the copied node, a single node must be selected.

® To paste an endnode:

s Select any node.

s Choose Edit > Paste Node. Or, choose Edit > Paste… and
select the Node option in the Paste Options dialog.

After being pasted, the copied node remains on the active tree clip-
board, and can be pasted at additional locations. It will remain on the
clipboard until a different node (or subtree) is copied, or until TreeAge
Pro is closed.

It is also possible to cut an endnode — i.e., remove it from its current


location, in order to paste it in a new location.

® To cut an endnode:

s Select a node without branches.

s Choose Edit > Cut Node. Or, choose Edit > Cut… and select
the Node option in the Cut Options dialog.

If you wish to delete the selected node without placing it on the clip-
board, it is possible to use the Edit > Clear Node command. This com-
mand works identically to the Options > Delete Branch command.

Subtrees
The ability to copy single endnodes may be of relatively limited use-
fulness, but the ability to duplicate larger tree structures can be quite
useful. In many trees, some alternatives will be structural identical or
closely similar, differing perhaps in particular probabilities or payoffs.
Even within a single alternative’s portion of a tree

Using copy and paste methods to duplicate subtrees is an efficient way


to build trees that have some symmetry. (As explained in Chapter 7, a
node’s subtree is comprised of its branches and the nodes to its right.)

Chapter 9: Making Changes to Tree Structure 115


Before a subtree can be copied, it must be selected.

® To select a subtree:

s Select a single node that has branches attached (i.e., not an


endnode).

s Choose Options > Select Subtree, or control-click on the sub-


tree’s root node.

Note:
Although the subtree’s root node is highlighted along with the selected sub-
tree, it will not be part of any subsequent operation on the subtree (i.e., the
subtree root node will not be copied or cut).

Once a node’s subtree is selected, the Copy Subtree command becomes


available.

® To copy a subtree:

s Select the subtree to be duplicated.

s Choose Edit > Copy Subtree (or Edit > Copy…, and select
Subtree in the Copy Options dialog).

Once copied to the clipboard, the subtree can be pasted to any node —
one with or without branches, in the same tree or a different one.

® To paste a subtree:

s Select any single node.

s Choose Edit > Paste Subtree (or Edit > Paste…, and select
Subtree in the Paste Options dialog).

The Paste Subtree command can be repeated as many times as neces-


sary.

Tip:
A copy of a subtree, while on the clipboard or after it is pasted, has no con-
nection to the original subtree. See Chapter 21 for a discussion of clones,
where copies of a subtree remain linked to the original, master subtree.

116 Part I: Working with Trees


To move a subtree, rather than duplicate it, use the Cut Subtree com-
mands.

® To cut a subtree:

s Select the subtree to remove (control-click on the parent node).

s Choose Edit > Cut Subtree.

This will cause the subtree (but not the subtree’s root) to be removed
from the tree and placed on the clipboard. As with a copied subtree,
when a subtree is cut to the clipboard, the Paste Subtree command
becomes available.

The Clear Subtree command is the only way to delete more than one
node at a time. It remove the subtree without placing it on the clipboard.

® To clear a subtree:

s Select the subtree to be removed.

s Choose Edit > Clear Subtree.

Using the tree clipboards


TreeAge Pro has four tree clipboards, one of which is active at a time.
This means, in effect, that you can cut or copy subtree X without losing
subtree Y that is currently on the active tree clipboard. Prior to cutting
or copying another subtree, simply activate one of the empty tree clip-
board’s by selecting it in the Edit menu.

The contents of the currently active tree clipboard can be viewed (but
not modified) by choosing Edit > Show Clipboard. The Paste Subtree
command pastes the contents of the currently active tree clipboard.

Cut, copy, paste, and clear text


Cut, copy, paste, and It is possible to cut, copy, paste, and clear text in node descriptions, as
well as in probabilities, payoffs, and any other formulas or values you
clear text
type in TreeAge Pro.

Before cutting, copying, or clearing text, you must select the targeted
letters, numbers, or words.

® To select individual characters of text or formulas:

s Either use the mouse to: A) click and drag from one end of the
desired selection to the other; or B) click before one end of the
selection, and then shift-click after the other end.

Chapter 9: Making Changes to Tree Structure 117


® To select one or more words of text (or a formula):

s Use the mouse to either: A) double-click on the first word of


the selection and drag to the last word; or B) double-click on
the first word of the selection, and then shift-double-click on
the last word.

Once the text is selected, then you can choose the appropriate command
from the Edit menu:

® To copy (duplicate) selected text:

s Choose Edit > Copy Text, or Edit > Copy….

s If the available menu command is Edit > Copy…, TreeAge Pro


will open the Copy Options dialog box. In this case, click on
the Text option, and press ENTER or click OK.

® To cut (move) selected text:

s Choose Edit > Cut Text. Or, choose Edit > Cut… and then
select Text in the Cut Options dialog box.

The Copy and Cut commands both place the selected text on the clip-
board. The text on the clipboard can then be pasted into any TreeAge
document, or into another program.

Tip:
The Cut, Copy, Paste, and Clear commands can also be accessed by
right-clicking on the selected text and choosing the command from the
quick menu.

The Paste Text command can be used to insert text or formulas both
place the selected text on the clipboard. This text can then either be
pasted into any TreeAge document, or into another program.

® To paste (insert) text:

s Place the text cursor in the desired location.

s Choose Edit > Paste Text. Or, choose Edit > Paste… and then
select the Text option in the Paste Options dialog box.

The Edit > Clear Text command can be used to delete the selected text
without placing it on the clipboard. The Clear Text command works
identically to simply selecting text and pressing the DELETE key or the
BACKSPACE key.

118 Part I: Working with Trees


Undo and Redo
Undo and Redo Each tree (and influence diagram) retains in memory details of the last
ten actions that you took. Beginning with the most recent action and
working back one action at a time, you can remove changes to structure,
values, preferences, etc.

The Undo item in the Edit menu reports what kind of change is the next
one that can be undone. If the last action taken was to cut a node, the
topmost command under the Edit menu will read Undo Cut Node.

® To undo a change to your model:

s Select Edit > Undo [action].

If you go back too far in undoing modifications to the model, you can
use the Redo command, also found in the Edit menu. The Redo com-
mand essentially allows you to undo previous Undo action(s).

® To redo an undone change to your model:

s Pull down the Edit menu.

s Select Edit > Redo Cut [action].

Reverting to a file’s saved state


Reverting to a file’s The Revert to Saved command clears all changes made to your model
since it was last saved. Its effect is the same as simply closing the cur-
saved state
rently active tree (or other document) without saving changes, and then
reopening the file.

Warning!
The Revert to Saved command warrants careful use, as it cannot be
undone.

® To revert the current model to its saved state:

s Choose File > Revert to Saved.

TreeAge Pro will prompt you to verify that you really want to clear all
the changes you have made to the tree since it was last saved.

Chapter 9: Making Changes to Tree Structure 119


120 Part I: Working with Trees
CHAPTER 10
CHAPTER 10: ANNOTATING THE TREE

ANNOTATING THE TREE


In addition to the basic ability to enter text labels at event nodes in the
tree, TreeAge Pro includes a number of other options for annotating
trees covered in this chapter.

The next chapter covers a variety of options for controlling the layout,
formatting, and contents of decision trees.

In this chapter:

• Label nodes ............................................................................ 122

• Node comments ...................................................................... 122

• Note boxes and arrows............................................................. 124

Chapter 10: Annotating Trees 121


Label nodes
Label nodes A label node, which uses a simple black “zigzag” as its symbol, acts like
a placeholder. Label nodes have no impact on calculations, and cannot
have more than one branch. A label node (or a series of them) can be
inserted between event nodes to more clearly identify additional steps in
a particular path.

® To add a label node before an event node:

s Select the event node and choose Options > Insert Branch….

s Select To Left, and click OK to create the new node.

s With the new node selected, choose Options > Change Node
Type..., select the Label type, and click OK.

You could also change an existing endnode to a label node, and then
use the Add Branch or Insert Branch command to add the one allowed
branch to the label node. A node with more than one branch cannot be
changed to a label node.

For calculation purposes, a label node behaves like a decision node with
one branch, or a chance node with one branch having a probability of
1.0. The value of the label node is simply the value of the node immedi-
ately to its right.

Node comments
Node comments Detailed comments can be assigned to the branches of a node and saved
with the tree. Unlike note boxes (see below) and branch labels, node
comments are hidden (not displayed on the face of the tree). Nodes that
contain comments will be display a small flag.

Node comments are particularly useful for recording the basis on which
probability assignments were made for the branches of a chance node.

® To add node comments:

s Select a node that has at least one branch.

s Choose Options > Node Comment....

122 Part II: Working with Trees


The window that appears will have one text area for each branch of the
selected node, each labeled with the text description from the branch.
You can move between text areas using the TAB key.

® To close the node comments:

s Once you have entered the node comments, choose File >
Close to return to the tree window.

In the tree window, the node at which you entered a node comment is
identified by a small red flag. This flag will not appear when the tree is
printed, or when the Export or Copy Special commands are used to save
or export a picture of the tree.

It is possible to turn off the flagging of nodes with comments.

® To hide node comment flags:

s Select Edit > Preferences... and choose the Node Display cat-
egory.

s Select Mark nodes with comments, and press ENTER.

The open node comments can be printed. You may also print preview
the node comments.

The font used to display and print the open node comments can be
changed by choosing Display > Font.

Chapter 10: Annotating Trees 123


Note boxes and arrows
Note boxes and arrows Models often benefit from the use of longer explanations than are desir-
able in branch descriptions. Node comments, described in the previous
section, are useful for the model builder, but not for someone looking at
a printout or image of the model.

Using note boxes and arrows, you can provide the model’s audience
with an overview of the whole model, or specific nodes or subtrees.

Creating note boxes


Any number of note boxes can be created. Boxes are initially placed
independent of any node, but can be bound to particular nodes if
desired. Each box’s can use a different font, but all must use the same
outline format (solid/dashed/none).

® To draw a note in a tree:

s Select Display > Create Note. The mouse cursor becomes a


crosshairs.

s With the mouse, click and drag somewhere in the tree window.
Make the box large enough to hold the text you wish to enter.

A rectangular box is created. In the upper-left corner of the box is a


blinking text insertion caret, indicating that text can be entered in the
note box by typing. Text entered in the note box will automatically wrap
to the width of the box. Once the text box is full, it will not accept addi-
tional typed text until it is made larger (see the following section).

The font of the active note box can be changed. Each note box can use a
different font, but all text within a single note box uses the same font.

® To change the font of a note:

s Click within the text in a note box.

s Select Display > Font....

s Change the font, size, or style, and click OK.

To see what the note box will look like when printed, unselect it.

® To unselect/deactivate a note box:

s Click somewhere outside the box.

124 Part II: Working with Trees


When a note box is inactive (i.e., not accepting text) and not selected,
its outline is drawn on screen using dashed lines, by default. This is also
what the note box will look like when printed. All note boxes in the tree
use the same outline type — either dashed, solid, or none.

® To change the tree’s note box outline type:

s Choose Edit > Preferences, and select the Notes & Arrow cat-
egory.

Moving, resizing, and deleting note boxes


In order to move, resize, or delete a note box, you must be able to select
it. A note box that is activated for text entry, displaying the blinking text
caret, is not selected.

® To select a note box:

s Start with the mouse pointer inside the note box, showing the
text cursor. Slowly move the mouse pointer towards any edge
of the box, stopping as soon as the cursor changes to an arrow.

s With the arrow cursor, click on the box’s edge with your
mouse.

The selected note box will display a small square — a “handle” — at


each of its four corners. These handles are used to resize the box.

® To resize a note box:

s Click on one of the box’s handles, and click and drag it to


change the size and proportions of the box.

® To move a note box:

s Click and drag on an edge of the note box, rather than a corner,
and move the box to the desired location.

Chapter 10: Annotating Trees 125


The Edit menu or the right-click menu can be used to clear, cut, or copy
a note box.

® To clear (delete) a note box:

s Select the note box as described above.

s Choose Edit > Clear Note or Cut Note (or choose Cut Note
from the right-click menu).

The Copy Notebox and Paste Notebox commands can be used to dupli-
cate a selected note box.

Binding a note box to a node


When a note box is placed, it remains fixed in place relative to the top
left corner of the tree window, and will not adapt to changes made to
the tree. If nodes are added or deleted, for example, an existing note box
may overlap with another object. This problem can be avoided by bind-
ing a note box to a node.

® To bind a note box to a node:

s Select the note by clicking on its outline.

s Select Display > Bind Note....

You will be prompted to select the node to which you want to bind your
note.

s Click OK to continue, and select a node.

The bound note box will be aligned directly above the selected node,
and will move with the node as the tree structure changes.

126 Part II: Working with Trees


A bound note box cannot be deleted, cut, copied, moved or resized like
an unbound note box. The note box will resize automatically to the
length of the text. A bound note box will no longer wrap its text auto-
matically. To wrap text, you must enter carriage returns in the text.

Tip:
Pressing the TAB key will move the text cursor from a bound note box to its
node’s branch line.

Creating arrows
You can draw arrows in conjunction with annotating a tree. Arrows are
typically used to associate an unbound note with one or more nodes.

® To draw an arrow:

s Choose Display > Create Arrow. The mouse cursor becomes a


crosshairs.

s Click and drag with the mouse; start from the point where you
want the arrow to begin, and release the mouse button where
you want the arrow to point.

You can change the location of the arrow by clicking and dragging its
line. It is possible to change the length and position of the arrow by
clicking and dragging the endpoints of the arrow.

It is possible to customize the appearance of arrows in a tree, via the


same Preferences dialog used to customize note box outlines (see
above). Arrowheads can be small, medium, or large, and arrow lines
can be solid, dashed, or dotted. Your changes will apply to all notes and
arrows in the active tree.

Tip
To ensure that an arrow is drawn strictly horizontally or vertically, hold down
the SHIFT key as you draw the arrow or change the location of one of its
endpoints.

Chapter 10: Annotating Trees 127


128 Part II: Working with Trees
CHAPTER 11 CHAPTER 11: TREE DISPLAY PREFERENCES AND OPTIONS

TREE DISPLAY PREFERENCES


AND OPTIONS

This chapter covers a wide variety of options for controlling the layout,
formatting, and appearance of trees. Some of these features apply
to calculated values displayed following roll back, while others affect
display of the tree’s structure.

In this chapter:

• Collapsing subtrees .................................................................. 130

• Roll back preferences and options............................................... 132

• Other tree display preferences.................................................... 137

• Changing fonts ....................................................................... 141

Chapter 11: Tree Display Preferences and Options 129


Collapsing subtrees
Collapsing subtrees The Collapse Subtree command can be used to temporarily hide any
subtree (including the root node’s subtree). It is particularly helpful
when working with or presenting large trees.

® To collapse a subtree:

s Select a node with visible branches, and choose Display > Col-
lapse Subtree.

The subtree emanating from the selected node is hidden and a plus sign
(+) is displayed in its place, to the right of the node. The plus sign will
also appear in place of the hidden subtree in printouts and exported
images of the tree. Collapsing a subtree does not affect calculations.

Hidden subtrees can be uncollapsed in two ways: showing one genera-


tion of branches; or unhiding the entire subtree.

® To expand a collapsed subtree one generation at a time:

s Select a node with a plus sign to the right, and choose


Display > Expand Subtree Once.

The branches of the selected node will be displayed, but any subtrees
attached to these branches will remain hidden and plus signs displayed
in their place.

® To expand an entire collapsed subtree:

s Select a node with a plus sign to the right, and choose


Display > Expand Entire Subtree.

The Collapse or Expand Subtree command can be used on more than


one node at a time. If you select multiple nodes having branches, the
collapse command will be available; if you select multiple nodes show-
ing plus signs where subtrees have been collapsed, the expand com-
mands will be available.

130 Part II: Working with Trees


Aligning selected nodes
Aligning selected nodes TreeAge Pro includes two options for adjusting the vertical alignment
of nodes in a tree. This section deals with the use of the Skip Genera-
tion command to make manual adjustments to the horizontal alignment
of selected nodes. It is also possible to specify that all terminal nodes
be vertically aligned automatically; this is covered in a later section, on
tree display preferences.

In many trees, asymmetry in intervening events results in the related


nodes not lining up vertically. It is sometimes desirable to force these
related nodes to line up, resulting in a more intuitive layout of the tree.

® To align a selected node with a node in a different subtree:

s Select a node.

s Choose Display > Skip Generation, to move the node’s subtree


one generation to the right.

Skipping one or more generations can be used to line nodes up verti-


cally — for example, the multiple nodes representing a particular deci-
sion, in different paths. To skip more than one generation, simply select
the menu command repeatedly.

To reverse the effects on the tree, simply un-skip generations at the node
which skips a generations.

® To remove an extra generation from the selected node:

s Select a node which is set to skip a generation.

s Choose Display > Unskip Generation, to move the subtree to


the left.

Skipping generations does not affect calculations.

Chapter 11: Tree Display Preferences and Options 131


Changing roll back display
Changing roll back Chapter 5 described in detail the use of the roll back analysis with deci-
display sion trees. This section discusses the customizations that can be made to
the roll back display.

Roll back display options


Chapter 5 described how to control-click and drag individual roll back
boxes, to avoid obscuring other node information.

It is also possible to hide individual roll back boxes.

® To hide a selected node’s roll back box:

s With the tree rolled back, right-click on the node whose roll
back box you want to hide.

s From the pop-up quick menu, choose Hide roll back box.

This setting will be saved with the tree. A hidden roll back box can be
redisplayed by right-clicking on the node and choosing Hide roll back
box again (to unselect it).

The Preferences dialog includes a Roll Back category with a number of


settings related to the display of calculated values during roll back.

The functions of the top three roll back preferences are described in
Appendix C. The use of the different settings for Roll back calculates —
Expected values, Path probabilities, Payoffs only, and Maximin — are
also explained there.

132 Part II: Working with Trees


Roll back columns
When a tree is rolled back, TreeAge Pro normally displays next to each
terminal node a roll back box containing the node’s calculated payoff
and, in an optimal path, its path probability. Instead of showing these
roll back boxes, a tree can be set up to display columns of values to the
right of visual end nodes during roll back.

The example model used in this section is the Terminal Columns tree,
found in TreeAge Pro’s Tutorial Examples subdirectory.

Calculated values and other information that can be displayed in roll


back columns include:

• payoffs
• individual components of a complex payoff formula
• path probabilities
• scenario (i.e., terminal node) numbers

Here are some important features of roll back columns:

• During roll back, the table of values can be copied to a


spreadsheet or other application for reporting or further
analysis.
• A row will be displayed for every visual end node, even
those that are not terminal nodes — for example, if a
node’s subtree is collapsed (see above) or is a hidden
clone copy (see Chapter 21), a row is shown for the node.
• Calculated values can be displayed using custom numeric
formatting.

Chapter 11: Tree Display Preferences and Options 133


® To set up roll back columns in a tree:

s Choose Edit > Preferences…, and select the category labeled


Terminal Nodes/Columns.

s Select the Show columns option, and click the Add/Remove…


button.

The Columns dialog is displayed, which is used to create and manage


the list of roll back columns.

® To create the first column:

s If no previously created columns exist, enter a name for a new


column in the blank Header field, and then choose the appro-
priate settings to specify its properties (see next page).

134 Part II: Working with Trees


® To add additional columns:

s If there is already a selected column in the list, click the More


button to create a new column, then enter a column header and
specifying properties for the new column.

Each column has the following properties:

Header – Title text displayed, underlined, at the top of the


column in the rolled back tree.
Calculation – Value to be displayed for a visual end node.
Numeric Format – Each column can use one of the
numeric formats stored in the tree, a custom numeric format,
or no formatting.
Font – You can specify a custom font, or default to the
“EV” font preference (same as payoffs boxes).
If you choose the Custom calculation type, you must setup a formula
to be calculated at each end node. A variable or formula can be directly
entered into the text box below the calculation type drop-down list.

Clicking on the ellipses button (…) to the right will open dialog with
tools for building the expression. (The use of variables and formulas is
covered in Chapter 13.)

Chapter 11: Tree Display Preferences and Options 135


With the columns turned on, values will be displayed after roll back for
each visual end node, unless the value cannot be calculated.

If an incremental-type calculation column is created, values will be dis-


played in a roll back column only if the branches of a decision are visual
end nodes. If the branches of a decision node are not terminal nodes, the
Collapse Subtree command (see above) can be used to make the deci-
sion node’s branches visual end nodes, by hiding their subtrees.

If roll back does not provide a calculation that you are interested in
(a common one is the contribution each end node makes to the total
expected value), it may be possible to do the calculation in Excel using
the output from roll back columns. It is possible to copy the table of roll
back columns as tab-delimited text, and paste it into a spreadsheet.

® To copy roll back columns to the clipboard:

s Roll back the tree, then choose Edit > Copy Special….

s Select the option labeled Copy columns at end nodes.

s Switch to the target document and paste the text.

The names of the end nodes are included as the first column in the table.

The display of roll back columns can be turned off in the Terminal
Node/Columns preferences, without deleting the list of columns.

® To turn off the display of roll back columns in a tree:

s Choose Edit > Preferences…, and the Terminal Nodes/


Columns category.

s Uncheck the Show columns option. Click OK.

136 Part II: Working with Trees


Some roll back column tips:
• To suppress the display of roll back boxes at internal nodes, so that only
roll back columns display during roll back, go to the Roll Back category
of the Preferences dialog and select Roll back calculates payoffs only.

• If your columns do not display properly, check to see if the minimize


empty space setting in the Tree Display page of the Preferences dialog
is selected. If so, deselect it to solve the problem. If roll back columns
still do not display correctly, try choosing Display > Redraw.

• To show terminal node (scenario) numbers in a column, you must acti-


vate the automatic node numbering setting, found in the Terminal Node
category of the Preferences dialog (see below).

Other tree display preferences


Other tree display Each tree created in TreeAge Pro can be given its own distinct set of
preferences display preferences. See Appendix C for settings not covered here.

Hiding and boxing payoffs


By default, the active payoff formula is displayed at each terminal node
when the tree is not rolled back. This information can be hidden if, for
example, you want to simplify a visual presentation of the tree.

® To hide terminal node payoff formulas:

s Choose Edit > Preferences…, and the Terminal Nodes/


Columns category.

s Uncheck the option labeled Display payoff names, and press


ENTER or click OK.

The tree’s payoffs can be displayed in boxes, even when the tree is not
rolled back.

® To enclose payoffs in boxes when the tree is not rolled back:

s In the Terminal Nodes/Columns preferences category, select


the option labeled Display payoff names, and the option
labeled Boxed.

Displaying a "skeleton" tree


TreeAge Pro includes a “skeleton” tree setting that, in combination with
a few other display preferences described below, results in an abstract
and very compact view of a tree, which is useful for display or printing.
This setting inserts space between each node and its branches (except
for the root node). Also, collapsed subtrees are completely hidden (no

Chapter 11: Tree Display Preferences and Options 137


plus signs). Used in combination with the Minimize empty space, Hide
node probabilities, and Hide payoffs settings, a tree using the skeleton
setting looks like the picture below (using the Skeleton Tree file from
the Tutorial Examples subdirectory):

Terminal node numbers


Terminal nodes can be automatically numbered, and these numbers dis-
played to the right of terminal nodes (or in a roll back column).

® To turn on scenario/terminal node numbering:

s Open the Terminal Nodes/Columns preferences category.

s Check the option labeled Automatic node numbering, and


enter the text to be used for node numbering (see below).
Press ENTER or click OK.

The text you enter for terminal node numbering must use the caret (“^”)
as a placeholder for the node number. The caret can be used alone or
with additional text, as in Outcome ^. The terminal node number and
text will be displayed whether or not the tree is rolled back.

To display scenario numbers during roll back in a terminal node


column, select the Automatic node numbering option and then create a
roll back column for scenario numbers (see above). To suppress display
of node numbering while roll back is off, but enable it in a roll back
column, select the Automatic node numbering option, leave the Text
empty, and set up the scenario number roll back column.

Hiding probabilities and branch labels


The numbers or formulas entered for probabilities can be hidden from
view. Node branch labels can also be hidden.

® To turn off the display of probabilities and/or node names:

s Choose Edit > Preferences, and the Node Display category.

138 Part II: Working with Trees


s Check the option labeled Hide probabilities only, or the option
labeled Hide all node texts. Press ENTER or click OK.

Horizontally aligning terminal nodes


There is a quick way to horizontally align all terminal nodes in a tree
with the right-most terminal node.

® To align all terminal nodes at the right edge of the tree:

s Choose Edit > Preferences, and select the Tree Display cat-
egory.

s Check the option labeled Align endnodes. Press ENTER or click


OK.

For instructions on aligning specific nodes in the tree, see the section at
the beginning of this chapter.

Increasing or decreasing vertical white space


If two branches that are vertical neighbors appear too close together,
there is the way to increase the space between them.

® To increase the vertical spacing between two nodes:

s Click on the bottom branch’s text label, to the left of the first
word in the label. Press ENTER one or more times, inserting car-
riage returns until you have created sufficient white space

A tree can be compressed vertically, reducing white space and yielding


a very compact tree.

Chapter 11: Tree Display Preferences and Options 139


® To compress a tree vertically:

s Choose Edit > Preferences…, and the Tree Display category.

s Check the option labeled Minimize empty space. You must first
ensure that Align endnodes is not selected.

s Press ENTER or click OK.

The graphic shown below illustrates how TreeAge Pro compresses the
display of the tree.

If the display of your tree has problems with the Minimize empty space
setting. One caveat to the use of this preference was mentioned in a pre-
vious section, and there are a number of other potential problems with
its use:

• The Minimize empty space and Align endnodes settings


are incompatible.
• Minimize empty space can cause problems when a tree is
rolled back, because of a lack of space for roll back boxes.
• Using both the Minimize empty space and Branch lines at
right angles settings can result in branch lines which slice
through node symbols.
• Minimize empty space is likely to cause problems with the
display of terminal node columns.

140 Part II: Working with Trees


Changing fonts
Changing fonts The font, size, and style of any text that appears in a tree can be easily
changed. Fonts can either be changed for selected objects or globally,
via a tree’s preferences.

Changing the font of selected objects


One way that the appearance of text entered on branches or in note-
boxes is by selecting a node, subtree, or note box.

® To change the font of the selected node or note box:

s Select a single node or note box.

s Choose Display > Font... (or click the Font tool bar button).

s Change the font, size, or style, and click OK.

Note on node fonts:


Once a selected node’s font has been modified, it is independent of the
tree’s global font preferences, described on the next page. Changes made
to the tree’s font preferences will not affect the selected node.

If a node is selected, this will only change the font of the node descrip-
tion, on the branch to the left. If the selected node is a branch of a
chance node, the font used for the probability is modified separately.

® To change the font of the selected node’s probability:

s Select a branch of a chance node and tab into its probability.

s Select Display > Font...

s Change the font, size, or style, and click OK.

When a selected subtree’s font is modified, both the node descriptions


and probabilities are affected.

® To change the font of an entire subtree:

s Hold down the CTRL key and click on a node that has branches;
this will select the node’s subtree.

s Select Display > Font....

s A dialog box appears asking you to confirm that you wish to


change the font of the entire subtree. Click OK.

s Change the font, size, or style, and click OK.

Chapter 11: Tree Display Preferences and Options 141


Unlike most subtree operations, changing the font of the subtree
includes the subtree’s root node in the operation. The root node, and all
of its descendants, will use the font specified for displaying node text as
well as probabilities.

Changing font preferences


The Fonts page of the Preferences dialog makes it possible to specify,
for the entire tree, the font used for node names, probabilities, expected
value boxes, and (if displayed) definitions of variables. Each button
calls up the standard font, size, and style dialog, but changes made in
those dialogs apply only in the limited context that their names reflect.

The Node Font button will change the branch text font for nodes sub-
sequently created in the tree. It is also applied to existing nodes in the
active tree, with the exception of selected nodes and subtrees at which
you have individually changed the font.

The Prob Font button will change the probabilities font for the active
tree. Like the Node Font, this is used for new nodes and existing nodes
in the active tree, with the exception of nodes and subtrees at which you
have individually changed the probability field font.

The EV Font button allows you to change the font for roll back boxes
displayed upon roll back of the active tree.

The Variables Font button allows you to change the font for variables
displayed beneath nodes in the active tree, if you elect to display full
variable definitions in the tree (see Chapter 13).

Like other preferences, font settings can be saved as defaults for subse-
quent trees. Simply check the box entitled Save settings as default (on
the right-hand side of the Preferences dialog) and click OK. When you
close the Preference dialog, the active tree’s preferences will be saved
on the computer and will govern the font settings of new trees that you
create. (Note that all preferences will be saved, not just those in the
Fonts page.)
CHAPTER 12
CHAPTER 12: MORE TREE-BUILDING TOOLS

MORE TREE-BUILDING TOOLS


This chapter covers a variety of features designed to facilitate model
building.

In this chapter:

• Find and replace text, formulas, and values ................................. 144

• Regional/international numeric settings ...................................... 145

• Using the Probability Wheel....................................................... 148

• Overriding the optimal path at selected nodes .............................. 149

Chapter 12: More Tree-Building Tools 143


Find and replace text, formulas, and values
Find and replace text, You can quickly search for and modify text and formulas at nodes in
formulas, and values a tree using the Find/Replace tool. This is the best way to change the
spelling of a word used frequently in a tree, or to change a formula that
appears in many payoffs, definitions, or other expressions.

Tips:
• Find/Replace is not recommended as a way to change a variable’s name.
Instead, change the variable’s properties via the Variables and Tables
dialog (see Chapter 14).
• To select all nodes with a specific characteristic, such as a word in their
name, try the Options > Select If… command, covered in Chapter 8.
• Changes made using Find/Replace cannot be undone, even while the
dialog is open. After performing a replacement, reverting to an older
version of the tree file may or may not be able to reinstate the text.

® To find text in a tree:

s Choose Options > Find….

s Enter text in the Find What box, choose the desired Match…
options, and select one ore more search location(s).

s Click the Find Next button to begin the search at the root
node. If a match is found at a node, the node is selected and the
result reported.

144 Part II: Working with Trees


If TreeAge Pro finds a match, clicking Find Next again will continue
the search from where it left off. Or, if text is entered in the Replace
With box, clicking Replace will replace the current instance of the
found text.

Clicking the Replace All button will repeat the Find Next and Replace
operations until the tree is fully traversed.

Clicking the Start Over button resets the search back to the root node.

If the Match whole word only option is checked, TreeAge Pro will not
search for partial word matches. If the Match case option is checked,
matching text must have the same combination of upper and lower case
letters as that specified by the user.

To replace instances of a name, number, or formula in parsed expres-


sions not included in any of the Find/Replace search locations (i.e.,
distribution parameters), use the Replace… button in the International
Settings dialog covered in the next section.

Regional numeric settings (decimals and thousands separators)


Regional numeric settings Unlike the numeric formatting preferences discussed in Chapters 2 and
(decimals and thousands 5, changing the custom regional numeric settings in a tree does not
affect the display of calculated values, but instead has implications for
separators) the input of numeric values.

The regional numeric settings specified in your operating system when


you open TreeAge Pro normally determine which character will be rec-
ognized as a decimal separator — usually either a “.” or a “,” — and
which, if any, it will accept as a thousands separator. For example, this
system setting is used to decide whether the entered number 1,375
should be interpreted as “1 + 375/1000” (comma = decimal separa-
tor) or as 1375 (comma = thousands separator). The operating system’s
regional settings are also used by TreeAge Pro to determine what deci-
mal and thousand separator characters are used in displaying calculated
values.

Tip:
Once a number is entered in the tree, it is interpreted and stored as a pure
number, without text elements (i.e., decimal, thousands separator, and K/M/B
characters). If numbers are always entered with the correct format for the
current operating system, the tree can always be opened and analyzed on
any computer, under any regional settings.

Chapter 12: More Tree-Building Tools 145


In TreeAge Pro, a tree can be set to override the operating system’s
regional numeric settings, allowing you to specify which characters to
use for decimal and thousands separators when entering values.

® To enable custom regional numeric settings in a tree:

s In the tree, choose Edit > Preferences…, and select the Other
Calc Settings category.

s Select the option labeled Use custom regional numeric settings,


and click the Separators… button.

s In the International Settings dialog, modify the Decimal sepa-


rator, Thousands separator, and Currency symbol settings as
necessary.

s Press ENTER or click OK to close the International Settings


dialog, and again, to close the Preferences dialog.

These settings will apply when this particular model is opened, modi-
fied, or analyzed on any computer, no matter what the operating sys-
tem’s regional numeric settings.

Replacing separators in existing numeric entries


It is possible to perform a bulk replacement of separator characters
in all tree formulas, thus modifying a tree for use under new regional
numeric settings. For example, if a tree was created using periods for
decimal separators and commas for thousands separators in all formulas,
this usage can be quickly reversed by updating existing numbers (i.e.,
commas as decimals, periods as thousands separators).

146 Part II: Working with Trees


® To perform a bulk replacement of separator characters:

s In the International Settings dialog, click Replace….

s In the Replace Numeric Separators dialog, select the appro-


priate option. Click OK to perform the replacement.

After performing a bulk substitution of separator characters, the


regional settings can also be modified, as described above, if necessary
(so that new numeric entries work correctly).

Note:
The bulk replacement of separators is permanent, and cannot be undone.
For this reason, it is strongly recommended that you save the tree (and even
save a copy of the tree) before performing a bulk replacement.

The default replacement option is to invert periods and commas. Using


this option will result in replacing all commas found in formulas (not in
node text or comments) with periods, and vice versa. You can also per-
form a custom character replacement operation, by setting up a series of
character replacement operations in all tree formulas.

® To perform a custom replacement of characters:

s Click Add… to create a step in the replacement operation.


Enter the appropriate characters in the Replace Characters dia-
log’s two text boxes, and click OK.

s Once the series is complete, click OK to perform the operation.

Chapter 12: More Tree-Building Tools 147


Probability wheel
Probability wheel A frequent problem encountered in decision analysis is the assignment
of subjective probability assessments to chance events. Many people
find it easier to use a graphical aid in assigning probabilities. One tool
designed for this task is a probability wheel.

As an example, the probability wheel could be used to aid in assign-


ing relative weights to the two outcomes of the risky investment in the
example tree used in earlier chapters.

® To set probabilities using the Probability Wheel:

s Select the chance node with branches.

s Choose Values > Probability Wheel….

s Drag the pointers around the edge of the wheel until the sizes
of the section match your best assessment of the relative likeli-
hood of outcomes.

s If the selected node has three or more branches, you will see
a check box named Keep proportions. If selected, ratios are
maintained on each side of the pointer you move.

The Probability Wheel works whether or not you have already assigned
probabilities to the branches. If you have assigned probabilities,
they will be used as initial values for the wheel. The chance node can
have up to seven branches; each branch will be assigned its own colored
portion of the wheel.

148 Part II: Working with Trees


Moving the mouse cursor over one of the pie wedges will change the
pointer into a magnifying glass, indicating that you can click the mouse
button to display the numeric value (probability) of the wedge. Right-
clicking will display that wedge’s starting value, at the t.

In addition to being able to store the probabilities numerically, in the


branches’ probability fields, variables can also be used (see Chapter
13). If you create variables before using the wheel, you can choose to
store each wedge’s value in one of three ways: numerically; as the “#”
remainder probability; or in a variable defined at the branch. You may
use # for only one branch.

The probability wheel is also available in the Define Variable window.


When you are defining a variable, you can call up the wheel to edit the
value of the variable. The numeric value will be inserted as the vari-
able’s value when you finish with the wheel.

Overriding the optimal path at selected nodes


Overriding the optimal path TreeAge Pro selects an optimal path at decision nodes based on the cal-
selection at selected nodes culation method preferences covered in previous chapters. At chance
nodes, multiple branches are included in the expected value calcula-
tion. There are a number of ways to override these behaviors at selected
nodes, however.

Chapter 12: More Tree-Building Tools 149


Force path
The Force Path command lets you force a particular outcome at a
chance node, or a particular choice at a decision node, by converting to
a logic node. Choosing Options > Force Path at a branch:
• converts the selected node’s parent to a logic node; and
• sets the logic condition/probability of the selected branch
to 1 and the other branches to 0.
When you have a complex tree and wish to indicate that a previously
uncertain event has taken place, select the branch that represents that
path and choose Options > Force Path.

It is recommended that you save a copy of your tree before forcing the
path at a node, so that you can easily recover the tree’s original state.

Change optimal path


At a selected decision nodes, you can force TreeAge Pro to apply the
opposite optimal path criterion to that specified in the tree’s preferences.

® To change the optimal path for a given decision node:

s Select the node.

s Select Options > Change Optimal Path.

s Click Yes in the confirming dialog.

The decision node will reappear with an arrow inside it. The arrow will
point upward if that decision node has been reset for maximization, or
downward if the node has been reset for minimization. If you reverse
the optimal path for an entire tree in which the optimal path of one or
more nodes has been individually changed, the arrows in all of the indi-
vidually changed nodes will reverse, signifying that they remain differ-
ent from the rest of the tree.

The reversal of a node’s optimal path can be undone by selecting the


node and then performing the operation described above a second time..

150 Part II: Working with Trees


Part
PartIIIIII
PART III: ANALYZING UNCERTAINTY USING VARIABLES AND DISTRIBUTIONS

ANALYZING UNCERTAINTY USING


VARIABLES AND DISTRIBUTIONS

The chapters in Part III focus primarily on representing uncertain tree parameters using
variables and distributions, and performing sensitivity analysis and Monte Carlo simulation.

The last chapter in Part III provides information on storing analyses that you may need to
repeat frequently and that require a complicated setup procedure (like sensitivity analysis
and Monte Carlo simulation).

Chapter 19 in Part IV covers the use of variables in creating complex cost formulas.

In this part:

• Chapter 13, "Introduction to Variables and Sensitivity Analysis"

• Chapter 14, "Working with Variables"

• Chapter 15, "Sensitivity Analysis Tools"

• Chapter 16, "Using Distributions and Monte Carlo Simulation"

• Chapter 17, "Tables and Table-Type Distributions"

• Chapter 18, "Storing Analyses and Analysis Sequences"


CHAPTER 13: INTRODUCTION TO VARIABLES AND SENSITIVITY ANALYSIS

CHAPTER 13

INTRODUCTION TO VARIABLES
AND SENSITIVITY ANALYSIS

This chapter provides a basic tutorial on the use of variables and one-
way sensitivity analysis in decision trees. Subsequent chapters cover
TreeAge Pro’s many useful tools for working with variables, as well as
more complex, multi-way and probabilistic sensitivity analysis.

In this chapter:

• Sensitivity analysis background.................................................. 154

• Using variables in a tree............................................................ 155

• Performing one-way sensitivity analysis....................................... 165

Chapter 13: Introduction to Variables and Sensitivity Analysis 153


Sensitivity analysis background
Sensitivity analysis Sensitivity analysis was introduced in Chapter 1 as a means of assess-
background ing the extent to which a model’s calculations and recommendations are
affected by uncertainty. The specific questions about parameters that
sensitivity analysis provides answers to are: 1) Is a model sensitive to a
particular uncertainty — e.g., does varying a parameter’s value result in
changes in optimal strategy? and; 2) If a model is sensitive to a particu-
lar uncertainty, at what value(s) of the parameter does the model recom-
mend a change in strategy?

Tip:
Sensitivity analysis can be used to look also for errors in complex formulas,
which might be indicated if changing the value of a parameter (even one that
is certain) does not have the anticipated effect on calculations.

In the investment decision modeled in Chapters 1—3, subjective esti-


mates for probabilities and payoffs were used. The resulting tree is
shown below, rolled back. The expected value calculations suggest that
the CD investment is optimal.

The basic uncertainty is that, at the time of the decision, the investor
cannot know what the price of the equity will be in one year. A simple
probability distribution — a chance node with three branches — rep-
resents a range of possible changes in the risky investment’s value.
Assuming that you have a mix of different expert opinions about the
risky investment, it would be useful to be able to perform sensitiv-
ity analysis on the related parameter uncertainties. The extreme, 10th
and 90th percentile values in the payoff distribution — a $600 decline
or $500 rise in value — are logical candidates for sensitivity analysis.
Another option is to vary the probabilities.

The tutorial in this chapter shows how to prepare a tree for sensitivity
analysis, how to perform a one-way sensitivity analysis, and how to
interpret the results. Chapter 15 covers multi-way sensitivity analysis
and tornado diagrams. Chapter 16 covers the use of probability distribu-
tions and Monte Carlo simulation to analyze models with complex or
numerous uncertainties.

154 Part III: Analyzing Uncertainty Using Variables and Distributions


Variables and sensitivity analysis
As demonstrated in previous chapters, TreeAge Pro can analyze a
decision tree based on numeric estimates for payoffs and probability
values. In order to perform sensitivity analysis on an uncertain quan-
tity, however, its numeric value must be replaced with a variable — a
named parameter. The next section of this chapter shows how to replace
numeric values in the tree with variables. This is a prerequisite to per-
forming sensitivity analysis in TreeAge Pro.

This chapter is designed to provide an introduction to the use of vari-


ables as they relate to performing sensitivity analysis. Chapters 14 and
19 provide more details on the use of variables in decision trees. The
information in these chapters can help you improve your productivity
when building complex decision trees, and also insure against costly
modeling errors.

Using variables in a tree


Using variables in a tree In TreeAge Pro, a variable is a named parameter which functions as a
placeholder for a numeric value (or a formula). Variables have a variety
of functions in TreeAge Pro, including:

• representing uncertain or unknown values, usually in


preparation for sensitivity analysis
• acting as placeholders for mathematical formulas that include
functions, tables, spreadsheet links, and other variables, for
example in defining a complex payoff
The tutorial in this chapter focuses on the use of variables as a basis for
sensitivity analysis. Chapter 19 will discuss the creation of payoff for-
mulas using variables.

When building complex models, variables are often used from the
outset. The investment decision tree has already been completed using
numeric payoffs and probabilities, however, so this tutorial will take a
different course, replacing existing numeric values with variables.

Tutorial Notes:
Some procedures explained in this chapter are not required steps for using
variables in the investment tree. Lines starting with the ccharacter are
required tutorial steps; other instructions start with the s character.

Chapter 13: Introduction to Variables and Sensitivity Analysis 155


Guidelines for naming variables
Variable names must conform to certain rules (similar to Microsoft®
Excel’s rules for naming cells). Each variable name must:

• begin with a letter or underscore character (“_”)


• contain only letters, numbers, and underscore characters
• be no longer than 32 characters

TreeAge Pro will alert you if try to use an invalid variable name.

It is recommended that you follow some kind of naming convention


when creating variables in a particular model. For example, you could
use the prefix “prob” or “p_” for probability variables, “c” for cost vari-
ables, and so on.

Variable names are not case-sensitive. For example, the names probUp,
PROBUP and probup are equivalent; prob_UP would be a different vari-
able, however, since it includes an extra character.

Steps for using variables


There are three basic steps to remember when using a new variable in a
decision tree:

1) CREATE — decide on a name for the variable, following


the naming guidelines outlined above, and add it to the list of
variables in the tree;
2) DEFINE — assign a value or formula to the variable; and
3) USE — substitute the variable name for the corresponding
value in the tree.
TreeAge Pro offers many methods for completing these steps, in prepa-
ration for sensitivity analysis; this chapter illustrates a few possible
approaches.

Tip:
A common method of setting up variables which is not illustrated in this
chapter is to create and define lists of variables before creating the structure
of the tree and using the variables.

156 Part III: Analyzing Uncertainty Using Variables and Distributions


Creating and defining variables
As explained at the beginning of this chapter, there are two immediately
apparent sensitivity analysis approaches in the investment model: vary
the extreme probabilities or the extreme payoff values. To start, let’s try
varying the branch probabilities of the extreme outcomes of the payoff
distribution.

The first step is to replace the numeric probabilities of the Large


increase and Large decrease branches with a variable placeholder. One
method of adding a variable to the tree is to simply type a new variable
name into a probability, payoff, or other expression.

® Defining a new variable: (Method 1)

c Open the Stock Tree created in Chapter 2. Or, locate the copy
of this file included in the Tutorial Examples\_backup\ subdi-
rectory of the TreeAge Pro program directory.

c Save a copy of the file; call it Three Variables.


c Changes cannot be made to the tree’s values or structure while
it is rolled back. If the tree is currently rolled back, choose
Analysis > Roll Back to turn off roll back and allow variables
to be added to the tree.

c Select the Large increase terminal node and press the TAB key
to edit the probability. Or, simply click with the mouse in the
probability editor, below the branch line.

c Delete the numeric probability of 0.3, and in its place type a


new variable name prob_extreme.

c Press TAB (or click outside the node) to have TreeAge Pro
check the changes you made to the probability expression.

Chapter 13: Introduction to Variables and Sensitivity Analysis 157


TreeAge Pro does not recognize the name you entered in the probabil-
ity editor, and will assume that you want to create a new variable. A
Properties dialog will be displayed for the new variable, in which you
can describe and numerically define this parameter. For now, turn your
attention to just the top section of the dialog.

c Check the box labeled Define numerically (at root), and enter
the baseline value of 0.3 (or 30%) in the Value box. Optionally,
you can enter a description for the variable; the sensitivity anal-
ysis range can be defined later, at the time of analysis.

c Press ENTER or click OK to save the variable properties and


return to the tree. (Press CANCEL if you do not wish to create the
variable, for instance if the name was typed incorrectly.)

The name “prob_extreme” has been added to the list of recognized vari-
ables names in the tree, and it has been assigned a default numeric value
of 0.3 at the root node.

In a tree, a value (or formula) assigned to a variable is called a defini-


tion, and each variable definition is associated with a particular node,
which determines where the definition will apply in the tree. The root
node definition of prob_extreme, for example, applies at the root node
and everywhere to the right, including at the Large increase terminal
node, where the variable is already referenced, and at the Large decrease
node, which must now be updated to use the variable.

158 Part III: Analyzing Uncertainty Using Variables and Distributions


c Make the same change to the Large decrease terminal node.
Delete its numeric probability of 0.3.

c Instead of typing the variable name prob_extreme, you can


choose Values > Insert Variable…(or press CTRL+i). TreeAge
Pro will either display a list of variables to choose from, or
automatically insert the variable that matches a partial name
that you have entered.

c Press TAB (or click outside the node) to update the probability
for this branch.

In this case, TreeAge Pro does not prompt you to create the variable
prob_extreme, since the tree already includes a variable with this name.

Finding and fixing problems with definitions


The variable definition, prob_extreme = 0.3, should be visible at the
root node of the tree. If the definition is not visible below the root node,
as in the above picture, it does not mean that the definition does not
exist. The first thing to check is whether the display of variable defini-
tions has been turned on in the tree’s preferences.

® To display variable definitions in the tree:

s Select Edit > Preferences…, and choose the Variables Display


category from the list .

s Make sure the option labeled Show definitions is checked.


Select either Expand node… or Wrap at…, if desired. Ignore
the other settings for now.

s Press ENTER or click OK to return to the tree.

If the tree is set to display variable definitions, but the definition


prob_extreme=0.3 does not appear at the root node, determine whether
the variable was created (i.e., added to the tree’s list of recognized

Chapter 13: Introduction to Variables and Sensitivity Analysis 159


names). The list of tree variables can be viewed (and modified) in a
number of ways; a quick way to access the variables list is by right-
clicking on a node (in this case, try the root node).

® To view the list of tree variables in a “quick” menu:

s Right-click on the root node and choose Define Variable.

s If any variables exist in the tree, their names will be listed


(below the New… command).

If you do not see prob_extreme in the variables list, choose the New…
command to add the variable to the tree and define it at the selected
node. If prob_extreme already appears in the list, choosing its name
from the quick menu list will open a window to enter a definition. Using
this method to define variables will be described in this chapter.

Adjusting complementary probabilities


Our changes to the probabilities in Three Variables tree are not com-
plete. If the value of the variable prob_extreme is changed, for example
during sensitivity analysis, the probabilities at the chance node will no
longer sum to 1.0 — unless a change is made to the 0.4 probability at
Small increase.

The two options are to define Small increase’s probability in terms of


the new variables (“1-prob_extreme*2”) or to use TreeAge Pro’s auto-
matic complement calculator (“#’). We’ll use the second option.

® To assign a remainder expression to a probability:

s Delete the numeric 0.4 probability of the Small increase node.

s Replace it with # (a hashmark), which will still calculate as 0.4


unless the definition of prob_extreme changes.

Now, if we change the value of prob_extreme to 0.25, the probability


of Small increase will automatically be recalculated as 1 - 0.25 - 0.25,
or 0.5, and the chance node’s probabilities will continue to be coherent
(sum to 1.0).

160 Part III: Analyzing Uncertainty Using Variables and Distributions


Once prob_extreme has been defined and used properly, and the chance
node’s probabilities have been adjusted appropriately, you could skip
ahead to the section on performing sensitivity analysis, and try analyz-
ing the impact of this uncertainty on your decision.

The tutorial continues at this point, however, by illustrating more ways


of creating variables — in this case, to represent uncertain payoffs.

Creating and defining variables before using them


The previous section briefly introduced the use of the right-click, quick
menu’s Define Variable commands. Now, try using these commands to
define payoff variables.

Assigning variables in payoffs instead of numbers provides similar ben-


efits to using variables in probabilities. By using variables, components
of payoffs can be subjected to sensitivity analysis (and updated more
easily). Chapter 19 will show how to create more complex payoff for-
mulas, in order to separate the payoff calculation into components like
principal, interest rate, and rate of return. In the current exercise, how-
ever, simple payoff variables will be used, rather than formulas.

Start by creating a variable called “pay_up” to represent the payoff of


the Large increase node, and defining it at the root node (default for the
tree) before using the variable in a payoff.

® To define a new variable at a specific node: (Method 2)

s Right-click on the root node, and choose Define Variable >


New….

s In the dialog that appears, type pay_up for the new vari-
able’s name, and click OK or press ENTER.

Chapter 13: Introduction to Variables and Sensitivity Analysis 161


s In the Define Variable window that appears, enter the value of
500, and click OK or press ENTER to return to the tree.

If the display of variable definitions is turned on in the tree’s prefer-


ences, this new variable’s definition should be visible below the root
node.

The variable pay_up has been defined, but it has not yet been referenced
in the appropriate tree calculation: the payoff at the Large increase node.
Complete this step now.

s Either double-click on the Market up node, or select the node


and choose Values > Change Payoff….

s Delete the existing expression, the numeric 500, and either type
pay_up or select the variable from the list labeled Variables.
Click OK or press ENTER.

Now let’s add a second payoff variable, for the Large decrease termi-
nal node. We’ll create a new variable called pay_down to represent the
payoff (loss) of this scenario. This time, we’ll use the Variables and
Tables dialog.

162 Part III: Analyzing Uncertainty Using Variables and Distributions


® To define a new variable: (Method 3)

s Choose Values > Variables and Tables..., or click on the V=


button in the toolbar.

s Click the Add New... menu button, and choose Variable.

s In the Properties dialog for the new variable, enter the name
pay_down. Check the option labeled Define numerically (at
root) and enter -600 in the Value box.

s Click OK or press ENTER to return to the Variables and Tables


dialog.

The new variable, pay_down, should appear in the list of variables,


along with prob_extreme and pay_up.

The payoff at the Large decrease node still needs to be updated, to use
the variable pay_down.

s Click Close or press ESC to close to the Variables and Tables


dialog and return to the tree.

s Either double-click on the Market down node, or select the


node and choose Values > Change Payoff….

s Delete the existing numeric payoff, -600, and either type


pay_down or select the variable from the drop-down menu
labeled Variables. Click OK or press ENTER to return to the tree.

Chapter 13: Introduction to Variables and Sensitivity Analysis 163


The updated tree is shown below.

Note:
Both the right-click menu and the Variables and Tables dialog can be used to
define a variable at a node other than the root node. When you are learning
how to use variables for the purposes of sensitivity analysis in TreeAge Pro,
however, it is recommended that you make all numeric definitions at the
root node. This will help avoid errors during sensitivity analysis, and when
making changes to the definitions.

Before continuing with the sensitivity analysis tutorial, take a moment


to save the changes you have made to the Three Variables tree.

s Select File > Save.

Performing sensitivity analysis


Performing sensitivity TreeAge Pro can perform sensitivity analysis at a selected node using
a range of values for a single variable (one-way sensitivity analysis) or
analysis across ranges of values for two or three variables simultaneously (multi-
way sensitivity analysis). This chapter will cover one-way sensitivity
analysis. Multi-way sensitivity analysis, and other advanced sensitivity
analysis topics, are described in Chapter 15.

Start by analyzing the sensitivity of the decision to changes in the prob-


ability variable, prob_extreme.

® To perform a one-way sensitivity analysis:

s Open the Three Variables tree you created in the previous sec-
tion (or find the copy of this file called Three Vars found in the
Tutorial Examples subdirectory).

s Select the decision node.

s Choose Analysis > Sensitivity Analysis > One Way...., or click


the toolbar button.

164 Part III: Analyzing Uncertainty Using Variables and Distributions


s In the Sensitivity Analysis dialog, click on the Variable pop-up
menu, and change the variable to prob_extreme.

Tip:
If you specified a low and high value in the variable’s Properties dialog
when it was created, that range will be shown in the Sensitivity Analysis
setup dialog. Otherwise, the baseline value will be shown for both low and
high values.

Setting the sensitivity analysis range


The current definition of prob_extreme is 0.3. Recall from earlier in the
chapter that our initial interest in sensitivity analysis with the Stock Tree
is to test different probability assumptions for the risky investment. For
instance, we would like to vary the probability estimates for the extreme
outcomes at least from 0.25 to 0.3.

To make the sensitivity analysis more comprehensive, however, we


could try the entire possible range for the variable prob_extreme. The
tree fragments at left illustrate the concept.

Remember that prob_extreme is used in two branches, with the


remainder (or complement) assigned to the middle branch. If we set
prob_extreme to 0 (top subtree), the remainder calculated for the Small
increase branch will be 1.0. So, prob_extreme=0 can be the minimum
value for the sensitivity analysis. If we try to set prob_extreme to any-
thing above 0.5, probability coherence errors will occur — for instance,
at prob_extreme = 0.501 the extreme branches sum to greater than 1.0.
The maximum possible value for the variable therefore is 0.5 (bottom
subtree). The key estimates for prob_extreme, 0.25 and 0.3, are found
within this range.

Chapter 13: Introduction to Variables and Sensitivity Analysis 165


Set the sensitivity analysis range now.

s Type 0 for the Low value, and 0.5 for the High value.

s Change the number of intervals to 10. Dividing the range into


10 intervals results in 11 recalculations at the decision node, for
prob_extreme equal to 0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35,
0.4, 0.45, and 0.5.

s Press ENTER or click OK to begin the analysis.

TreeAge Pro should immediately begin the analysis. If the analysis were
a long one, you could monitor its progress in the status bar at the bottom
of the TreeAge Pro window. When it is complete, a graph is displayed.

166 Part III: Analyzing Uncertainty Using Variables and Distributions


If the analysis does not complete due to errors, read the error message
and make note of the node where TreeAge Pro reports a problem. Most
likely, the problem is either to wide a range for the uncertain variable,
or a problem with the assignment of probability variables in the chance
node branches.

The sensitivity analysis graph and report


Because the analysis was done at the decision node, there should be two
lines corresponding to the two alternatives, Risky investment and CD
paying 5%. Each alternative’s expected value is plotted as a function of
the increasing value of prob_extreme.

Each strategy’s line is composed of line segments connecting the line


marker symbols that identify that alternative’s expected value at suc-
cessive intervals of the analysis. A legend to the right identifies the
symbol assigned to each particular alternative, and any threshold values
(explained below).

Deviations of a line from the horizontal indicate sensitivity to the vari-


able. An alternative represented by a horizontal line in the graph, as the
CD paying 5% option is in the example, are unaffected by the changes
in the variable. In contrast, the payoff represented by the Risky invest-
ment line is an decreasing function of the variable.

Tip:
If the trend of a line in the graph does not make intuitive sense, this may
indicate a problem with the definition or use of the variable in the model.

The analysis text report can be opened either by clicking the Text
Report button, or by choosing Graph > Text Report.

The visual elements of the one-way sensitivity analysis graph, like


other line graphs, can be customized in a number of ways, as described
in Chapter 6. This includes changing graph size, texts, line markers,
and numeric formatting. The Options button and Graph menu provide
access to many customization options.

Chapter 13: Introduction to Variables and Sensitivity Analysis 167


The Threshold Values legend
The sensitivity analysis results require some interpretation. If two lines
in the graph intersect, at the corresponding value of the variable these
two alternatives have the same expected value. Crossing points that rep-
resent a change in the optimal strategy are known as thresholds. From
the standpoint of expected value, the decision maker should be indiffer-
ent between the two options at that variable value.

The sensitivity analysis graph will, if necessary, include a Threshold


Values legend which identifies crossing points, displaying:

• the symbols for the lines which cross;


• the value of the variable at the crossing point; and
• the expected value at the crossing point.

In the graph, at every threshold point a dashed line drops down to the
horizontal axis.

Interpretation usually requires simply looking at what happens to the left


and right of the threshold. In the example analysis on prob_extreme, the
lines for the two options cross, according to the threshold legend, when
the variable equals 0.17. For values of prob_extreme higher than that
(such as our baseline 0.3 probability), the CD has a higher return and is
therefore optimal. For values of prob_extreme less than 0.17, however,
Risky investment is optimal.

In this analysis, the threshold is not close to our two best estimates, 0.25
and 0.3, suggesting that the model is not very sensitivity to this particu-
lar uncertainty.

The only aspects of the threshold legend which can be modified (indi-
rectly) are the two numeric formats; if you change the numeric format of
either axis, the format of the corresponding item in the threshold legend
will be adjusted automatically. None of the threshold legend text may be
directly changed, as these are calculated values. Threshold information
may be hidden by deselecting the Options dialog check box labeled Dis-
play Threshold Values. This will remove all dotted lines and the entire
threshold legend.

168 Part III: Analyzing Uncertainty Using Variables and Distributions


A caveat on thresholds
If all of the lines in a sensitivity analysis graph are straight, the thresh-
old analysis in the graph will be accurate. However, if any lines appear
to be curved, the threshold analysis is approximate, and its accuracy will
depend on the width of the intervals used. The analysis performs cal-
culations only at the ends of the N number of intervals specified when
running the analysis. The lines plotted on the graph are accurate at these
N+1 discrete points, but not necessarily in between (e.g., if an alterna-
tive’s expected value is an exponential or other non-linear function of
the variable’s value).

The sensitivity analysis graph will not recognize a threshold if the opti-
mal strategy is the same at both ends of the interval, but changes back
and forth within the interval. The likelihood of this error can be reduced
by increasing the number of intervals, thus reducing their width.

Tip:
A more sophisticated, non-graphical form of threshold analysis is described
in Chapter 15. This chapter also includes more information on one one-way
sensitivity analysis and other kinds of sensitivity analysis.

Chapter 13: Introduction to Variables and Sensitivity Analysis 169


170 Part III: Analyzing Uncertainty Using Variables and Distributions
CHAPTER 14
CHAPTER 14: WORKING WITH VARIABLES

WORKING WITH VARIABLES

This chapter expands on the aspects of TreeAge Pro’s variables


interface introduced in the Chapter 13, and also introduces a number
of other important windows, dialogs, and other tools that facilitate
working with variables in trees.

Chapter 19 will provide details on building complex variable formulas.

In this chapter:

• The Variables Report................................................................. 172

• Variables testing tools............................................................... 173

• The Insert Variable command..................................................... 175

• The Variables window............................................................... 176

• The Variables and Tables dialog.................................................. 179

• The Define Variable window ...................................................... 182

Chapter 14: Working with Variables 171


The Variables Report
The Variables Report The Variables Report can be used to display and export a complete list
of all the variables in your tree, along with their descriptions, comments,
sensitivity analysis, formulas and numeric values.

® To create a variables report:

s Choose Values > Reports > Variables….

s In the Variables Report setup dialog, specify the information to


include, then click OK or press ENTER to display the report.

By changing the report options, you can control what is included in the
report. For example:

• Unchecking the Variable name option will result in variables


being identified by their short description in the report.
• To show only numeric values in the report, select the option
labeled Numeric value, and uncheck the option labeled
Formula.
• Unchecking the option labeled Include formula/value from
root node... will cause no definitions to be displayed for
variables with multiple definitions; leaving it checked will
enable a root node definition to be displayed, if one exists.
The report is displayed initially in a text report dialog; it can then be
copied and pasted (or exported) into a spreadsheet or other document.

172 Part III: Analyzing Uncertainty Using Variables and Distributions


Variables testing tools
Variables testing tools In addition to using TreeAge Pro’s Analysis menu commands to see the
results of node calculations, it is also important to know how to use the
tools TreeAge Pro provides for testing individual variables.

The Calculator/Evaluator
It is often useful to know how a formula, such as a variable definition,
will calculate at a specific node. The Calculator/Evaluator is designed
expressly for this purpose. It will perform any calculation you enter
as if it were part of a payoff or probability calculation occurring at the
selected node during an analysis. References to tables and functions can
be included.

® To calculate a variable or formula at the selected node:

s Select a node and choose Values > Open Calculator/Evaluator.

s Type a variable name or formula in the Expression field, or


insert a variable using the Variables pop-up menu.

s Click on the Calculate button.

If the expression can be calculated at the selected node, the result will
be displayed.

Since the evaluator calculates the entered expression at the currently


selected node, changing the selection in the tree window while leaving
the Calculator/Evaluator open allows you to quickly test the same calcu-
lation at different nodes. The result may change, depending on the defi-
nitions of variables that exist at, or to the left of, the selected node.

Chapter 14: Working with Variables 173


Variable sliders
As described in Chapter 13, sensitivity analysis automatically recal-
culates a model for a range of values of a variable. TreeAge Pro also
makes it easy to manually increment a variable’s value over a specified
range using a tool called a Slider.
A slider can be used to quickly modify one or more variable’s values,
without having to repeatedly open Define Variable windows. At each
interval, you can perform a specialized calculation or analysis that
is not part of a regular sensitivity analysis — for example, using the
Calculator/Evaluator or generating a probability distribution.

® To create a slider to control a variable:

s Select the node at which a variable is defined and choose


Values > Create Slider….

s In the Create Slider dialog, select a variable from the pop-up


menu and specify a value range and a number of intervals.
Click OK to display the Slider tool.

s To use the Slider, click a directional arrow or drag the slid-


ing bar to change the value of the variable within the specified
range.

174 Part III: Analyzing Uncertainty Using Variables and Distributions


With the Slider open, you can perform any analysis on the model
(including roll back) based on the value of the variable shown in the
Slider. The changes to the variable’s value will apply only until the
Slider is closed or a regular sensitivity analysis is performed on the
chosen variable.

If you click the Show Nodes button, TreeAge Pro will activate the tree
window and reselect the node on which the slider is operating.

Tip:
For another kind of manual sensitivity analysis, see the information on stored
analysis sequences in Chapter 18.

The Insert Variable dialog


The Insert Variable While the text cursor is in a probability editor or other expression editor
command (e.g., an Enter Payoff or Define Variable window), the Values > Insert
Variable command can be used to automatically insert the name of a
variable into a formula.

If you know the first few characters of the variable name you wish to
insert, you can optionally type them prior to choosing Values > Insert
Variable (or using the keyboard shortcut CTRL+i). If only one variable
name matches what you have typed so far, that variable name will be
inserted automatically (without displaying the Insert Variable dialog).

Otherwise, the Insert Variable dialog will be displayed, allowing you to


choose from the list of possible matching variables.

Chapter 14: Working with Variables 175


The Variable Definitions window
The Variable Definitions The Variable Definitions window is a powerful tool that includes vari-
ables-related functionality not found in TreeAge Pro’s other vari-
window
able tools. It is linked to the variable definition boxes displayed below
branches in the tree, also providing a view of the definitions at a node.
In addition, the Variable Definitions window can be used to:

• define an existing variable using the Variables pop-up menu


• edit an existing definition by double-clicking on it
• cut, copy, or paste selected definitions using the Edit menu
• view definitions in the path back to the root node
• view tracker variables’ initial values
• view and edit named distributions
There are a number of ways to open the Variable Definitions window at
a node.

® To open a Variable Definitions window:

s If definitions are displayed below a branch in the tree (a tree


preference), double-clicking on the box of definitions will open
the Variable Definitions window.

s The Variable Definitions window can always be


opened by selecting a node and choosing Values
> Show Variable Definitions Window (or click the
double V= tool bar button).

The Variable Definitions window can be resized. Simply click and drag
an edge of the window to adjust its size; click and drag on the title bar
of a window to move it.

Updating and adding variable definitions


Using the Variable Definitions window, you can edit, add, or remove
single definitions at the selected node, as well as move to a different
node.

® To edit an existing variable definition:

s Scroll down if necessary, and double-click on a definition in


the list to open a Define Variable window (see below).

176 Part III: Analyzing Uncertainty Using Variables and Distributions


Existing variables not yet defined at the selected node will appear in the
pop-up menu above the definition list box.

® To add a definition to the node:

s Select the variable from the pop-up menu.

While working in the Variable window, the Variables and Tables dialog
can be opened by clicking on the V= toolbar button, or by choosing
Values > Variables and Tables.

Changing the node selection


The navigation arrow buttons at the top of the Variable Definitions
window work the same way as the arrow keys. The buttons allow you
to move the selection one node at a time in any direction and show that
node’s list of definitions in the Variable Definitions window.

Using the Show inherited option


The Variable Definitions window always lists the definitions at the
selected node. Also relevant, however, are the definitions made at nodes
to the left (if the selected node is not the root node).

® To display inherited definitions and global values:

s Select the Show Inherited checkbox in the Variable Definitions


window.

If definitions exist at nodes to the left, beneath the definitions at the


selected node will appear a dashed line followed by the name of the
node to the left. Beneath this line is displayed the list of definitions from
that node. The window will continue listing nodes and their definitions
in the path back to the root node. The window will show only the first
definition of a variable found in the path back to the root node, thus pre-
senting the definitions which are generally relevant to calculations the
selected node.

Beneath the lists of regular node definitions the window will display
any globally-defined names — tracker variables, or distributions that
have a variable-type name assigned to them. Double-clicking on a
named distribution will open the Distributions dialog.

Chapter 14: Working with Variables 177


Cut, copy, and paste definitions
Groups of variable definitions can be cut or copied from a node, and
new or updated definitions pasted into a node, using the Variable Defi-
nitions window. These lists of definitions can be transferred to or from
a spreadsheet or text editor, or between nodes in the same or different
trees.

Definitions are placed onto the clipboard as tab-delimited text, with


a column for variable names and another for definitions (with no “=”
between them).

® To copy or cut variable definitions from a node:

s Select a node and choose Values > Open Variable Definitions


Window.

s To copy or cut a subset of the definitions shown, hold down the


CTRL key while selecting individual definitions and choose Edit
> Copy Variables or Edit > Cut Variables.

s If you do not select any definitions, the Copy Variables com-


mand will include all definitions, while the Cut Variables com-
mand will be unavailable. If the Cut Variables command is
used, the selected definitions are placed on the clipboard and
removed from the node.

If you paste into a spreadsheet, you can make changes to definitions and
then copy the two columns (names and definitions) to be pasted back
into TreeAge Pro’s Variable Definitions window.

The Paste Variables command is available when the Variable Definitions


window is open at a node and a properly-formed, tab-delimited list of
definitions has been copied to the clipboard.

® To paste variable definitions at a node:

s Open the Variable Definitions window at a node, and choose


Edit > Paste Variables.

178 Part III: Analyzing Uncertainty Using Variables and Distributions


Definitions pasted from the clipboard will overwrite any existing defini-
tions of the same variables found at the selected node.

If a variable in the pasted list does not yet exist in the tree, it will be cre-
ated.

The Variables and Tables dialog


The Variables and The easiest way to create a variable and to add, modify, or remove a
definition is using the right-click menu’s Define Variable commands. In
Tables dialog this chapter and the previous one, three other methods of creating new
variables have been described: 1) type a new variable name in a proba-
bility or payoff; 2) paste definitions into a Variable Definitions window;
and 3) use the Variables and Tables dialog.

The Variables and Tables dialog is not always the most efficient way to
create and define variables. It is, however, a powerful and flexible tool.
This section describes a number of tasks possible only in the Variables
and Tables dialog:

• a variable can be deleted from the tree


• a variable can be renamed
• multiple variables can be defined at once
• a variable can be defined at multiple selected nodes

Selecting multiple variables at once


In the Variables and Tables dialog’s list of variables, there are two ways
to select multiple variables.

® To select any subset of variables:

s Hold the CTRL key while clicking, one after another, on each of
the variables to be selected

® To select a contiguous set of variables:

s Click on the first variable in a group and hold down the SHIFT
key while clicking on the last variable.

The selected variables can then be deleted, or defined (in which case
separate Define Variable windows will be opened for each variable).

® To modify or remove a definition of a variable:

s Select the node at which the variable is currently defined, and


choose Values > Variables and Tables.

Chapter 14: Working with Variables 179


s In the Variables and Tables dialog, select the variable (or vari-
ables), click Define Value…, and choose either At Selected
Node or Default for Tree.

s Make changes in the Define Variable window and press ENTER


or click OK to close the window.

s To remove the definition from the node, click the Delete Defi-
nition button.

Deleting a definition of a variable does not delete the variable from the
tree. It is possible for the variable to be removed from the tree alto-
gether, along with any definitions you have created for it.

® To delete a variable and its definitions from a tree:

s Select the unwanted variable(s) from the Variables and Tables


list and click the Delete… button.

While deleting a variable from the tree removes all definitions of the
variable from the tree, references to the deleted variable will not be
removed from payoffs, probabilities, and other variable definitions.
If such formulas are not corrected, your model may generate an error
message upon calculation. See Chapter 12 for information on using the
Find/Replace command to search for a variable’s name in the tree.

The Properties dialog


The Properties dialog appears when you create a new variable using the
Variables and Tables dialog, or by typing the new variable name directly
in a probability or payoff. You will also see this dialog when you select
an existing variable and click the Properties button in the Variables and
Tables dialog.

One common use of the Properties dialog is for renaming a variable (as
an alternative to deleting a variable from the tree and creating a new one
with the desired name).

® To rename an existing variable:

s Select the existing variable in the Variables and Tables list and
click the Properties… button.

s Change the Name property, and close the dialog.

The name change will cascade throughout the tree, updating all defi-
nitions of the variable, as well as all references to the variable.

180 Part III: Analyzing Uncertainty Using Variables and Distributions


Variable properties are divided into three groups: basic properties, prop-
erties for sensitivity analysis, and tracking properties.

Each variable has three basic text properties: the variable name, a short
description, and a long comment. The variable’s name must conform
to naming rules, as described in Chapter 13. The short description is
optional; it is used in graphs. The long comment can be used to hold
notes that memorialize a variable’s meaning or sources.

The basic properties group also includes a check box labeled Show in
Tree, which is checked by default. If you clear the check box, the defi-
nitions of this variable will remain hidden when variable definitions are
displayed in the tree (a tree preference).

If the check box labeled Define numerically is selected, a number can


be entered in the Value editor to use in a definition of the variable at the
root node.

Low and high values entered in the sensitivity analysis section of the
dialog will be used as the suggested range for the variable in sensitivity
analysis setup dialogs.

Correlations can be set up between any number of pairs of existing vari-


ables. When a sensitivity analysis is performed on a variable correlated
to another variable, the option is presented to simultaneously vary cor-
related variables over their own value ranges.

® To define variable correlations:

s Click on the Correlations... button in the Properties dialog.

s In the Correlations dialog, select the variable to correlate with


from the list on the left, and click the >> button to move it into
the list on the right.

Chapter 14: Working with Variables 181


s In the New Correlation dialog, select the appropriate type of
correlation (either perfectly positive or negative). Click OK to
return to the Correlations dialog, and then close it.

The linked variables will now be listed to the right of the Correlations
button, with plus or minus symbols indicating the type of correlation.
The identical correlation will show in the properties of the two corre-
lated variables. The correlation can be modified or removed from either
variable’s Properties dialog.

® To remove a correlation:

s In the Properties dialog for either of the correlated variables,


click on the Correlations... button.

s In the Correlations dialog, select the correlated variable from


the list on the right, and click the << button to remove it from
the list.

To change a correlation’s type (e.g., from negative to positive), you


must remove the existing correlation and recreate it with the proper cor-
relation.

The Define Variable window


The Define Variable The Define Variable window provides a variety of aids for building
complex formulas. To insert an existing variable, simply select it from
window the Variables pop-up menu. The Define Variable window’s Functions
pop-up menu lists TreeAge Pro’s many built-in functions, and includes
a Function Helper to walk you through the steps of properly setting up
any function.

182 Part III: Analyzing Uncertainty Using Variables and Distributions


Using functions and the Function Helper
TreeAge Pro includes numerous functions, like If(), NPV() and
Discount(), with which you can create complex expressions. To use a
function in a formula, simply type its name followed by the required
parameters in parentheses. If you are in a Define Variable window or
other expression editor, you can select the function’s name from the
Functions pop-up menu. An advantage of using the pop-up menu is that
TreeAge Pro will automatically add the required parentheses and place
the cursor between them, ready for you to enter the appropriate function
arguments.

The Function Helper, available at the bottom of the Functions pop-


up menu, lets you select a function from the list and then guides you
through setting up the function properly, prompting for the requisite
arguments and entering them in the formula in the correct order.

Like variables, functions’ names are not case-sensitive and, in most


cases, take arguments inside the parentheses. For functions which allow
multiple arguments, the arguments must be separated by semicolons
(“;”).

Refer to the Function Helper and Appendix D of this manual for a full
list of functions available in TreeAge Pro.

Chapter 14: Working with Variables 183


184 Part III: Analyzing Uncertainty Using Variables and Distributions
CHAPTER 15
CHAPTER 15: SENSITIVITY ANALYSIS TOOLS

SENSITIVITY ANALYSIS TOOLS

Chapter 13 provided detailed instructions on representing uncertain


values using variables and performing one-way sensitivity analysis. This
chapter covers multi-way sensitivity analysis, as well as variations on
one-way sensitivity analysis.

In this chapter:

• Analyzing variables with multiple definitions ................................ 186

• Tornado diagrams .................................................................... 188

• Two-way sensitivity analysis ...................................................... 191

• Three-way sensitivity analysis .................................................... 195

• Threshold analysis.................................................................... 196

• Analyzing a single alternative .................................................... 199

• Analyzing correlated variables.................................................... 200

• Checking probability coherence .................................................. 202

Chapter 15: Sensitivity Analysis Tools 185


Analyzing variables with multiple definitions
Analyzing variables with While first learning how to use variables, it is not uncommon to uninten-
multiple definitions tionally end up with a variable defined numerically at multiple nodes.
While there are good reasons why TreeAge Pro allows the same variable
to be defined at multiple nodes — reasons described in Chapter 19 —
this situation is neither necessary or desirable with a variable intended
for sensitivity analysis, as it may result in errors.

Here is an illustration of the problem; note the two numeric definitions


of pay_up:

If you try to perform a sensitivity analysis on the variable pay_up in this


version of the investment tree, TreeAge Pro cannot immediately run the
analysis — not without more input, to clarify which definition should
vary during the analysis. Therefore, the following dialog will appear.

Your goal when learning to use variables for sensitivity analysis should
be to avoid ever having to use this dialog, as it may be difficult to avoid
making errors in choosing which definitions should be varied in the sen-
sitivity analysis. The solution, in this case, is to delete one of the defini-
tions of pay_up.

186 Part III: Analyzing Uncertainty Using Variables and Distributions


Recommendation: If you plan to carry out sensitivity
analysis on a variable’s value, ensure that the variable has
a single numeric definition (e.g., define it only at the root
node, or only at one of the decision node’s branches).

Following this guideline will also help you avoid errors in non-sensitiv-
ity analyses. For example, in the version of the investment tree shown
on the previous page, changing the definition of pay_up at the root node
will have no impact on payoff calculations. TreeAge Pro will use only
the definition of a variable that is closest to the node being calculated, a
terminal node in this case. This point is critical to understanding how to
use variables in TreeAge Pro.

Concept: When TreeAge Pro calculates a payoff or


probability that references a variable, it looks for a
definition of the variable starting at the node being
calculated and, if necessary, moving to the left (i.e.,
toward the root node). TreeAge Pro uses the first
definition found during this right-to-left search.

For a variable used in a payoff, TreeAge Pro looks for a definition start-
ing at the terminal node. In the case of a variable used in a branch’s
probability, the search for a definition begins at that branch.

Here is another simple but instructive example based on the investment


tree, this time using variables for Risky investment’s payoffs. Again,
there is a problem with a variable having multiple numeric definitions.

While this version of the investment tree will roll back correctly, it
is not well-formed for sensitivity analysis. The variable “return” is
defined four times, once for each scenario. For this reason, performing
a sensitivity analysis will not be straightforward.

Chapter 15: Sensitivity Analysis Tools 187


A better design would be like that used in the Three Variables version
of the tree, from Chapter 13, with different variables for each uncertain
payoff. If it were necessary or desirable to define all payoffs using the
same variable, another option would be to not define return numerically.
Instead, it could be defined equal to other variables, as shown below.

In this case, the three numerically-defined variables would be used for


sensitivity analysis.

More details on defining variables in terms of other variables is pro-


vided in Chapter 19, Building Complex Formulas Using Variables.

Tornado diagrams
A tornado diagram is a set of one-way sensitivity analyses brought
Tornado diagrams together in a single graph. It can include any number of the variables
defined in the tree. In the resulting graph, a horizontal bar is gener-
ated for each variable being analyzed. Expected value is displayed on
the horizontal axis, so each bar represents the selected node’s range of
expected values generated by varying the related variable. A wide bar
indicates that the associated variable has a large potential effect on the
expected value of your model.

The graph is called a tornado diagram because the bars are arranged in
order, with the widest bar (the most critical uncertainty) at the top and
the narrowest one at the bottom, resulting in a funnel-like appearance.

The example tree Airline Problem is ready for a tornado diagram. The
model is a simple cost function, each of whose inputs may be varied to
see how each may affect the expected value.

® To create a tornado diagram:

s Select the decision node and choose Analysis > Sensitivity >
Tornado Diagram.

188 Part III: Analyzing Uncertainty Using Variables and Distributions


s In the Tornado Diagram setup dialog, select each variable to
analyze and click the Add >> button. This will move the vari-
able to the list on the right, and prompt you for a range and
number of intervals for that variable.

s Click OK to start the analysis.

The tornado diagram for the airline decision is shown below.

Each bar represents a one-way sensitivity analysis performed at the


selected node. The tornado diagram includes a vertical dotted line indi-
cating the expected value. You can use this as a visual fulcrum, to view

Chapter 15: Sensitivity Analysis Tools 189


the impact of each variable relative to the original (baseline) expected
value.

If you click any bar once and hold down the mouse button, you will
see the input and output range for that parameter. The input range is the
range over which you varied the associated variable. The output range is
the resulting range of expected values when the variable is varied.

If you double-click on a bar, you will see the full line graph as it was
generated from the sensitivity analysis. All relevant threshold informa-
tion will be included.

Tornado diagrams can be created at chance nodes and decision nodes.


At a decision node, any threshold (i.e., change in policy) found will be
identified in a variable’s tornado bar with a heavy vertical line. Thresh-
old lines are drawn at the expected value on the x-axis at which the opti-
mal path changes. If a threshold appears at either end of a bar, this usu-
ally indicates that an alternative which is optimal for part of the analysis
range has an unchanging expected value in that range. To see details
about the change in policy associated with a threshold line, double-click
the bar to view the full line graph for the variable.

You may turn off the display of individual bars in the analysis. Select
Graph > Show/Hide (when the graph window is in front) to indicate
which bars should be displayed.

Tip:
Because setting up the tornado diagram analysis can be time consuming,
you may want to store the setup information for reuse when you want to run
the analysis again; see Chapter 18 for details on stored analyses.

Additional calculations in the text report


The tornado diagram’s text report will display, in addition to the input
and output ranges for each parameter, a number of other useful calcu-
lated values.

190 Part III: Analyzing Uncertainty Using Variables and Distributions


• Spread – This is the width of the bar (i.e., High EV - Low
EV).
• SpreadSqr – The spread value, squared.

Adding the SpreadSqr values to calculate a net risk value, two addi-
tional measures of uncertainty are then calculated for each variable.

• Risk Pct – This is a measure of how much of the total


uncertainty is represented by the specified bar (equals
SpreadSqr / NetRisk). The RiskPct values sum to 1.0.
• Cum Pct – A cumulative version of Risk Pct., making it
easy to scan the bars and say “to address 90% of the risk, I
must consider the uncertainty represented by the following
variables….”

Including correlated variables in the tornado diagram


As in all sensitivity analyses, if you select a variable for the tornado
diagram which has correlations, you have the option of including the
correlated variables in the analysis, as well. Correlates which are varied
together in the analysis will appear as a single bar, for which you pro-
vide a description (e.g., “Pharmacy Costs”).

The names of the correlated variables in a given group will not be dis-
played in the tornado diagram itself. If you single-click the bar repre-
senting those parameters, the names and input ranges of all correlated
variables in the group will be shown.

Details on how to correlate variables is provided later in this chapter.

Two-way sensitivity analysis


Two-way sensitivity Two-way sensitivity analysis is used to examine the impact on a deci-
analysis sion of simultaneous changes in the values of two variables. One
method is to run a series of one-way analyses, each time incrementing
the value of a second variable; the resulting line graphs can be merged
(see Chapter 6). Another method available in TreeAge Pro is to auto-
mate this series of analyses and present the results in a region graph.
The region graph very efficiently identifies changes in the optimal
policy as the values of the two variables change.

The two-way sensitivity analysis setup dialog resembles the one-way


dialog, except that you must specify two variables and a range of values
for each. A decision node must be selected in order to perform a two-
way sensitivity analysis.

Chapter 15: Sensitivity Analysis Tools 191


® To perform a two-way sensitivity analysis:

s Open the file you created in Chapter 13 called Three Variables


(or the copy of this file called Three Vars, found in TreeAge
Pro’s Tutorial Example subdirectory).

s Select the root node, and choose Analysis > Sensitivity >
Two-Way.

s For one variable, select pay_up, and specify 6 intervals in the


range from 200 to 800.

s For the second variable, select prob_extreme, and specify 5


intervals in the range from 0 to 0.5. Click OK to run the simu-
lation.

The resulting graph is shown below:

192 Part III: Analyzing Uncertainty Using Variables and Distributions


Based on the number of intervals selected, TreeAge Pro calculates the
tree 42 (7x6) times, for 42 different combinations of the two variables.
With more intervals, more detail can be identified in the graph, while
the time it takes to calculate will increase. You may find that two-way
analyses often require more intervals per variable to attain a reasonable
level of accuracy than do one-way analyses. This is because a two-way
analysis graphically represents only the threshold values – the opti-
mal path crossings. In contrast, a one-way analysis shows all expected
values at all points on the graph. The one-way analysis may show sig-
nificant details which are simply not shown in the two-way analysis.

The graphical representation of the results of two-way sensitivity anal-


ysis has some unavoidable limitations; this also applies to three-way
analysis.

• The accuracy of threshold lines may be compromised


around the edges of the graph. The unavoidable result of
using approximation techniques to identify thresholds is
the appearance of distortion when two edges of a region of
optimality draw closer together than one-half the width of
an axis interval. Accuracy can be enhanced by running the
analysis using more intervals.
• Regions of indifference are not shown. Areas of the
graph where indifference exists are, instead, assigned to
one of the decision alternatives. You should use the text
report (accessed via the Graph > Text Report command)
to identify any areas of indifference by comparing the
expected values at each interval.
A legend displaying the name and the range of any correlated variable
involved in the two-way sensitivity analysis will be placed adjacent to
the appropriate axis.

Tip:
Use two-way analysis only when the two variables are independent. If the
two variables are a correlated pair, be sure to turn off the correlation.

Isocontours
Isocontour lines can be setup in any two-way sensitivity analysis graph
comparing two alternatives. An isocontour represents, for the combi-
nations of variable values along the line, a constant marginal or incre-
mental value of the topmost branch of the decision node. (A threshold

Chapter 15: Sensitivity Analysis Tools 193


line between different regions in the graph, if it exists, is actually an
isocontour showing where the incremental value is zero (i.e., where you
are indifferent between the alternatives).

To add custom isocontours, click the Options button or select Graph >
Options while a two-way sensitivity graph (comparing two options) is
active. Select the Isocontours tab, and enter the incremental values to
use for isocontours.

Labels are not automatically created for isocontours; label the lines
manually, using the Graph > New Label… command described in Chap-
ter 6.

Tip:
Adding only a 1000 isocontour, for example, will not show lines representing
both +1000 and -1000 incremental values; you need to add both 1000 and
-1000 values to the list of isocontours in the graph to see both the +/- 1000
isocontours in the graph. Negative value isocontours, in this context, merely
indicate that the comparator has changed from the topmost option to the
bottom branch.

194 Part III: Analyzing Uncertainty Using Variables and Distributions


Three-way sensitivity analysis
Three-way sensitivity analysis The three-way sensitivity analysis dialog looks similar to the two- and
one-way sensitivity analysis dialog.

The results of a three-way sensitivity analysis are presented as an ani-


mated two-way sensitivity analysis region graph. The third variable is
represented not with its own axis, but rather using a series of two-way
graphs — if four intervals are specified for the third variable, then five
graphs will be created, and shown in series.

Use the Animate button or the scroll bar to cause the third variable to
cycle through its range, interval by interval. At each frame you will see
a snapshot of the three-way analysis, showing you how the two-way
analysis of the first two variables is affected by varying the value of the

Chapter 15: Sensitivity Analysis Tools 195


third variable. At each frame, the value of the third variable is displayed
in a special label near the top-right corner of the graph.

Threshold analysis
Threshold analysis This specialized form of sensitivity analysis offers the ability to search
more thoroughly and accurately for threshold information. The result of
this analysis is a detailed, textual description of how the optimal strategy
is affected by changing the value of a single variable across a designated
range.

In a standard one-way sensitivity analysis, the user designates the


number of intervals into which the range is to be divided; actual cal-
culations occur only at these intervals. As a result, the accuracy of the
associated threshold analysis is limited to values determined by linear
interpolation.

In contrast, threshold analysis has been designed to maximize accuracy


of the analysis in situations where accuracy is more critical than speed.
The specified range is iteratively searched until a specified minimum
tolerance is reached.

How threshold analysis works


After you select Threshold Analysis, a dialog box will appear asking
four questions.

• the name of the variable on which the sensitivity analysis


is to be performed;
• the value range over which to vary the designated variable;

196 Part III: Analyzing Uncertainty Using Variables and Distributions


• a value for the “threshold tolerance”; and
• information concerning the non-linearity of the model.

Tolerance
The tolerance is stated in the same units of value as the variable in
question; it is not a percentage. The tolerance is related to the value of
the variable, not to expected value. Thus, entering a tolerance of 0.1
means that the actual location of any threshold will be within plus or
minus 0.1. For example, if TreeAge Pro indicates finding a threshold at
Var=0.391, this means that the threshold definitely occurs somewhere
between 0.381 and 0.401. Because TreeAge Pro applies linear interpo-
lation after it meets your tolerance, you can expect the actual reported
value to be even more accurate than the tolerance.

The designated tolerance has a second function. TreeAge Pro uses this
value as a basis for determining the number of decimal places (not sig-
nificant digits) to specify in the result. The number of decimal places
displayed will be one greater than the number of decimal places speci-
fied in the tolerance. Assume, for example, that TreeAge Pro finds
a threshold at 0.459033333. If the tolerance had been set at 0.1, the
threshold value would be reported as 0.46. If, instead, the tolerance
were set at 0.01, the threshold would be displayed as 0.459.

Non-linearity
A sensitivity analysis may indicate multiple threshold values. However,
this series of changes in policy will be identified correctly by TreeAge
Pro only if the thresholds appear in different intervals in the first itera-
tive pass. Since linear interpolation is used to find thresholds in a sensi-
tivity analysis, only one threshold can be found per analysis interval.

For example, suppose that two thresholds exist in the same analysis
interval, with optimality switching between the same decision options.
Since the same policy is optimal at both ends, notwithstanding the inter-
vening thresholds, TreeAge Pro will assume that no thresholds occur in
that interval. There is no way to avoid this problem entirely. TreeAge
Pro could subdivide a range into 100 intervals and still miss policy
changes within an interval if the same optimal policy is specified at both
ends. Even if different strategies are optimal at either end of an interval,
and TreeAge Pro identifies a threshold in that interval, it is still possible
that one or more additional thresholds in that same interval will have
been missed.

Chapter 15: Sensitivity Analysis Tools 197


For example, three alternatives, A, B, and C, might be compared using a
sensitivity analysis; A is optimal at the beginning of an interval, B in the
middle, and C at the end. Although you know that two thresholds (A to
B, then B to C) actually occur, TreeAge Pro will find just one (a nonex-
istent one, A to C) from looking at the optimal alternative at the ends of
the interval.

The non-linearity hint is an attempt to minimize the likelihood this will


occur. The more non-linear you describe the graph to be, the smaller
the interval used by TreeAge Pro, so as to ensure catching any double
thresholds.

Performing a one-way sensitivity analysis on the variable in question


before performing a threshold analysis will indicate the appropriate
non-linearity setting. If the sensitivity analysis graph is very nonlinear
(i.e., it has multiple thresholds), use a higher setting for the measure of
non-linearity. This will cause TreeAge Pro to increase the number of
intervals searched at each step. Increasing the non-linearity setting also
increases the time needed to perform the analysis. For this reason, it is
not recommended that you automatically use the Medium or High set-
tings.

Initially, TreeAge Pro will subdivide the given range into a number of
intervals. The number of intervals searched relates to the non-linearity
radio buttons as follows:
• Low: 4 intervals
• Medium: 8 intervals
• High/Don’t Know: 12 intervals.

At each interval where a change in optimal strategy is identified,


TreeAge Pro will either
• calculate a threshold value, if the width of the range is less than
twice the given tolerance; or
• redivide the interval into 4, 8, or 12 subintervals, as indicated,
and search those, as above.

As the calculation proceeds, the progress bar shows how far over the
given range TreeAge Pro has searched. If a threshold value is found, the
bar will slow down considerably, but it will move more quickly over
intervals in which no threshold value is found.

198 Part III: Analyzing Uncertainty Using Variables and Distributions


Understanding the results
A dialog box will appear with the results of the threshold analysis. It
will specify the number of threshold values identified by the analysis,
the optimal policy between the low end of the range and the first thresh-
old (change in policy), and the expected value at the threshold.

The dialog box specifies a single interval throughout which the optimal
policy is consistent. The term “EV at threshold” refers to the expected
value when the variable in question is given the value at the top of the
interval being described. The “Prev” and “Next” buttons can be used to
view each of the other policy intervals.

The To Clipboard button is used to transfer all of the threshold infor-


mation to the clipboard in text format.

Analyzing a single option


Analyzing a single option Normally, when performing a sensitivity analysis, a decision node is
selected and TreeAge Pro displays one line for each of the alternative
scenarios rooted at the selected node. It is possible to focus a one-way
sensitivity analysis on a single scenario, rather than on all of the sce-
narios emanating from a decision node.

If the node you select prior to performing the sensitivity analysis is not
a decision node, TreeAge Pro will assume that the results should be
presented as a single line. This will represent the changing expected
value of the scenario rooted at the selected node. (Healthcare module
users: Note that this option is not available for cost-effectiveness sensi-
tivity analyses, which must be performed at a decision node.)

If, however, you select a decision node which is an immediate


descendant of a decision node, TreeAge Pro will give you the option
of drawing one line for the selected node (as a branch of its parent),
Chapter 15: Sensitivity Analysis Tools 199
or multiple lines for the branches emanating from the selected decision
node.

Correlated variables
Correlating/linking Linkages (i.e., perfect positive or negative correlations) between pairs
of variables can be specified, for use during sensitivity analysis. These
variables during value linkages are set up in the Properties dialog box (see the section
sensitivity analysis Variables and Table) for either member of a correlated pair, by clicking
on the Correlations... button. (See Chapter 13 for instructions on defin-
ing the sensitivity analysis and other properties for a variable.)

Once created, the correlation is identified in the properties of both vari-


ables. Thus, when you choose to perform a sensitivity analysis on either
member of a correlated pair of variables, TreeAge Pro will remind you
that one of the parameters to be varied has one or more correlates that
can also be varied during the analysis. Once the analysis parameters
have been entered, you will have the option of simultaneously varying
any or all correlated variables over their own value ranges.

® To perform a sensitivity analysis using correlated variables:

s Open the tree called Correlated Variables, found in the Tuto-


rial Examples subdirectory. This tree has a positive correlation
specified between the variables utilLoseFoot and utilLoseLeg.

s Select the root, decision node and choose Analysis > Sensi-
tivity Analysis > One-Way….

s In the Sensitivity Analysis dialog, select the variable utilLose-


Foot (or utilLoseLeg). Specify 10 intervals and a range of 0.4
to 0.9. Click OK.

After choosing to perform a sensitivity analysis on a variable with cor-


relations, the Correlations dialog (shown on the next page) will appear.
From this dialog, it is possible to specify which correlations should be
active during the analysis. To include all displayed correlations, simply
click the Select All + OK button. To include only particular correlated
variables, highlight each variable name for inclusion and then click OK.
Finally, to exclude all correlates, click the OK button immediately on
entering the Correlations dialog, leaving all correlate variable names
unselected.

It is also possible to change the range of values applied to each corre-


lated variable. Clicking on a correlate’s name in the list activates text
boxes allowing changes to the default high and low values. To update

200 Part III: Analyzing Uncertainty Using Variables and Distributions


the range using the changes you make, click on the Change button
below the two text entry boxes. During the analysis, the same number
of intervals specified for the original variable will be used in dividing
the range applied to each correlated variable.

Be sure to pay close attention to the ranges for correlated variables.


Because TreeAge Pro does not parameterize the correlation, you must
ensure that if you use a narrow range for one variable (its 75% con-
fidence intervals, for example), you also use an appropriately narrow
range for the correlated variables.

It is not possible to change the type of correlation (positive or negative)


from within the sensitivity analysis dialog; these changes must be made
in the variable’s Properties dialog. Detailed instructions on modifying
the sensitivity analysis properties of variables can be found in Chapter
13.

Graphs generated for sensitivity analyses that include correlated vari-


ables (except for three-way sensitivity analysis) will display a text label
including the name and the range of each correlated variable which was
varied during the analysis. On the graph, this text will be placed adja-
cent to the name of the original variable at the appropriate axis.

Chapter 15: Sensitivity Analysis Tools 201


Sensitivity analysis on variables with non-numeric definitions
Sensitivity analysis on A sensitivity analysis can be performed on any variable in your tree,
whether it has a numeric value definition (e.g., X=1 or X=Exp(2)) or a
variables with non-numeric
variable expression (e.g., X=Rate*Util). When performing a sensitivity
definitions analysis on a variable defined as a formula, you have multiple options.
You can perform a sensitivity analysis on the component variables (e.g.,
Rate and Util) using variable correlations or a multi-way sensitivity
analysis. Alternatively, you can perform a one-way sensitivity analysis
on the original variable (e.g., X) based on an estimated numeric value
range.

If you treat X as the independent variable, however, the formula will be


ignored during the course of the analysis. Definitions of Rate and/or Util
at different points in your tree will not be used during this analysis.

It is advisable to focus sensitivity analysis on the finest-grain


parameters. In the example above, X is no longer “finest-grain,” as it
has been defined in terms of its two component variables. In general,
models should be designed to ensure that the sensitive variables have a
single numeric definition.

Checking probability coherence


Checking probability Most forms of sensitivity analysis offer an option labeled Check
coherence coherence. When this option is selected, TreeAge Pro will ensure that,
at each interval, (i) all probabilities sum to 1.0 and (ii) no probabilities
are negative. The analysis will be halted if at any time either rule is vio-
lated.

If the subject variable is used to define a probability, you are encouraged


to leave this option selected. This will ensure the validity of your model
over the range of the analysis. This is particularly important in the initial
stages of testing your model’s validity. The downside is that calcula-
tion time is increased. If calculation speed is a concern, and you are not
including any probability variables in the sensitivity analysis, you may
want to turn off coherence checking.

Also see the section on probability non-coherence in Chapter 22.

202 Part III: Analyzing Uncertainty Using Variables and Distributions


CHAPTER 16: USING DISTRIBUTIONS AND MONTE CARLO SIMULATION

CHAPTER 16

USING DISTRIBUTIONS AND


MONTE CARLO SIMULATION
This chapter provides instructions on creating and referencing sampling
distributions, performing Monte Carlo simulation, and interpreting the
results.

Instructions on creating custom, table-based distributions can be found


in Chapter 17. Appendix D describes the statistical formulas and
properties of the built-in distributions available in TreeAge Pro.

Detailed information on performing Monte Carlo simulation with


Markov and cost-effectiveness models can be found in the separate
PDF documentation for the TreeAge Pro Healthcare module; see the
Introduction to this manual for more information.

In this chapter:

• Simulation using multiple processors........................................... 204

• Using Monte Carlo simulation .................................................... 204

• Performing probabilistic sensitivity analysis .................................. 207

• Simulation options ................................................................... 215

• Distribution options .................................................................. 219

Chapter 16: Using Distributions and Monte Carlo Simulation 203


Simulation using multiple processors
Simulation using multiple To support the complex, potentially lengthy types of analysis described
processors in this chapter, TreeAge Pro can utilize up to eight processors on a
single computer when performing Monte Carlo simulation. See Appen-
dix F for additional technical details on multi-processor calculations.

Uses of Monte Carlo simulation


Uses of Monte Carlo Each of the analyses described in previous chapters, including sensi-
simulation tivity analysis, is deterministic. There is no randomness in these types
of model calculations; during each calculation, each model parameter
uses its specified point value. If an analysis is repeated using the same
parameters, the results will be unchanged,

In contrast, there are many situations where introducing a random, or


stochastic, element into some part of the analysis can be useful. In these
situations, Monte Carlo simulation can be applied.

Probabilistic sensitivity analysis


Monte Carlo simulation refers to the use of random numbers in evaluat-
ing a model. Perhaps the most frequent application of Monte Carlo sim-
ulation in TreeAge Pro is as a form of sensitivity analysis. Like regular
(deterministic) sensitivity analysis, Monte Carlo simulation recalculates
a model multiple times. Monte Carlo simulation can update any number
of parameters between model recalculations, assigning values that are
randomly sampled from probability distributions. This use of Monte
Carlo simulation is referred to as probabilistic sensitivity analysis.

One advantage of probabilistic sensitivity analysis is that all parameter


uncertainties can be incorporated into an analysis (see section on nonlin-
earity, below). Sampling parameter values from probability distributions
(rather than from a simple range defined by upper and lower bounds)
places greater weight on likely combinations of parameter values, and
simulation results quantify the total impact of uncertainty on the model,
in terms of the confidence that can be placed in the analysis results.

Most of this chapter explains the basics of performing probabilistic


sensitivity analysis in TreeAge Pro: 1) how to define model parameters
using probability distributions; and 2) how to perform Monte Carlo
simulation.

204 Part III: Analyzing Uncertainty Using Variables and Distributions


Nonlinearity
In some models, calculating the expected value of a model or a single
alternative based on the mean value of an uncertain parameter (i.e.,
using roll back) will give the same result as randomly sampling many
values for the uncertain parameter from its probability distribution,
recalculating the model for each sample value, and taking the average.
However, this is not the case with all models and all uncertain param-
eters.

If, for example, a distribution is used to define an uncertain compo-


nent of a probability or utility function, you may find that the “expected
value” of the model calculated using the parameter’s mean value will
differ from the average of many recalculations of the model using sam-
pled values for the uncertain parameter. In these cases, the simulation
average value is the better “expected value” for the model (and therefore
simulation would be the preferred means of analyzing the model).

EVPI/value of information analysis


Monte Carlo simulation can be used to perform various kinds of
“value of information” analysis, similar to the structural form of EVPI
described in Chapter 5, in which a chance node is temporarily shifted
to the left of a decision node. In a Monte Carlo simulation, EVPI is
performed by reevaluating the optimal strategy at a decision for many
different values sampled for one or a small number of parameters. If
the optimal strategy changes for different sample values, then there is
some benefit to having “perfect information” about the uncertainty prior
to the decision. The average of the values of the best option from each
model recalculation is the expected value with perfect information; it
will either be equal to or greater than the best average value for any
single alternative. Calculating the difference gives the expected value of
perfect information. (TreeAge Pro does not automatically calculate this
difference.)

TreeAge Pro also includes an option to do two levels (nested loops) of


parameter sampling during simulation, in order to do robust EVPI-type
simulation. This may be required to get an accurate EVPI when there
is nonlinearity in the model, as described above. The “information”
parameter is sampled in the top-level, outside loop; for each sample
value, the model is reevaluated using an inner loop (a simulation of N
iterations which samples the remaining uncertainties).

Chapter 16: Using Distributions and Monte Carlo Simulation 205


Microsimulation (first-order trials)
In TreeAge Pro, Monte Carlo simulation includes two distinct features,
which may be used separately or in combination: sampling param-
eter values, described above (sometimes called second-order simula-
tion); and running random trials (also called first-order simulation,
microsimulation, or a random walk). These two kinds of simulation
correspond roughly to two categories of uncertainty — second-order,
parameter uncertainty versus first-order uncertainty (variability among
individuals, or over time) — and have different applications and meth-
ods. First-order trials are described conceptually here; their use in
Markov Monte Carlo simulation is covered in detail in the Healthcare
Module documentation.

The last step in each iteration of a second-order simulation is recalcu-


lating the model. The most efficient way to perform this recalculation
is using expected value calculations, but it is also possible to use first-
order simulation as a means of approximating an expected value.

First-order simulation trials can be used to model the variability in


individual outcomes, visualized in a decision tree as the branches of a
chance node. Simulation trials use random numbers to select a single
path through the tree, following one branch at each chance node, with
higher probability events being more likely. Running 100 first-order
simulation trials results in a list of 100 individual outcomes (e.g., profit
equals $150, $175, $0, $550, -$50, and so on), with some chance of
repeating outcomes. As more individual trials are run through a decision
tree, the average outcome should approach the regular expected value
calculation. (Increasing the numbers of trials will also result in a stan-
dard deviation for the simulation that should converge on the expected
value form of standard deviation; see Chapter 5.)

First-order trials have somewhat limited use with most models (with
Markov models:
the major exception of Markov models). One possible use of simulation
For information on using 1st-order
simulation trials with Markov trials in a regular tree is to replace any chance node with a parameter-
models and tracker variables, refer ized probability distribution (e.g., sampling an outcome from a normal
to the TreeAge Pro Healthcare distribution, or any other continuous or discrete sampling distribution).
module documentation.
For example, in the investment decision tree, the risky investment’s
chance node could be replaced with a distribution representing either
a continuous range of outcomes, or a discrete distribution just like the
existing three-branch chance node. This can also be accomplished with-
out simulation trials, using TreeAge Pro’s DistKids( ) function; these
advanced uses of distributions in modeling are covered in Chapter 22.

206 Part III: Analyzing Uncertainty Using Variables and Distributions


Performing probabilistic sensitivity analysis in TreeAge Pro
Performing probabilistic As detailed in the previous chapters on performing n-way sensitivity
analysis in TreeAge Pro, uncertain parameters that are targeted for anal-
sensitivity analysis in
ysis are defined using variables. Similarly, before using Monte Carlo
TreeAge Pro simulation to perform probabilistic sensitivity analysis in TreeAge Pro,
uncertain parameters must be defined using distributions.

s Start by opening the Three Variables version of the tree that


you built in the sensitivity analysis tutorial in Chapter 13 (or
the copy of this file called Three Vars, found in the TreeAge
Pro Tutorial Examples subdirectory).

s Save a copy of this file, calling it Stock Simulation.

The goal is to change the payoff of the Large increase terminal node
from a point estimate of 500 to a Normal distribution with a mean of
500 and a standard deviation of 100.

Defining and using a distribution in a tree


Probability distributions can be employed in any kind of formula in a
tree, including variable definitions, payoffs, rewards, probabilities, and
even in the parameters of other distributions. TreeAge Pro includes
more than 20 different built-in distributions, and can also sample from
tables. The different types of continuous and discrete distributions that
are available in TreeAge Pro are described in more detail in Appendix
E. Table-type distributions are described in the next chapter. This chap-
ter will focus on defining and using a distribution in the tree once you
have selected the appropriate distribution type.

In TreeAge Pro, distributions that you define are stored in a list in the
tree and assigned an integer index and, optionally, a name (like a vari-
able name). A distribution can be used in a tree calculation either by
referencing it by name, or by using the Dist(n) functions, where n is the
distribution’s integer index.

Chapter 16: Using Distributions and Monte Carlo Simulation 207


® To define a distribution in the tree:

s Right-click on the root node, and choose Define Variable >


pay_up, to open a Define Variable window for pay_up.

s Click on the button labeled Distribution….

Tip:
If you are in a tree window, instead
of a payoff dialog, choose Values
> Distributions to open the Distri-
butions dialog for adding or editing
distributions.

The Distributions dialog will appear. No distributions are listed because,


as yet, none have been defined in the tree.

s To add a distribution to the list, click New….

s From the palette of available distributions, shown on the next


page, click on the button corresponding to the desired distribu-
tion type. In this case, we will use a Normal distribution for the
payoff of the Large increase node.

s Enter the required parameters for the selected distribution. In


this case, define a mean of 500 and a standard deviation of 100
for the Normal distribution. Press ENTER or click OK to save the
distribution and its parameters.

208 Part III: Analyzing Uncertainty Using Variables and Distributions


s The new distribution’s Properties dialog appears, showing the
integer index assigned to the distribution. You have the option
of entering a name for the distribution (like a variable name)
as well as a longer description for the distribution. In this case,
enter Normal_500_100 for the name, and Distribution
of large increase payoffs for the description.

s Click OK to save the distribution and return to the Distribu-


tions dialog. The list should show the newly created Normal
distribution.

Chapter 16: Using Distributions and Monte Carlo Simulation 209


s With the distribution selected in the list, click the Use button
to insert a reference to the distribution in the active payoff
window.

If you defined the Name property of the new distribution, this will be
inserted into the payoff expression. Otherwise, TreeAge Pro will create
a reference like “Dist(1)”. The Dist() function in TreeAge Pro is equiva-
lent to the DistSamp() function in TreeAge Pro 4.0 and earlier versions,
with the integer index of the distribution entered inside the parentheses.

s Click OK to close the Define Variable window.

The new definition of the pay_up variable should not change expected
value calculations (including sensitivity analysis), because the expected
value of the Normal distribution (its mean) is the same as the original
numeric definition of pay_up.

The same distribution sample value can be referenced in any number of


expressions in your tree, by entering the same Dist(n) reference or dis-
tribution name. During each iteration of a simulation, each reference to
a single distribution in the tree will return the same sample value (with
the exception of distributions that are specifically set to resample more
frequently, for example in Markov calculations).

210 Part III: Analyzing Uncertainty Using Variables and Distributions


Running the Monte Carlo simulation
After defining and using distributions in your tree, you can run a Monte
Carlo simulation at a node in the tree to see how resampling values for
model parameters affects calculations at that node. Simulations can be
run at any node except a terminal node, making it possible to analyze
only part of a tree.

® To perform a probabilistic sensitivity analysis at a decision node


using Monte Carlo simulation:

s In a tree which uses sampling distributions, select a


decision node, and choose Analysis > Monte Carlo
Simulation > Sampling (Probabilistic Sensitivity)….

If you have defined distributions in the Distributions dialog (even if they


are not used anywhere in the tree), the Monte Carlo Simulation dialog
will present a variety of options for analysis. In most cases, you will
simply need to specify the desired number of samples (and correspond-
ing recalculations) to be run.

Additional options and advanced uses of Monte Carlo simulation are


described later in this chapter, and in later chapters. Also note that a dif-
ferent Monte Carlo Simulation dialog is displayed if a tree does not con-
tain any sampling distributions.

Chapter 16: Using Distributions and Monte Carlo Simulation 211


Now, specify the settings to use for this simulation.
s Change the number of distribution samples (and recalculations
of the entire model) to 500, and leave other settings at their
defaults (to sample all distributions).

s Click Begin to start the simulation. The simulation output


window should appear immediately.

In running this simulation, TreeAge Pro will: 1) randomly sample 500


values from the distributions defined in the tree; and 2) recalculate
expected values for the branches of the selected decision node based on
each set of parameter samples. The simulation output window shows the
progress of the simulation; clicking Calc Stats button will display a run-
ning statistical summary of the completed iterations. Once the simula-
tion is complete, a final statistical summary will be displayed.

Since each simulation generates a different set of random numbers, there


should be variation in the statistics from one simulation to the next. In
this case, the simulation should report a mean value close to the $10
expected value calculated for Risky investment in Chapter 1. However,
as explained in the section on non-linearities at the beginning of the
chapter, in more complex models the sampling mean may deviate from
the values calculated by roll back.

Keep in mind that Monte Carlo simulation with sampling can also be
performed at nodes other than decision nodes.

Monte Carlo simulation reports and graphs


Depending on the complexity of the model, and the number of samples
and recalculations you specify (up to 5 million), simulations in TreeAge
Pro can be lengthy. For this reason, the simulation output can be saved,
separately from the tree, as a Monte Carlo Simulation file.

® To save the Monte Carlo simulation output:

s Choose File > Save.

Saving the simulation output will allow you to share the complete
results with other TreeAge Pro users, or to generate graphs and reports

212 Part III: Analyzing Uncertainty Using Variables and Distributions


from the simulation at a later time. Unlike an exported text report, a
simulation file can be opened only in TreeAge Pro.

® To open a saved Monte Carlo simulation file:

s Choose File > Open. Change the Files of type selection to


Monte Carlo Files (*.mcs).

If a simulation is performed at a decision node, the statistics for the top


branch are displayed by default. Statistics for other branches of the deci-
sion node are accessible using the Stats shown for menu button, at the
bottom of the window.

Clicking the Export button will output the complete list of simulation
results directly to a text file. For simulations with more than 1000 rows
of results, you must use this method to export the entire tabulated simu-
lation results for import into graphing or statistical analysis software.

Clicking the Text Report button will display the list of distribution
sample values and corresponding tree recalculations; the text report is
limited to displaying 1000 rows. Like other text reports, the simulation
report dialog or individual columns can be resized, and the text informa-
tion can be copied to the clipboard or saved to a text file.

Clicking on the Graph button lets you choose from among a variety of
TreeAge Pro’s built-in graph types. For all simulations, probability dis-
tribution histograms can be displayed for the model calculations, as well
as for any sampling distributions.

Chapter 16: Using Distributions and Monte Carlo Simulation 213


For a discussion of probability distribution histograms, and the options
available in TreeAge Pro for working with and customizing distribution
graphs, see Chapters 5 and 6.

For a simulation at a decision node, it is possible to view the percent-


age of samples for which each alternative is optimal, using the Strategy
Selection frequency graph. In TreeAge Pro, an indifference tolerance
value can be specified.

Charting/Reporting with Microsoft® Excel


If you have the TreeAge Pro add-in for Excel, graphs generated as
TreeAge graph files can also be created as Excel charts. In some
cases, Excel charts have different/additional functionality. See the
Excel module documentation for details.

Cost-Effectiveness Simulation Outputs


Numerous additional graphs and reports are available in cost-effec-
tiveness simulations performed using the Healthcare module for
TreeAge Pro. For example, in a cost-effectiveness simulation, the
Acceptability Curve in used in place of the Strategy Selection graph.
See the Healthcare module documentation for additional details.

214 Part III: Analyzing Uncertainty Using Variables and Distributions


Simulation options
Simulation options The first part of this chapter described the different types of simula-
tion that are possible in TreeAge Pro — first-order, second-order, two-
dimensional (both second- and first-order), and value of information
(two second-order loops). In addition, each type of simulation can also
be customized in various ways.

“Seeding” the random number generator


If you ever need to force the same set of samples and/or trials for sev-
eral different simulations, you can specify that TreeAge Pro use the
same, predictable sequence of random probabilities and sample values
in separate simulations. This is referred to as seeding a simulation.

® To seed a simulation:

s In the setup dialog for a Monte Carlo simulation, click the


More Options… button.

s Under Random Number Generator, check the Seed random


number generator box, and specify an integer seed value (from
1 to 64,000). Click OK or press ENTER to return to the Monte
Carlo Simulation setup dialog.

Normally, Monte Carlo simulation uses information from the comput-


er’s clock to initialize a sequence of random, or pseudo-random, num-
bers. Specifying a particular seed value will override this, and result in
the identical set of simulation results (even on different computers) pro-
vided that you use the same version of TreeAge Pro, the same simula-
tion settings, and the identical tree.

Each seed value will produce a different, predictable set of simulation


results.

Turning off sampling of selected distributions


When performing second-order simulation on a tree that includes dis-
tributions, you have the option of specifying that only a subset of the
distributions should be sampled. Non-sampled distributions will be set
at their expected value, or mean.

Chapter 16: Using Distributions and Monte Carlo Simulation 215


® To sample from selected distributions during a simulation:

s In the simulation setup dialog, select the Sample some option,


and click the Which... button.

s In the Sample Distributions dialog, all distributions are selected


by default. To turn off or on the sampling of a particular distri-
bution, click on it in the list.

s Click OK to return to the Monte Carlo Simulation dialog.

Recalculate using first-order trials or EV calculations


In a second-order simulation, the tree is recalculated for each new set
of parameter samples, to see the effects of parameter uncertainty. There
are two methods for performing each model recalculation: using a single
expected value (EV) calculation, or averaging many first-order trials.

It is generally preferable to recalculate EVs for the model for each set
of randomly sampled parameter values (except in the case of certain
Markov models). Depending on the complexity of the model, perhaps
1,000 or more first-order trials would have to be averaged to approach
the EV, making first-order simulation computationally inefficient.

216 Part III: Analyzing Uncertainty Using Variables and Distributions


To perform second-order simulation using first-order trials for model
recalculations, choose Analysis > Monte Carlo Simulation > Two-
Dimensional…. First-order trials can also be used in the model evalua-
tion step during a value of information simulation.

"Downstream" decision nodes during simulations


If your tree includes decision nodes to the right of the node where a
simulation is being performed, each recalculation of the model must
select a single path when it encounters such embedded decisions. These
embedded decisions can be handled in any of three ways: 1) based
on expected values calculated prior to the simulation, a single opti-
mal policy can be followed for all iterations; 2) if any distributions are
defined, the optimal policy can be reevaluated for each iteration, based
on the current distribution sample values; or 3) the topmost branch can
always be selected as optimal.

® To set the downstream decision algorithm for a simulation:

s In the Monte Carlo Simulation setup dialog, click on the More


Options… button.

s The Options dialog will include a Downstream Decisions sec-


tion if any such nodes exist.

s Select the appropriate option, and click OK to return to the


main Monte Carlo Simulation dialog.

Note that each time you perform a simulation, this setting will reset
to the default behavior (using expected values to select optimal paths
before the simulation begins).

Chapter 16: Using Distributions and Monte Carlo Simulation 217


Identifying simulations
Simulation output windows can be labeled using the values of variables
in your tree. This is useful when you have more than one simulation
output window open at once, or if you are saving and reopening or shar-
ing the Monte Carlo simulation files. The resulting simulation output
window will display a list of the variables and their default values.

® To add identifying variable values in the simulation window:

s Click the Add/Remove... button in the Identifying Values sec-


tion at the bottom of the Monte Carlo Simulation dialog (see
the next page).

s In the Monte Carlo Identifying Values dialog, select tree vari-


ables from the list on the left, one at a time, and click the Add
button to include them in the identifying values list.

s Click OK to return to the Monte Carlo Simulation dialog.

The identifying values list will be displayed in all subsequent simu-


lation windows generated for that tree. To clear the entire list, click the
Clear button in the Monte Carlo Simulation dialog’s Identifying Values
section. To remove only selected variables from the identifying values
list, use the Remove button inside the Monte Carlo Indentifying Values
dialog.

Monte Carlo simulation identifying values are particularly useful in


combination with the sequenced analysis feature in TreeAge Pro; see
Chapter 18.

218 Part III: Analyzing Uncertainty Using Variables and Distributions


Distribution options
Distribution options The remainder of this chapter describes some additional options avail-
able when working with distributions.

Defining distribution parameters non-numerically


Distribution parameters can be defined using variables or formulas,
instead of fixed numeric values. This makes it easier to modify a distri-
bution’s parameters, and it also may help someone viewing the model
understand the significance of a particular distribution.

Variables that are referenced in the parameter of a distribution should be


defined default for the tree, at the root node. An error will be reported if
TreeAge Pro cannot find a definition at the root node for the referenced
variable.

Clicking on the ellipsis button to the right of a distribution parameter’s


text entry box in the Distribution Picker dialog will open an expres-
sion editor dialog. This dialog, like a variable definition window, makes
it easier to set up a complex expression, including existing variables,
functions, and even other distributions, to represent a distribution
parameter.

It is possible to use the output of one distribution as a parameter in a


second distribution, but TreeAge Pro requires that the dependent distri-
bution have a higher numeric index than the input distribution. A distri-
bution cannot reference itself as a parameter.

Advanced sampling properties


If you use a simulation that combines second-order sampling and first-
order trials, the Advanced Distribution Properties dialog can be used to
change the frequency with which a particular distribution is sampled.
This will primarily be of interest in Markov models using tracker vari-
ables; see the Healthcare module documentation.

Chapter 16: Using Distributions and Monte Carlo Simulation 219


By default, distributions are set to sample only at each iteration of the
second-order simulation (i.e., group of trials). By changing the sampling
frequency, some distributions can be set to resample for each first-order
trial.

For Markov calculations, it is also possible to set a distribution’s sam-


pling frequency to generate a new sample value at each stage (during
first-order trials or cohort/EV calculations).

Sampling during EV calculations


During non-simulation analyses, such as roll back and sensitivity analy-
sis, a reference to a distribution always returns the same, mean value.
The Dist() function can, however, override this restriction and return a
sample value from the referenced distribution during any calculation.

To cause a random distribution sample to be returned by the Dist()


function during expected value (EV) calculations, simply add a second
parameter to the function with a value of 1. The formula DistSamp(1;1)
will sample a new value from distribution number 1 each time the distri-
bution is referenced in a tree calculation.

220 Part III: Analyzing Uncertainty Using Variables and Distributions


CHAPTER 17 CHAPTER 17: TABLES AND TABLE-TYPE DISTRIBUTIONS

TABLES AND TABLE-TYPE


DISTRIBUTIONS
This chapter provides instructions on creating tables of numeric values
for use in custom sampling distributions and other tree calculations.

In this chapter:

• Creating and using tables.......................................................... 222

• Sampling from tables during Monte Carlo simulation ..................... 226

• Creating a tree/table "package" or report ................................... 228

• Table lookup methods............................................................... 229

Chapter 17: Tables and Table-Type Distributions 221


Creating and using tables
Creating and using tables As described in Chapter 16, TreeAge Pro includes a gallery of continu-
ous and discrete statistical distributions from which uncertain param-
eter values can be randomly sampled during Monte Carlo simulation
of trees. During simulation, parameter values can also be drawn from
a table, in order to represent a custom, discrete probability distribution
that may not be easy to define using a built-in distribution type.

Tables can also be used to represent values that should vary over time
or other “dimensions.” See the TreeAge Pro Healthcare module docu-
mentation for examples of time-dependent probability lookup tables in
Markov models.

Creating tables
TreeAge Pro stores tables separately from the tree (with the exception
of tree/table packages, described at the end of the chapter). A tables
has one index column and anywhere from 1 to 512 columns of values.
A table can effectively include up to approximately 30,000 rows of
numeric values (variables and formulas cannot be entered in a TreeAge
Pro table file). Values in the index column need not be consecutive inte-
gers.

There are two steps in the building a new table. First, you must create
an empty table, giving it a name just as you would for a variable. Then,
numbers must be entered in the table, either by pasting in an entire table
or by entering one index/value pair at a time.

® To create a new table for use in a tree:

s In a tree window, choose Values > Variables and Tables…. In


the Variables and Tables dialog, make sure the Show Tables
option is checked.

s Click on the Add New… pop-up menu, and choose Table.

The Table Properties window will prompt you to enter two names for
the table. The internal name serves the same purpose as a variable name,
and must follow the naming guidelines for variables. Although the

222 Part III: Analyzing Uncertainty Using Variables and Distributions


internal and file names for a table are not required to be identical, it is a
good idea to make them the same. This will make it easier to share and
move table (*.tbl) files, if it becomes necessary.

s Enter the new table’s internal and file names.

s Select a lookup method to use when a missing index is ref-


erenced. The behavior of the different lookup methods is
explained later in this section.

s You may add a longer comment to the table by clicking the


Comment… button.

s Click OK to create the empty table file.

Entering values in tables


A table can be populated with values either by entering one row at a
time, or by copying and pasting an existing valid table from a spread-
sheet or text editor. In either case, a Table window must first be opened.

® To open a Table window:

s Choose Values > Variables and Tables…, and select the appro-
priate table from the list.

. s Click the Enter Values… pop-up button and choose Edit


Table…. (Paste Table will be explained below.)

If the selected table is currently empty, an Add Table Entry dialog (see
below) will automatically be opened over the Table window.

® To enter single index/value pairs into a table:

s In the Table window, choose Table > Add Table Entry… and
assign a new index/value pair.

s You may enter multiple values in quick succession by using


the More button in the Add Entry dialog.

Chapter 17: Tables and Table-Type Distributions 223


s Click OK when you are done, to return to the Table window.

The Table window’s Table menu includes commands for adding, delet-
ing, or modifying entries (one row at a time).

Usually, the preferred method for entering values into a table is to copy
the rows of table indexes and values from a spreadsheet or text editor,
and then paste it into the Table window. This is the only way to create or
edit tables with more than one column of values.

Before copying a table from a spreadsheet, you must ensure that the
selected index and value cells do not have any text or text formatting
(i.e., are free of currency symbols and parentheses, for example). The
copied region cannot include empty columns or rows.

® To paste a table from another program:

s Select the proposed contents of your table in the souce docu-


ment (i.e., spreadsheet or word processor).

s Choose Edit > Copy in the source document.

s Switch to TreeAge Pro, and choose Values > Variables and


Tables…. Select the target table in the list and click the
Enter Values pop-up menu and choose Paste Table.

s If the paste operation works, the Table window will open dis-
playing the new contents of the table.

The Paste Table operation will overwrite any current values in the table.
From within the Table window, it is also possible to choose Edit > Paste
Table.

If the Paste Table command is not available (grayed out), or does not
work as expected, ensure that the copied spreadsheet cells are format-
clean and that the other conditions described above have been met.

Column headings can be copied into a TreeAge Pro table along with the
numeric content of a table. Simply include the row of headings in your
initial selection, as shown at left, prior to copying. The title of the index
column must start with the word ”Index,” but the value columns do not
have title name restrictions.

224 Part III: Analyzing Uncertainty Using Variables and Distributions


The contents of an existing TreeAge Pro table can be copied from the
Table window, in order to edit it in a different program (or to paste into
a new table).

® To copy the contents of an existing TreeAge Pro table:

s In the tree, choose Values > Variables and Tables…, then


select the table, click on the Enter Values pop-up button, and
choose Edit Table….

s In the Table window, choose Edit > Copy Table to place the
table contents on the clipboard in tab-delimited format.

Looking up table values in formulas


The individual values in a value column of a table can be retrieved with
the following syntax (given a single value column):

TableName[ index ]

The table's internal, variable name is followed by square brackets con-


taining the index value used to pick a table row. The “index” expression
can be a number, variable, or other valid formula.

If a table has more than one value column, a second argument is


entered in the square brackets after a semicolon:

TableName[ index; column ]

The column argument must be an integer. Value columns are numbered


from left to right, starting at 1.

Value columns must be referred to by integer, or by a variable which


resolves to the appropriate integer. Table lookups cannot reference col-
umns by the column heading text (unless you create variables with the
same names as the column headings, and define each equal to the appro-
priate column’s index number).

More tables details


More useful information on working with tables is provided later in this
chapter, following the instructions on sampling from tables. Information
is provided on sharing/moving tables, packaging a tree with its tables,
reporting on table contents, and controlling how TreeAge Pro handles
missing row indexes.

Chapter 17: Tables and Table-Type Distributions 225


Creating custom distributions
Sampling from tables during If it is not feasible or desirable to use one of TreeAge Pro’s built-in dis-
Monte Carlo simulation tributions to represent the particular probability distribution you need,
there are at least two ways to create custom sampling distributions. Both
methods use a built-in distribution and a table.

Creating a Table-type distribution


One way to sample values from a custom distribution is to create a new
table in TreeAge Pro describing the distribution’s discrete probability
function (not the data set). This table can then be assigned to a Table
distribution. Each row of the table defines a distribution value (entered
in the index column) and and its probability (entered in the value of a
table entry). The probabilities in the value column must total 1.0.

® To create a Table distribution:

s Use the Variables and Tables dialog to create and populate a


table that represents the custom distribution function.

For instance, you might create the simple table shown at left for use as a
distribution representing the cost of surgery. As you can see, the surgery
is most likely to cost $1000, with approximate 10th and 90th percentile
values of $800 and $1600, respectively.
s Choose Values > Distributions… to open the Distributions
dialog, and click New… to add a distribution. In the Distribu-
tion Picker dialog, click on the Table distribution button.

s From the list of tables, select the name of the probability dis-
tribution table you created. Click OK to close the Distribution
Picker dialog.

s In the Distribution Properties dialog, you can give the distribu-


tion a name and/or descriptive comment. Click OK to save the
distribution.

To use a random sample from the Table distribution in the tree, simply
refer to it in the same way as you would refer to any distribution (as
described in the previous chapter): use either the distribution’s name or
the Dist(n) function using the distribution’s index.

Sample values will only be drawn from exact table entry indexes,
regardless of which lookup method you specify.

The mean value of the Table distribution will be used as the distribu-
tion’s expected value in non-Monte Carlo calculations.

226 Part III: Analyzing Uncertainty Using Variables and Distributions


Using a uniform distribution to sample from a table
In situations where you cannot represent the custom probability distribu-
tion using a regular Table distribution — for instance if you have a table
with multiple value columns — a numbered list of observed param-
eter values can instead be sampled from, with each row’s value given
an equal probability (or even selected in order). This might be useful,
for example, if you have a table of costs for a particular procedure from
which you would like to sample (or “bootstrap”).

In the table, the possible values are placed in a value column (unlike the
Table distribution, above), while the index column is used to number the
entries in the table. You can then sample from the table using a uniform
sampling distribution over the range of table indexes; use the integer
form of the Uniform distribution (to return only integers in the index
range).

® To sample from a table using a Uniform distribution:

s Paste your data set into a TreeAge Pro table, using consecutive
integer indexes in the index column and the data set’s values in
the value column.

s In the tree, choose Values > Distributions… to open the Distri-


butions dialog, and add a new distribution. In the Distribution
Picker dialog, click on the Uniform button.

s For the low value, enter the lowest integer index from your
table (i.e., 0 or 1). For the high value, enter the highest inte-
ger index from your table. Click OK to close the Distribution
Picker dialog.

s In the Distribution Properties dialog, give the distribution a


name and descriptive comment. Click OK to save the distribu-
tion, and then close the Distributions dialog.

The actual reference in a tree formula should look something like the
following:

TableX[Dist(1)]

where “TableX” is the name of the custom distribution table, and inside
the square brackets is the reference to the Uniform distribution. During
a second-order simulation, the Uniform distribution will be resample
within its range, causing different rows from TableX to be drawn ran-
domly, with essentially equal likelihood if done correctly.

Chapter 17: Tables and Table-Type Distributions 227


It may also be possible to pick rows from the table in order during a
simulation, by using the automatic _sample (or _trial) counter in place
of the Uniform distribution. The _sample counter corresponds to the
current iteration of the simulation, incrementing by one at each resam-
pling iteration.

To pick from a particular column in a multi-column table, simply add


the appropriate column parameter to the table reference, such as:

TableX[Dist(1); 2]

Linking to an Excel spreadsheet distribution


If you have a complex table in an Excel spreadsheet which cannot
easily be represented using a TreeAge Pro table, you may be able to use
dynamic links to look up or calculate values using the spreadsheet. See
Chapter 20 for details on setting up dynamic links.

Creating a tree/tables "package" or report


Creating a tree/tables Each table is stored as a separate file, with a “.tbl” extension, in TreeAge
Pro’s Tables subdirectory. Tables use a special file format, and are not
"package" or report
simply text files. You cannot place a text file into the Tables subdirectory
and have TreeAge Pro import it. (See Appendix F for instructions on
how to direct TreeAge Pro to use a directory path other than the default
location described above when storing and loading tables.)

If you want to transfer a tree that uses tables to another computer, then
you can either: A) use TreeAge Pro’s File > Export… command to
create a “package” that contains the tree as well as its required table
files; or B) manually copy the table files from the source computer’s
TreeAge Pro Tables directory to the destination computer’s Tables sub-
directory.

® To package a tree with its required tables:

s On the computer where the tree currently is working, open the


tree and choose File > Export….

s In the Export dialog, under Special Tree Formats, choose Pack-


age…. Do not check the Protected option unless you want to
password protect the package file. Choose a location to save
the package file.

228 Part III: Analyzing Uncertainty Using Variables and Distributions


When the packaged version of your tree is opened by a TreeAge Pro
user, any tables included will be automatically unpacked into TreeAge
Pro’s Tables subdirectory. If there are existing tables with the same
names, TreeAge Pro will ask the user what to do.

The Tables Used report


If you want to create a text report listing the tables used in a tree,
including all table contents and properties, use the Values > Tables
Used… report. This report can also be opened from the Reports pop-up
menu in the Variables and Tables dialog.

The internal/variable names of the required tables for a particular tree


are reported in the Tables Used dialog. For the tree to work correctly in
the new location, the corresponding table (*.tbl) files must be copied
along with the tree file (or included in a package file, as described
above). The table files must be placed in the TreeAge Pro application’s
Tables subdirectory on the destination computer. The tree can be open
on the destination computer when the required table files are copied into
the destination Tables subdirectory.

The Tables Used report also includes a second listing of the names of
tables referenced in the tree, but missing from the Tables subdirec-
tory. If you receive a tree sent from another computer, but are unable to
calculate it because of errors related to missing tables, the Tables Used
report will allow you to copy a list of both found and missing tables.

Copying the information about found tables to the clipboard will


include the values and lookup methods of these tables.

Table lookup methods


Table lookup methods A reference to a table that exactly matches an existing row index simply
returns the appropriate column’s value. When a nonexistent row index is
referenced, the table’s lookup method determines what is returned.

• Truncation – return the value associated with the highest


index less than or equal to the requested index (default)
• Interpolation – return a value calculated by linear interpola-
tion between existing indexes
• Index-Specific – report an error

Each table also has an option called “Index off edge is error.” If you
leave the option unchecked in a table that uses truncation or inter-
polation, a reference to a row index outside of the table’s range will

Chapter 17: Tables and Table-Type Distributions 229


return the value associated with the closest existing index. If this option
is checked, an error will be reported.

Tip:
The selection of lookup method does not affect which value column is used
in a reference to a table with more than one value column. There is no
interpolation between values in adjacent values columns. Only exact column
indexes can be used in references to multi-column tables.

230 Part III: Analyzing Uncertainty Using Variables and Distributions


CHAPTER 18

USING STORED ANALYSES AND


ANALYSIS SEQUENCES

All of TreeAge Pro’s graphs can be saved and reopened for later
viewing. Alternatively, the settings used to perform any analysis in
TreeAge Pro can be stored. This chapter provides instructions on saving
and using stored analyses, and on creating stored analysis sequences.

For more complicated tasks, such as batching lengthy analyses or


retrieving analysis parameters from a database or spreadsheet, TreeAge
Pro Interactive can be used.

In this chapter:

• Storing an analysis................................................................... 232

• Using stored analyses in a Run-time model .................................. 235

• Building custom decision analysis applications .............................. 235

• Sequencing stored analyses....................................................... 235

CHAPTER 18: USING STORED ANALYSES AND ANALYSIS SEQUENCES

Chapter 18: Storing Analyses and Analysis Sequences 231


Using stored analyses
Storing an analysis It is possible to save and reuse the parameters for most of the analy-
ses available in the Analysis menu. This includes Monte Carlo simula-
tion and all forms of sensitivity analysis. Analyses that cannot be stored
include Graph Risk Preference Function, Show Optimal Path, Verify
Probabilities, and Roll Back.

® To store the parameters of an analysis:

s Open a tree and perform an analysis. After you have reviewed


the results, close the output window, graph, or dialog, and
switch back to the tree window.

s Choose Analysis > Storage > Save Last. You must choose this
menu item before doing another analysis, as TreeAge Pro has
temporary storage for only one set of analysis parameters.

s Enter a short, descriptive name for your analysis. This name


is for your own reference (and also for other user’s of your
model). You may enter a longer description of the analysis by
clicking the Comment… button.

s Press ENTER or click OK.

The instructions TreeAge Pro needs to perform the identical analysis are
stored in the tree (the results of the analysis are not).

Running stored analyses


Many analyses that can be stored are dependent on the structure and
variable definitions of your tree. For instance, the location (relative to
the root node) of the node at which you originally performed a sensitiv-

232 Part III: Analyzing Uncertainty Using Variables and Distributions


ity analysis must be unchanged from when you stored the analysis, and
all analyzed variable definitions must be present in the same locations.
If TreeAge Pro is unable to reconcile the different structures, it will not
run the analysis.

® To run a previously stored analysis:

s Open the tree in which you have stored an analysis.

s Choose Analysis > Storage > Run Old Analysis.

s Select the desired analysis from the list of stored analyses.


TreeAge Pro displays a summary of the analysis. If you have
entered a comment for the analysis, you may view it by press-
ing the Comment button.

s Click the Run button to start the analysis.

Editing, copying, and deleting stored analyses


The Maintain Analyses dialog can be used to change the name or com-
ment of a stored analysis, delete or copy an analysis, assign a graph
template, or create a sequence of stored analyses.

® To edit the list of stored analyses (or sequences) in a tree:

s Choose Analysis > Storage > Maintain Analyses to open the


Maintain Analyses dialog.

® To copy a stored analysis (or sequence) to another tree:

s Choose Analysis > Storage > Maintain Analyses to open the


Maintain Analyses dialog.

s From the list, select the analysis you wish to duplicate, and
click the Copy button. Close the Maintain Analyses dialog.

s Switch to the second tree (which must be identical to the first


tree in all respects material to the stored analysis; see Running
stored analyses, above)

s Choose Analysis > Storage > Maintain Analyses in the second


tree, and click the Paste button in the dialog.

Chapter 18: Storing Analyses and Analysis Sequences 233


Using graph templates with stored analyses
As described in Chapter 6, a graph template is an abstract of the visual,
settings used by a graph, including fonts, certain text labels, and
numeric formatting. Normally, a graph template is applied manually to
a graph afterit is created. It is also possible to assign a graph template to
any stored analysis that automatically generates a graph.

See Chapter 6 for general information on graph templates. This section


assumes you are familiar with creating and using graph templates, and
only describes the use of templates with stored analyses.

® To store a graph template with an analysis:

s Create a template from a graph window.

s Then, either in the initial Save Analysis dialog or, later, when
editing the stored analysis from the Maintain Analyses dialog,
click the Template… button.

s Select a graph template from the list, and click OK to attach the
template to the stored analysis.

A separate copy of the graph template is included with the stored analy-
sis. If you change or delete the original graph template, the copy in the
stored analysis will not be affected.

To change the template stored with an analysis, reopen the Choose Tem-
plate dialog from the Maintain Analysis dialog, and select another tem-
plate or detach the current template by clicking the None button.

234 Part III: Analyzing Uncertainty Using Variables and Distributions


Stored analyses in a run-time custom interface
Using stored analyses in a This section assumes familiarity with the Run-time version of TreeAge
Run-time model Pro and the related Custom Interface feature, described in Chapter 25.

The Maintain Analyses dialog box has some features which may be par-
ticularly useful when you are working on a Run-time custom interface.
The Run-time user of your tree can be presented with the same list of
analyses that appears in the Run Analysis dialog box.

Assign a description and comment for each analysis to be included in


the Run-time interface. The long comment is displayed in the main Run
Analysis dialog for Run-time users. The summary which TreeAge Pro
generates to describe the analysis parameters in the Maintain Analyses
dialog is not shown to Run-time users; you may wish to include some of
that information in your comment.

You can use the Move Up and Move Down buttons in the Maintain
Analyses dialog to change the displayed order of the stored analyses.

To see how the user’s Run Analysis dialog box will look, pull down the
Options menu, and select Show Custom Interface.

Building custom decision analysis applications


Building custom decision TreeAge Pro Interactive™ is a tool that makes it possible to create your
own interactive applications (e.g., a web site, Visual Basic program, or
analysis applications Excel spreadsheet) based on a TreeAge Pro decision tree. These custom
applications might be run locally on your own computer, distributed on
CD-ROM, or accessed by a browser over the Internet or an intranet.

Using TreeAge Pro Interactive, you can build custom analyses that are
more complex than those built into TreeAge Pro, even using the analy-
sis storage and sequencing features.

See Chapter 25 for more information on TreeAge Pro Interactive.

Sequencing stored analyses


Sequencing stored analyses In TreeAge Pro, sequences of stored analyses can be defined and stored,
like a batched analysis, for future use. A sequence can include com-
mands to modify the definitions of variables at the root node between
analyses. Analysis sequences can greatly simply tasks like batch pro-
cessing a series of lengthy analyses, such as Monte Carlo simulations.
Sequences can also be used if you frequently do manual kinds of sensi-
tivity analyses, by repeating any of TreeAge Pro’s built-in analyses over
a range of variable values.

Chapter 18: Storing Analyses and Analysis Sequences 235


The next four screenshots provide a simple illustration of how the
sequencing feature can be used to automate running a series of separate
Monte Carlo simulations, each using a different value of a variable.

® To create a sequence of stored analyses:

s Run an analysis that can be stored, and then save it as a stored


analysis in the tree, as described earlier in this chapter.

s After storing the analysis, choose Analysis > Storage > Main-
tain Analyses. In the Maintain Analyses dialog, click the New
Sequence button.

s In the Sequence Stored Analyses dialog, enter a name for the


new sequence.

The stored analyses listed in the Maintain Analyses dialog will also
show up in the list on the left of the Sequence Stored Analyses dialog,
shown on the following page. Note that existing sequences cannot be
used in a new sequence, and will not be included in the list of available
analyses.

Each step in a sequence is established by adding to the list either (1) a


new definition of a variable at the root node or (2) a stored analysis.

s To add a stored analysis to the sequence, select the analysis


from the list on the left and click the Add >> button to insert
the analysis into the sequence, shown in the list on the right.

Simply repeat the add operation to insert additional iterations of this, or


another, stored analysis at the end of the sequence.

236 Part III: Analyzing Uncertainty Using Variables and Distributions


s To change the value of a variable prior to an analysis in the
sequence, click the Set Root Variable… button.

s In the dialog, select a variable from the list, and enter a value
or expression with which to redefine the variable. Click OK to
add the variable definition to the end of the sequence.

Variable definitions need not be numeric; they can reference functions


and other variables defined at the root node. For details on using the
Evaluate immediately option with non-numeric definitions, see the sec-
tion Evaluating non-numeric variable definitions…, below. For now,
leave this option unchecked.

When a variable is defined in a sequence, that definition is specified at


the tree’s root node. Thus, if the variable was already defined at the root
node, that definition will be overwritten the definition specified during
a sequence. If you want the variable to return to the value it had before
running the sequence, see “Resetting default variable values at the end
of a sequence,” below.

® To delete an analysis or definition from a sequence:

s Select the desired analysis or definition from the list of


sequence events, and click the Delete button.

Once you are certain you have the correct sequence of analyses and def-
initions, you can store the new sequence. Note that once a sequence has
been stored, it cannot be directly modified.
Chapter 18: Storing Analyses and Analysis Sequences 237
® To save the sequence in the tree:

s Click OK to close the Sequence Stored Analyses dialog. The


sequence will be stored in the tree, and its name added to the
list of stored analyses.

Although a stored sequence cannot be directly modified, it may be


possible to modify the underlying stored analyses that are included in
a sequence. To do this, delete the original stored analysis used in the
sequence, using the Maintain Analyses dialog, and then save a new ver-
sion of the stored analysis, using precisely the same name as the original
referenced in the sequence.

® To run a stored analysis sequence:

s Choose Analysis > Storage > Run Old Analysis.

s Select the sequence from the list of stored analyses, and click
the Run button.

Using non-numeric variable definitions in a sequence


When specifying a formulaic definition, rather than a numeric value, in
the Set Variable dialog, you should consider the desirability of selecting
the Evaluate immediately option. In many cases, it can be left checked.

If Evaluate immediately is selected, when the Set Variable step in the


sequence is reached, TreeAge Pro will attempt to calculate the formula
at the root node and then use this calculated value to create a numeric
definition of the variable in question (before proceeding to the next

238 Part III: Analyzing Uncertainty Using Variables and Distributions


step in the sequence). However, TreeAge Pro will be able to create a
numeric definition only if all variables used in the formula are defined
at the root node.

If a formula is specified in the Set Variable dialog and either (A) the
Evaluate immediately option is not checked, or (B) Evaluate imme-
diately is checked but definitions are not found at the root node for all
variables used in the formula, TreeAge Pro will not create a numeric
definition of the variable in question. Instead, a text definition of the
variable will be created at the root node using the specified formula.

Leave the Evaluate immediately option unchecked if a formula defi-


nition specified in an analysis sequence must reference variables that
are defined to the right of the root node.

The Evaluate immediately setting will have no effect if the definition in


question is numeric.

In the list of sequence events displayed in the Sequence Stored Anal-


yses dialog, variable assignments which do not use the Evaluate imme-
diately option are labeled Set variable: VarName = Value, while those
which do use that option are labeled Set var now: VarName = Formula.

Tip:
The Set Variable dialog can also be used to assign a random value to a
variable between analyses, using the Dist() function described in Chapter
16. A sequence can be created that includes a Set Variable command like
pCancer = Dist(n; 1). Immediate evaluation of this expression between
analyses will result in a random numeric definition of the variable.

Resetting default variable values at the end of a sequence


To automate resetting a variable to a default numeric value after a
sequence, use the following trick: use an extra variable to store the pre-
sequence value. This technique cannot be used to retain formulas.

Let’s say that you will create a sequence in which the numeric value of
the variable Var1 is changed between analyses. The numeric definition

Chapter 18: Storing Analyses and Analysis Sequences 239


of Var1 at the root node of the tree before the sequence is 7.5. Before
creating the sequence, create an extra variable, let’s call it BK_Var1.
Then, at the beginning of the sequence, add the definition “BK_Var1
= Var1” and check the Evaluate immediately option. This will cause a
numeric definition of BK_Var1 to be created using Var1’s default value
of 7.5.

Next, set up the rest of the sequence. At the end of the sequence, reset
Var1 to its original, pre-sequence value by adding the definition “Var1
= BK_Var1” with the Evaluate immediately option checked. This will
redefine Var1 at the root node with its original numeric value, 7.5, as
stored in the variable BK_Var1.

The resulting sequence might look something like this:

240 Part III: Analyzing Uncertainty Using Variables and Distributions


Part
Part IIIIV
MORE TREE-BUILDING
TOOLS AND OPTIONS

The chapters in Part III provide information on using variables and distributions in decision trees,
primarily to represent uncertain values when performing sensitivity analysis and Monte Carlo
simulation on these variables. It also provides information on storing analysis instructions,
making it easier to perform analyses that require a complicated setup procedure.

In this part:

• Chapter 19, "Building Complex Formulas Using Variables"

• Chapter 20, "Dynamic Linking to Excel"

• Chapter 21, "Large Trees: Using Clones, the Explorer View, and Links"

• Chapter 22, "Advanced Chance Node Techniques and Options"

• Chapter 23, "Bayes' Revision"

• Chapter 24, "Risk Preference and Utility Functions"

• Chapter 25, "TreeAge Pro Interactive and TreeAge Pro Run-Time"

PART IV: MORE TREE-BUILDING TOOLS AND OPTIONS


CHAPTER 19
CHAPTER 19: BUILDING COMPLEX FORMULAS USING VARIABLES

BUILDING COMPLEX FORMULAS


USING VARIABLES

Chapter 13 covers using variables for the purposes of sensitivity


analysis on parameter uncertainties in the model.

This chapter focuses on how to use variables to build complex


formulas, in particular for payoff calculations.

In this chapter:

• Variable formulas..................................................................... 244

• Using recursive variable definitions ............................................. 249

Chapter 19: Building Complex Formulas Using Variables 243


Variable formulas
Variable formulas Chapter 13 explained some of the advantages of using variables, rather
than numeric point values, in decision trees. Chapter 14 included details
on the tools (e.g., windows, dialogs) available in TreeAge Pro when
working with variables in decision trees. This chapter will continue
the tutorial on variables by explaining, in detail, the logic that dictates
where variables should be defined in a tree and how variables are evalu-
ated during tree calculations. For information on working with variables
in influence diagrams, see Chapters 26–27.

Building a complex cost formula: an example


The example model used in this chapter is based on the following medi-
cal treatment scenario. The assumption is that you are evaluating a new
pharmaceutical treatment used in your hospital for advanced infections
in an diabetic population. Initially, the modeling of the new intervention
is being done on a cost basis, looking only at foot infections.

Previously, the treatment decision was between prompt amputation of


the foot, and a course of high-dose, intravenous antibiotics. The new
intervention is an antibiotic that works much faster that the old drug,
so you will know sooner if it is going to halt the infection and save the
foot; soon enough to have complete certainty that performing an ampu-
tation below the knee will avoid any mortality risk. For this reason, the
new drug has already been adopted.

However, the new drug actually halts fewer infections over its shorter
course of treatment, which results in a higher number of amputations.
Based on the experience of your medical center, you estimate the costs
and probabilities and put them into a decision tree, shown below.

244 Part IV: Building and Analyzing Complex Trees


A copy of this tree file, called Cost Formula, is found in TreeAge Pro’s
Tutorial Examples subdirectory.

As shown in the model, the original high-dose, intravenous antibiotics


combined with surgical debridement (removal of tissue) offers a 65%
probability of curing the infection and saving the foot. If the antibiotics
do not stop the infection, there is an 15% probability of death with the
remaining 85% surviving and requiring amputation at the knee.

The new, experimental antibiotic has a different set of outcomes. It has


a 62.5% probability of curing the infection, with the remainder having
amputation at the knee.

With the immediate amputation of the foot option, the outcome is


assumed to be certain: the patient will survive. With immediate ampu-
tation of the foot, or later amputation at the knee, a prosthesis will be
fitted and physical therapy will be required.

Here are the component costs that are used to calculate total cost for
each scenario:

parameter value
Regular antibiotic $500
New antibiotic $500
Inpatient cost per day * $1,000
Foot amputation $5,000
Foot prosthesis $2,000
Loss of foot, physical therapy $10,000
Leg amputation $10,000
Leg prosthesis $10,000
Loss of leg, physical therapy $25,000
Life saving measures $10,000

(* To calculate the basic cost of the hospital stay associated with the
various scenarios, the number of inpatient days for each is also esti-
mated and multiplied by the per diem cost.)

The numeric cost payoffs specified for each outcome in the Cost For-
mula tree have been hand-calculated using a formula combining the
appropriate costs for each particular scenario, including costs of hospi-
talization, drugs, surgery, prosthetics, physical therapy, and other care.

Chapter 19: Building Complex Formulas Using Variables 245


As reflected in the rolled back tree, shown on a previous page, the least
costly option is to treat with the standard antibiotic. A Ranking analysis
can be used to calculate the additional cost per patient of the experimen-
tal antibiotic, $3427 (or approximately $70000 for each death that is
averted).

Implementing a cost formula using variables


The baseline information may be useful in a budget impact calculations.
However, you may want to analyze the model on the basis of different
estimates of component costs, some of which are uncertain. To do this
kind of analysis manually would be tedious, so you decide to implement
the cost calculations using a cost formula and perform sensitivity analy-
sis on the component variables.

Start by making a copy of the tree.

s Open the tree called Cost Formula, found in TreeAge Pro’s


Tutorial Examples subdirectory.

s Save a copy of the tree, changing the name to Cost Variables.

To save some time, a list of definitions of the cost component variables


has already been pasted into the tree, at the root node. To see these defi-
nitions, turn on the display of variable definitions in the tree.

s Choose Edit > Preferences…, and select the Variables/Markov


Info category.

s Select Show Definitions, and the choose either Expand node…


or Wrap at…, so that the full definitions will be visible. Click
OK to return to the tree.

Much of the work required to make the tree more flexible has already
been accomplished. All necessary variables have been created in the
tree, and each has at least one definition. The remaining tasks to be done
in the tree are:

• assign Total_Cost as the payoff of every terminal node


• redefine the variable (i.e., not fixed) components of
Total_Cost for each outcome, as necessary
Start by assigning the Total_Cost variable to all of the payoffs. Instead
of deleting the existing numeric cost payoffs that are found in payoff #1,
however, switch to payoff #2 and assign Total_Cost there.

246 Part IV: Building and Analyzing Complex Trees


s Choose Edit > Preferences…. In the Calculation Method cat-
egory, change Simple calculations to use payoff #2. Click OK
to return to the tree.

All terminal nodes should now indicate that no payoff has been
assigned. Now, update all the terminal nodes to use Total_Cost as the
formula for payoff #2.

s Choose Edit > Select If..., select the node type category, and
Terminal (or, position in tree = right-most). Click OK. (See
Chapter 8 for more on the Select If dialog.)

s With all terminal nodes selected, choose Values > Enter


Payoff…. For payoff #2, type Total_Cost (or select it from the
Variables list). Click OK to update the tree.

At this point, although the tree can calculate without causing errors, it
will not calculate costs correctly because most of the components of
Total_Cost are actually set to zero.

Let’s examine the tree to see where and how variables are currently
used and defined in the tree, and where definitions need to be added or
modified.

Using node-specific variable definitions


To calculate the payoff of any node in the tree, TreeAge Pro must evalu-
ate Total_Cost. To do this, it will search start searching for a definition
of Total_Cost at the terminal node, and work leftward until it finds a
definition. In this case, the first definition it will find is the default defi-
nition of Total_Cost from the root node, which accumulates the follow-
ing components:

(cost of inpatient care) + (cost of treatment) +


(cost of prosthetic device) + (cost of physical therapy)

Then the variables cHospital, cTreatment, cProsthetic and cPhysTher


need to be evaluated. TreeAge Pro restarts the search for each variable’s
definition at the terminal node which is being calculated. This right-to-
left search is restarted for each variable encountered in the calculation.
(The same process occurs for probability formulas, with a search rooted
at the branch being calculated.)

Chapter 19: Building Complex Formulas Using Variables 247


Therefore, for every path in the tree, each variable in the cost formula
must have an appropriate definition. Note that for some outcomes, some
components do not apply. For example, there are three terminal nodes
which represent non-amputation scenarios, and which therefore have no
prosthetic or therapy costs. These components should have zero values
in these paths.

Armed with a basic understanding of how TreeAge Pro searches for


variable definitions, it is not difficult to identify the correct node where a
variable definition is required.

Tip:
There are two important exceptions to the right-to-left search rule. One
involves the recursive definitions of variables, which will be covered at the
end of this chapter. The other exception involves the evaluation of tracker
variables; refer to the Healthcare Module documentation for details.

The tree fragment below illustrates how and where to add definitions of
the variables used in the Total_Cost formula (other solutions are pos-
sible, as will be seen later in this chapter).

248 Part IV: Building and Analyzing Complex Trees


You should confirm that, when rolled back, the Cost Variables tree pro-
vides the same results as the original Hospital Cost tree.

Variables with multiple definitions


In the Cost Variables tree, several variables have multiple definitions.
With the exception of numDays, however, no single variable has more
than one numeric definition. (The quantity represented by numDays,
used in calculating cHospital, is not intended to be used in sensitivity
analysis. If it were, separate variables would be used for each scenario.)

As a general rule, it is advisable to avoid giving a single variable more


than one numeric definition – for example, to represent the probability
of two or more distinct events. It is important to follow this rule if you
want to be able to perform sensitivity analysis on the variable in ques-
tion.

Recursive variable definitions


Using recursive variable A recursive variable definition means a definition in which the variable
definitions being defined also occurs in the definition. Recursive definitions can be
an effective way to build complex cost formulas, like those in the Cost
Variables tree. Rather than creating one or more long formulas, you can
gradually build the formula, adding components as events occur in each
particular scenario.

How recursive definitions work


During calculation of a probability, payoff, or Markov reward , when
the standard right-to-left search for a definition of a particular variable
(e.g., “costX”) first locates a definition (e.g., “costX=1,000”), TreeAge
Pro stops looking for additional definitions of that variable. However,
when the first definition TreeAge Pro encounters in the search is a self-
referential, recursive definition (e.g., “costX=costX+1,000”), the vari-
able (e.g., “costX”) is flagged as a recursive variable, and TreeAge Pro
continues searching for additional definitions of that variable to the left
of the node where the first, recursive definition was found.

Open the model called Recursive Variables, shown on the following


page, to see an example of this process.

All payoffs in the tree reference the same variable, costX, which has no
default definition. The decision node’s topmost subtree, labeled Good
Recursion, illustrates a valid recursive definition. When calculating the
payoff of the first terminal node in the Good Recursion subtree, labeled

Chapter 19: Building Complex Formulas Using Variables 249


High, the normal, right-to-left search for a definition of costX finds the
self-referential definition costX=costX+10 at that terminal node.

For the purposes of the current terminal node payoff calculation, costX
is now identified as a recursively defined variable. The search for addi-
tional definitions of costX is now continued one node to the left, at the
Good Recursion node. There, the non-recursive definition costX=10 is
found, the search is complete, and the payoff calculation can be carried
out.

Select the terminal node labeled High in the Good Recursion subtree,
and choose Analysis > Expected Value. The calculated value is 20.

A non-recursive definition of the recursive variable, like costX=10 at


the Good Recursion node, must eventually be found; definitions can’t be
infinitely recursive.

Look at the second branch of the decision node, labeled Bad Recur-
sion. In this subtree, when either terminal node’s payoff is evaluated,
TreeAge Pro’s variable definition search locates a recursive definition.
In both cases, the search for additional definitions is started one node to
the left, at the Bad Recursion node. No non-recursive definition of x has
been made there or at the root node. Therefore, if you try to calculate
the Bad Recursion subtree, an error message will be shown. To see this,
select the Bad Recursion node or either of its terminal nodes and choose
Analysis > Expected Value command.

250 Part IV: Building and Analyzing Complex Trees


Multiple recursions, using a series of recursive definitions of a vari-
able, will work, as shown in the Multiple Recursion subtree. Simply
ensure that a numeric definition of the recursive variable will even-
tually be found. For example, in calculating the payoff of the terminal
node labeled Middle in the Multiple Recursion subtree, the variable
definition search locates the recursive definitions costX=costX+10 and
costX=costX+5, and finally the non-recursive definition costX=0. Thus,
the calculated value of the Middle terminal node is 15.

Complex recursion
Other variables may be referenced in a recursive definition. To see
how TreeAge Pro’s variable definition search works with a combina-
tion of recursive and non-recursive variables, open the Multi-Variable
Recursion tree from the TreeAge Examples subdirectory. To better
explain this complex example, the text will illustrate the incremental
changes in the payoff calculation formula during TreeAge Pro’s variable
definition search.

All payoffs in the Multi Variable Recursion tree use the same vari-
able, costX (payoff = costX). When the terminal node labeled Z is
evaluated, the variable definition search finds the recursive definition
costX=costX+costZ at the terminal node (payoff = costX + costZ).

Before a recursive search for costX is continued one node to the left,
TreeAge Pro looks for a definition for costZ. The variable costZ is eval-
uated as a normal variable, which means that the search for a defini-
tion of costZ is started at the node being calculated, the terminal node
Z. A normal right-to-left search locates the non-recursive definition
costZ=1000 at the root node (payoff = costX + 1000).

The recursive search for additional definitions of costX is then con-


tinued at the Low Y chance node, which is one node to the left of the

Chapter 19: Building Complex Formulas Using Variables 251


node where the initial, recursive definition of costX was found. Another
recursive definition, costX=costX+costY, is found at the chance node
labeled Y (payoff = [costX + 1000] + costY). As above, before the
recursive search continues, a normal variable definition search for costY
is initiated at the terminal node being calculated, Z. At the chance node
Low Y, the non-recursive definition costY=200 is located (payoff =
[costX + 1000] + 200).

TreeAge Pro proceeds with the search for additional definitions of


costX, starting at the root node. A non-recursive definition of costX is
required, and found: costX=100. The final payoff formula for node Z,
therefore, is [100 + 1000] + 200. Calculating an expected value for the
Z terminal node returns the value 1300.

Before using complex recursion in your models, it is important that


you be thoroughly familiar with the logic underlying both standard and
recursive variable definitions in TreeAge Pro. You are also urged to test
your model to make sure it appears to be calculating correctly.

252 Part IV: Building and Analyzing Complex Trees


CHAPTER 20
CHAPTER 20: LINKING WITH EXCEL AND OTHER APPLICATIONS

LINKING WITH EXCEL AND


OTHER APPLICATIONS

This chapter covers dynamic linking, a powerful tool for integrating a


decision tree and an Excel spreadsheet.

Users of the Excel module also have the option of creating a fully-
linked influence diagram from a spreadsheet; see the Excel module
documentation for details.

In this chapter:

• Dynamic linking with Excel........................................................ 254

• Calculating payoffs using dynamic links: an example..................... 254

• Using Bilink() with non-dynamic links ......................................... 260

• Using DDE links ....................................................................... 260

• Publishing a node calculation to a spreadsheet or tree ................... 265

Chapter 20: Linking with Excel and Other Applications 253


Dynamic linking with an Excel spreadsheet
Dynamic linking with an If you have developed a complex set of cost or utility calculations in a
Excel spreadsheet spreadsheet, rather than trying to recreate the formula in a decision tree,
you can create dynamic links between the tree and the spreadsheet. With
dynamic links, TreeAge Pro inputs a set of variables into corresponding
spreadsheet cells, recalculates the spreadsheet, and retrieves results from
output cells.

TreeAge Pro’s implementation of dynamic links is similar to the bi-


directional links feature found in the DATA software, but is easier to
use, calculates faster, and is highly reliable. Dynamic links work during
any type of analysis (e.g. roll back, sensitivity analysis, and Monte
Carlo simulation).

To illustrate the basic workings of dynamic links, consider the trivial


example tree and spreadsheet pictured below.

Instead of assigning the payoff formula “Num_days*Per_diem” at


the terminal nodes, the formula has been set up in a spreadsheet. The
variables that are inputs into the payoff calculation, Num_days and
Per_diem, are given different definitions at each terminal node. These
definitions will be passed to the spreadsheet, which will then recalculate
the payoff and pass it back to the Cost payoff variable.

Calculating payoffs using dynamic links: an example


Calculating payoffs using Before proceeding, either recreate the simple tree and spreadsheet
dynamic links: an example shown above, or open the copies of the two files – Bilink.tre and
Bilink.xls — from TreeAge Pro’s Tutorial Examples subdirectory. If you
recreate the files, make sure the spreadsheet is saved to disk before con-
tinuing.

Excel Add-in:
Users of the TreeAge Pro Excel module have two additional, easier options
for setting up dynamic links. Dynamically-linked influence diagrams can be
automatically imported from a spreadsheet. Or, all of the steps required to
set up dynamic links with a tree can be performed using the TreeAge menu
in Excel. See the Excel module user’s manual for more details.

254 Part IV: Building and Analyzing Complex Trees


Once you have created the tree and spreadsheet, there are three steps to
setting up the dynamic link between them:

• link the tree to an output cell (or range of cells) in the


spreadsheet
• assign tree variable inputs to cells in the spreadsheet
• define a payoff variable or other parameter in the tree to
use the spreadsheet output
Before TreeAge Pro can connect to any input or output cells in the
spreadsheet, these cells must be named. The copy of the Bilink.xls
spreadsheet included in the Tutorial Examples subdirectory already has
names assigned to the output cell (Cost) and the two input cells (Per_
diem and Num_days).

® To assign a name to a cell in Excel:

s Select the cell (or range of cells), click in the Name box
(shown at left), type a one word name (like a TreeAge variable
name), and press the ENTER key to save the name.

If a cell (or range of cells) already has a name defined, it will appear in
the Name box when the cell (or range of cells) is selected.

Tips:
The other way to assign names to cells in the Excel spreadsheet is by select-
ing the cell (or range of cells) and choosing Insert > Name > Define…. The
dialog displayed is used to manage existing names in the spreadsheet.

When setting up dynamic links, it is helpful to give a spreadsheet cell a


name that is similar to the corresponding variable’s names (or vice versa,
if you set up the spreadsheet before creating the tree).

Linking to a spreadsheet output cell


Once an output cell has been named, a link to it can be pasted into the
tree.

® To paste a dynamic link output from Excel into the tree:

c Make sure the spreadsheet has been saved to disk.


c In the spreadsheet, select the output cell (Cost, in the example)
and choose Edit > Copy.

Chapter 20: Linking with Excel and Other Applications 255


c Switch to TreeAge Pro, and choose Edit > Links > Dynamic
Links…. Click the Paste Link button in the Outputs from
Excel section.

The link will be displayed in the list of outputs from Excel. Any number
of outputs can be pasted into the tree, so each is assigned a numeric
index. As is explained below, this integer index will be used in the
Bilink() function to reference the appropriate output cell’s value in tree
calculations. Along with the output link index, the cell’s name and cur-
rent value are displayed.

Pasting the first dynamic output link will automatically fill in the
required Excel Source File item, at the bottom of the Dynamic Links
dialog. All outputs and inputs must be to cells in this one file; the cells
can be located on any of its worksheets, however.

The source file can also be selected manually. For example, if the path
or name of the spreadsheet changes, all the link outputs and inputs can
be pointed to the new spreadsheet by changing the source filename.

® To change the name or path of the source spreadsheet:

s Open the Dynamic Links dialog. Under the Excel Source File
section, either edit the name manually or click the Browse…
button and search for the file.

256 Part IV: Building and Analyzing Complex Trees


If, instead of changing the source file, you need to change which cell or
sheet a particular link refers to, you can either delete the link and recre-
ate it, or update the properties of the existing link.

® To update a link output cell’s name (or sheet):

s Open the Dynamic Links dialog, select a link output, and click
the Properties… button.

A description entered in the link properties will appear in the Dynamic


Links dialog’s list of Excel outputs.

Connecting tree variables to input cells (optional)


The next step, connecting variables to input cells in the spreadsheet, is
what makes a link dynamic. If you skip this step (which may be desir-
able in some cases), the output cell’s value would not change during
calculations.

In our example, however, we need the Cost output cell to return differ-
ent values for each terminal node. To accomplish this, we will connect
the Num_days and Per_diem variables to the two cells that are inputs to
the Cost output cell. Each terminal node will have different definitions
of these input variables, and will therefore receive a different calculated
value from the Cost output cell.

Chapter 20: Linking with Excel and Other Applications 257


® To input variables into named input cells in Excel:

c In TreeAge Pro’s Dynamic Links dialog, under Inputs to Excel,


click the Add… button.

c Select a tree variable and the corresponding input cell. In this


case, choose Num_days for both. Click the More button to
store this pair and set up another.

c For the second pair, select Per_diem for both the variable and
cell, then click OK to return to the Dynamic Links dialog.

The list in the Inputs to Excel section will show each linked variable
and input cell pair, along with the cell’s current value.

To change which variable a cell is paired with, delete the variable’s


existing pair and recreate the desired pairing.

Using the cell output in the tree: the Bilink() function


Finally, the link output(s) must be referenced in the tree using TreeAge
Pro’s Bilink() function. As described in the above section on outputs
from Excel, this function takes at least one integer argument — the
index of the output item.

The Bilink(n) reference can be used directly within a payoff, or it can be


assigned to a tree variable.

258 Part IV: Building and Analyzing Complex Trees


® To use the output cell value in a tree calculation:

c The Bilink tree already has the variable Cost assigned to each
payoff. Now, select the root node and define Cost equal to
Bilink(1).

Tip:
If the link is to a range of cells, the Bilink() function‘s index argument is followed
by two more integer arguments — the row and column of the desired cell within
the range. For example:
Bilink(1; 10; 2)
will retrieve the value from row 10, column 2 of link #1’s region of cells.

Calculation using dynamic links


Now, roll back the tree to verify that different values have been recalcu-
lated for each terminal node using the spreadsheet formula.

Once the dynamic link is created, all calculations will utilize the link-
age, not just roll back.

Once the dynamic link is set up, even if the spreadsheet is closed when
you try to calculate the tree, TreeAge Pro can start Excel and open the
spreadsheet automatically. If the a named, linked cell is moved within

Chapter 20: Linking with Excel and Other Applications 259


the spreadsheet the links will not be affected, so as long as the linked
cells’ names are not changed or lost.

Using Bilink() to create non-dynamic links


Using Bilink() to create As mentioned above, if a dynamic link is set up without specifying any
non-dynamic links variables to input to Excel, then the link is not really dynamic. Use of
TreeAge Pro’s Bilink() function in this way is, in fact, the best way to
create static links to cell values in an Excel spreadsheet.

If you have a tree created in an earlier version of TreeAge which uses


the Sub() function for static, DDE linking (see below) or bi-directional
linking, these links will still work in TreeAge Pro. If all of your links are
to a single Excel spreadsheet, there are numerous benefits to convert-
ing existing links to the new Bilink() function — for both dynamic and
static linking. The Bilink() function will provide a more stable and flex-
ible means of linking to Excel.

If your tree is linked to other trees, to programs other than Excel, or to


multiple Excel spreadsheets, you can continue to use the DDE links
functionality described below.

Tip:
When building a tree in TreeAge Pro, the ability to link to cells in a spread-
sheet offers a powerful and flexible means of viewing and modifying values
in the tree. However, a complex tree making use of links will not calculate as
rapidly as a model which does not use links. Also, analyzing a tree making
use of the Bilink() function requires that the linked spreadsheet always be
present.

Using DDE links


This section covers the use of DDE for exchanging calculated values
Using DDE links between a tree and a document in another application, such as an Excel
spreadsheet. The use of DDE links to exchange values between trees
within TreeAge Pro works similarly, but this particular technique is cov-
ered in detail in Chapter 21, under the section Nested trees.

Setting up a DDE link to or from a tree is similar to using the Copy


and Paste menu commands for transferring text over the clipboard. The
value of a DDE link, however, is updated automatically, eliminating the
need to repeat the copy/paste sequence whenever the source document
changes.

260 Part IV: Building and Analyzing Complex Trees


There are a few terms you should be familiar with before proceeding.
In DDE, a document or application which makes information available
is called a server, and a document or application which receives infor-
mation over a DDE link is called a client. TreeAge Pro can act as either
client or server, or both.

There are several ways to exchange values via DDE:


• Trees can reference individual cell values, or a range of
cells, from a spreadsheet. These values will be updated as
determined by the external application. These client-side
links are created using the Edit > Links > DDE… dialog.
They are accessed in formulas in a tree using the Link()
function (replaces the Sub() function in previous versions).
• Nodes in a tree can export calculated values for use in
external applications. Other documents can link to the
expected value (cost and effectiveness separately, in cost-
effectiveness models), path probability, and/or standard
deviation as calculated at a specified node in the tree. There
links are created using the Edit > Copy Special command.
• Calculated node values can also be shared between TreeAge
Pro models. Trees linked in this way are said to be nested.
Nested trees are discussed in Chapter 21.

DDE linking to values in other applications


A client-side link can be set up to connect to the value of an item in
any DDE-compliant source document.. Typically, this is either a single
cell, or a range of cells, in a spreadsheet. There are two steps in creat-
ing a client-side link: 1) copying the item in the source document; and
2) pasting the link into the tree.

® To capture values stored in another document via DDE:

s Open the source document – for instance, an Excel spread-


sheet. Make sure the file has been saved.

s Select the item to link to – for instance, a cell, or range of


cells, in the spreadsheet. Choose Copy from the program’s
Edit menu. (Note that some applications have a Copy Link or
Copy Special menu item that is more appropriate.)

s Switch to the tree.

Chapter 20: Linking with Excel and Other Applications 261


Once the link source has been copied, it can be pasted into TreeAge Pro,
using the DDE Links dialog, shown below. The DDE Links dialog can
also be used to modify or delete links.

® To create a DDE link using the Links dialog:

s Select Edit > Links > DDE….

s In the DDE Links dialog, press the Paste Link button, and note
the index of the newly created link. (If the Paste Link button is
unavailable after copying a source item, refer to the section on
link requirements, below.)

s Close the dialog, and use the Link(n) function to reference to


the link value in a tree payoff or other expression

In place of a numeric value, any expression which evaluates to a valid


integer index can be used in a Link() function. As with the Bilink() func-
tion described earlier in this chapter, DDE links to multi-cell ranges can
reference a row and column in the selected range. Variable expressions
can be used for the row and column parameters of the Link() function.

Client-side link requirements


These guidelines should be followed when using client-side links:

Recalculation – In order for TreeAge Pro to update the value


of a DDE link when the source document (e.g., the spread-
sheet) is modified, both the tree and the source document must
be open, and a tree calculation using the link carried out.

262 Part IV: Building and Analyzing Complex Trees


Worksheet order – If there are multiple worksheets in a
source spreadsheet, the linked cells should be on the first work-
sheet (i.e., the left-most tab); see related tip, at left.
Cell names – If you are linking to a named cell in a spread-
sheet, TreeAge Pro will link to the name rather than to the cell
position. It is advisable to use named cells so that the link will
be maintained even if modifications to the spreadsheet cause
the cell location to change.
Cell formatting – Linked-to spreadsheet cells should not use
currency, or other text formats. TreeAge Pro may correctly
create the initial link to a cell with improper formatting; the
link will not update correctly when changes are made, though,
causing incorrect tree calculations.
As with dynamic links, it is important to name a cell or cell range
before copying it to create a DDE link. Linking to a named range means
that the cell can move around within the worksheet, or the range can
increase or decrease in size, without breaking the link.

The Links and Link Properties dialogs


The Links dialog displays the list of client-side links that have been cre-
ated in the active tree, with the following information for each link:
Index The unique index of the link is used in the
Sub() function. When the Sub() function is
encountered in a formula, TreeAge Pro uses
the most recent value(s) for the link with the
specified index.
OK A “+” will appear in this column in the
dialog if the link is currently open. This will
occur when the server document is open and
TreeAge Pro is able to establish a DDE con-
nection with it. TreeAge Pro will not auto-
matically open DDE link source documents.
Bi-Link A “Y” will appear in this column when the
link is marked as initiating old-style bi-
directional links.
Description This optional field can be used for your own
annotation purposes.

Chapter 20: Linking with Excel and Other Applications 263


The index numbers are initially assigned by TreeAge Pro, but can be
changed using the Link Properties dialog. To edit a link’s properties,
select it from the list and click the Properties button. In the Link Prop-
erties dialog, you can change the index integer, source document path,
description, and other properties of individual link items.

Changing the location of the client tree will not break the link, as long
as the server document is still accessible. However, if the location or
name of the server document, worksheet, or cell reference has been
changed, the link will be broken, and you must update the link using
the Link Properties dialog.

If you need to change many links’ paths at the same time, use the
Replace Directories dialog. With the Replace Directories dialog, you
can quickly update the path property of some or all of the links in the
active tree. TreeAge Pro will find all occurrences of the search text in
the selected source documents’ paths, substituting the new path string
you specify. This can be particularly useful if you create multiple links
to a spreadsheet, and then have to move the spreadsheet to a different
directory, drive, or computer.

® To replace path strings in many links at once:

s In the Links dialog, select all the links with a common path
element to update, and then click on the Replace… button.

s Enter a path string to search for, such as “C:\MyDocs”, and a


replacement string, such as “C:\Windows\Desktop”.

s If you wish to search only in selected links, check the Replace


only within selected items option. If it is not checked, all link
items will be searched and updated.

s Press ENTER or click OK to update the links.

Note that changing the location of the client tree will not affect the link,
as long as the server document is still accessible.

The Copy Link button in the Links dialog box enables you to duplicate
one or more client-side DDE links from one tree to another. In the
Links dialog of the original tree, select the links that you would like
to pass to another tree and click the Copy Link button. Then, open the
Links dialog box in the other tree and choose Paste Link.

264 Part IV: Building and Analyzing Complex Trees


If bi-directional links were created in an earlier version, the Bi-Direc-
tional Links… button at the bottom of the Links dialog opens the Bi-
Directional Links dialog.

Using TreeAge Pro as a DDE server


Publishing a node calculation Using DDE, TreeAge Pro can send calculated values from a tree to any
DDE client document, including spreadsheets and other trees (see the
to a spreadsheet or tree
section on Nested trees in Chapter 21). Each node can export via DDE
its expected value, path probability, and standard deviation.

® To use a calculated node value in another document:

s Select a single node whose value you would like to use.

s Choose Edit > Copy Special.

s In the Copy Special dialog box, choose the appropriate radio


button for the value you wish to export. Then, close the Copy
Special dialog.

s The DDE link information is now on the clipboard. In the


client document (which may or may not be a TreeAge Pro doc-
ument) choose Paste, Paste Link, or Paste Special.

Tip:
Users of the TreeAge Pro Excel module can use the TreeCalc() worksheet
function to dynamically set a cell’s formula to a node’s expected value.

Each application handles its own client-side DDE links differently; con-
sult the application’s documentation for details.

Chapter 20: Linking with Excel and Other Applications 265


All links to calculated node values will be updated whenever you roll
back the tree. In addition, particular calculated values are updated and
sent to the client when the corresponding Analysis menu item and node
are selected. For instance, if you have copied a link to the path prob-
ability of a node Disease, then the link will be updated both upon roll
back and when you choose Analysis > Path Probability with that node
selected.

When using DDE, both documents must be open for updating to work
predictably. If the client document is closed when you roll back the
tree, it will not receive these newly calculated values.

If you are unable to arrange all linked cells on a single, top-most work-
sheet, then you should ensure that both the spreadsheet and tree are
open whenever you make changes to values or formulas in the spread-
sheet. Linked cells not in the top worksheet will only be updated in the
tree when the spreadsheet is recalculated while the tree is open.

266 Part IV: Building and Analyzing Complex Trees


CHAPTER 21

TOOLS FOR LARGE TREES: CLONES,


THE EXPLORER VIEW, AND LINKING

This chapter focuses on a number of features in TreeAge Pro that can minimize
the difficulties involved in working with very large trees.

In this chapter:

• Working with very large trees .................................................... 268

• The Explorer View.................................................................... 269

• Cloning subtrees ...................................................................... 270

• The Node() function................................................................. 277

• Nested trees ........................................................................... 278

CHAPTER 21: TOOLS FOR LARGE TREES: CLONES, THE EXPLORER VIEW, AND LINKING

Chapter 21: Tools for Large Trees: Cloning, the Explorer View, and Linking 267
Working with Very Large Trees
Working with very The tutorials in the manual focus on the construction and analysis of
simple, small models. The trees that you build on your own may be
large trees
much larger, including hundreds or thousands of nodes.

There are reasons to keep trees as simple as possible. Not only are
larger trees potentially more difficult to maintain and update, but you
also risk losing the tree’s usefulness in graphically communicating your
model. Although there is no substitute for keeping a model as simple
and focused as possible, TreeAge Pro offers many features designed to
avoid or minimize some of the problems associated with large, complex
models.

There are several software features, covered already in this manual, that
can speed up the processes of creating and updating large trees. These
include:

• copying and pasting subtrees (Chapter 9)


• collapsing/hiding subtrees (Chapter 11)
• using the Zoom feature to get an overview of the tree
(Chapter 2)
• using preferences that compress the tree (Chapter 11)
• building influence diagrams (Chapter 4)
This chapter describes another feature, the tree Explorer view, that
allows the model builder to visualize what part of a large tree is cur-
rently visible in the main tree window, and then to quickly move to any
part of the tree. It also supports cutting, copying, and pasting subtrees.

There are also a number of modeling features in TreeAge Pro that can
reduce the working size of tree structures. This chapter covers two of
those features: using cloned (rather than copied) subtrees; and link-
ing multiple trees. Cloning, in particular, is a very powerful feature.
Efficient use of clones in a model might result in a highly complex tree
being created using only dozens of nodes and a handful of clone copies,
while without clones the same tree might have thousands of editable
nodes that must be updated.

268 Part IV: More Tree-Building Tools and Options


The Explorer view
The Explorer view TreeAge Pro automatically divides a tree window into two parts: the
main tree editing view on the right (white background); and the com-
pact Explorer view on the left (grey background). These two views of a
single tree are synchronized, so that selecting a node or subtree in one
view will also select it in the other.

The same menu commands are available no matter which view you are
using to navigate through a tree. While the main tree editing view is
richer in functionality, the Explorer view has a number of specialized
capabilities.

® To expand a subtree in the Explorer view:

s Click on the plus (+) sign to the left of a node symbol to dis-
play its hidden branches.

® To collapse a subtree in the Explorer view:

s Click on a minus (-) sign to the left of a node symbol to hide


its branches (and the rest of the subtree).

Chapter 21: Tools for Large Trees: Cloning, the Explorer View, and Linking 269
A node without a plus or minus sign to the left has no branches/subtree.

Chapter 9 showed how to duplicate or move subtrees in the main tree


view using the Select/Cut/Copy/Paste Subtree commands. It is also pos-
sible to accomplish these tasks in the Explorer view, without using the
menu commands.

® To duplicate a subtree in the Explorer view:

s Press and hold down the CONTROL key, then click and drag a
node with branches to another node.

® To move a subtree in the Explorer view:

s Click and drag a node with branches to another node.

The Explorer view can be made wider, in order to view more text or
generations of nodes, or narrower, in order to make more room fro the
main tree view.

® To change the width of the Explorer view:

s Place the cursor on the bar separating the Explorer view and
the tree window, and click and drag the bar to the left or right.

The Explorer view can also be hidden completely.

® To hide the Explorer view:

s Choose Display > Hide Explorer View, or click on the close


button in the top-right corner of the Explorer. (The menu com-
mand will change to Show Explorer View.)

Cloning subtrees
Cloning subtrees In addition to being able to duplicate existing subtrees using the Copy/
Paste Subtree commands, it is also possible to create clones of subtrees
(within a single tree). The basic difference between attaching clones and
pasting copies is that a copied/pasted subtree can be edited; these copies
do not automatically update when changes are made to the original.
Clone copies, on the other hand, are linked dynamically to the original,
master subtree, and are not directly editable.

A clone copy always automatically takes its structure and other contents
from its clone master (unless the relationship is explicitly broken).

Multiple clone masters can be used in a tree, and can be nested.

270 Part IV: More Tree-Building Tools and Options


Creating clone masters and attaching copies
The first step in the cloning process is to select a clone master subtree
for the purpose of being replicated at other locations in the tree. The
clone master does not have to be a finished structure; all that is required
is a single branch. The master subtree can continue to be updated after
copies of it have been attached to other nodes in the tree.

Each subtree designated a clone master can be identified by a heavy bar


beneath the branch leading to its root node. Like a copied subtree, the
clone master does not actually include its root node.

® To create a clone master:

s Identify the master subtree and select it. To select a sub-


tree, either hold down the CONTROL key while clicking on the
root node of the subtree, or select its root node and choose
Options > Select Subtree (see Chapter 8 for more information
on working with subtrees).

s Choose Edit > Create Clone.

Chapter 21: Tools for Large Trees: Cloning, the Explorer View, and Linking 271
s Provide a short, descriptive name to identify this clone master.
If the preference to display clone copies is turned off (see
below), this name will appear next to the root node of each
attached clone copy.

Clone masters are also assigned a numeric index, to appear next to the
clone master node.

Once the clone master has been created, the next step is to attach clone
copies at appropriate node(s).

Clone copies can only be attached to nodes which have no branches.


The nodes where you attach a clone copy should have the same node
type as the root node of the master subtree. Attaching a clone copy to
a node will not automatically change the type of the node to match the
clone master’s root node. This change can be made manually, if neces-
sary, either before or after attaching the clone copy.

Copies of a clone master can be attached to more than one node at a


time, if multiple nodes are selected.

® To attach clone copies:

s Select one or more appropriate nodes (i.e., a node with no


descendants).

s Choose Edit > Attach Clone.

s If you have only a single clone master in the tree, it will be


attached to the selected node(s) automatically. Otherwise, you
must select the name of the appropriate clone master from a
list, and click OK.

Cloning only works within a single tree. In addition, a clone master


copied as part of a larger subtree will not be pasted as a clone master (or
as a clone copy). A clone copy, when copied as part of a larger subtree,
will be pasted as a regular subtree, not a clone copy.

272 Part IV: More Tree-Building Tools and Options


It is possible to change the index number or modify the name of a clone
master once clone copies of it have been attached, using the Clones
dialog.

® To change a clone master’s name or index number:

s Choose Edit > Clones….

Changes made to the name and index properties of the clone master will
not break the linkage with clone copies.

Destroying and detaching clones


If you want to eliminate all clone copies of a particular clone master,
you can either destroy the current clone master, and automatically
detach its clone copies, or detach only selected clone copies one at a
time.

There are two ways to destroy a clone master.

® To eliminate a clone master using the Clones dialog:

s Choose Edit > Clones to open the Clones dialog.

s From the list, select the appropriate clone master, and click on
the Destroy button.

® To eliminate a clone master in the tree:

s Select the clone master subtree.

s Choose Edit > Destroy Clone.

Destroying a clone master will “un-publish” the subtree. The subtree


which was formerly the clone master will remain in the tree; all of its
clone copies will be removed.

If you have attached clone copies based on a master subtree which you
are going to destroy, but you wish to replace the clone copies with regu-
lar (i.e., unlinked and editable) copies, you should individually detach
each clone copy.

® To detach clone copies one at a time:

s Select a single node where a clone copy is attached, and


choose Edit > Detach Clone.

You will be given the opportunity to leave a regular copy of the master
subtree when a clone copy is detached. If you need to change which

Chapter 21: Tools for Large Trees: Cloning, the Explorer View, and Linking 273
clone is attached at a particular node, detach the current clone copy and
specify that you do not want to keep an editable copy of the cloned sub-
tree at the selected node.

Nesting clones
An important aspect of clones is the ability to nest clone masters. In
other words, a single subtree may be comprised of multiple, independent
clone masters, and also include various clone copies, as well. The tree
shown below has three, nested clone master subtrees. Clone masters 1
and 2 include nested clone masters and copies.

You cannot attach a copy of a master subtree to itself.

Using variables within clones


Calculations in clone copies are performed as if a full copy of the master
subtree existed at the location of the clone copy. This is true even if you
have turned off the display of clone copies in the tree (see below).

274 Part IV: More Tree-Building Tools and Options


Since clone copies are identical to the clone master, variables must be
used in the clone master if you want its copies to have different prob-
abilities and other values. The probability, reward, and payoff expres-
sions in the clone master and its copies will all use the same variables.
However, each will be able to use different values for these variables,
based on how the variables are defined outside the clones. By defining
variables used in the clones differently at the respective root nodes of
the clone master and each cloned subtree, appropriate values can be cal-
culated within the clone copies.

The file Cloning Example provides a relatively simple example of using


variables with clones. See Chapters 7 and 11 for more on variables.

Hiding clone copies


If clone copies are visible in the tree, their nodes and branch lines are
drawn in gray, in order to distinguish them from editable subtrees. One
of the advantages of using clones is that the replicated, clone copy
structures in your model can be hidden from view, thereby reducing the
overall size of the displayed tree, often quite dramatically. The Tree Dis-
play preferences include an option to hide clone copies.

® To hide clone copies:

s Choose Edit > Preferences, and go to the Tree Display cat-


egory in the Preferences dialog.

s Check the box labeled Hide clone copies, and click OK to


return to the tree.

When clone copies are hidden, just the name of the clone master is dis-
played to the right of the node where the copy is attached. Hiding clone
copies does not affect calculations in any way. Hidden clone copies will
be updated when changes are made to the clone master.

Chapter 21: Tools for Large Trees: Cloning, the Explorer View, and Linking 275
A common by-product of reducing tree size by hiding clone copies is
enhanced clarity. The essential features of the replicated subtree may be
understood by examining the clone master, which is the only instance
of the subtree that is displayed. In addition, the cloning linkages within
the model, which might otherwise be missed, are clearly visible, as each
clone copy indicates the master to which it is linked.

Note:
In DATA 3.5 and earlier versions, clone copy nodes were saved to disk,
potentially resulting in a very large file – as large as the same tree created
without clones. TreeAge Pro saves only the information needed to regenerate
the clone copies. In addition to reducing tree file size, this change speeds
up saving and closing files.

Suppressing clone copy updating


TreeAge Pro includes a feature for speeding up work on clone-heavy
trees. The Display menu includes a command to temporarily turn off the
updating of clone copies. If this setting is activated, existing clone copy
nodes will be hidden and changes to clone masters will not immediately
cascade through clone copies.

Normally, each change you make to a clone master forces a regeneration


of the clone copies. As you add more clones to your model, especially
nested clones, the time required for clone updating grows larger. Sup-
pressing the updating of clone copies will significantly speed up the pro-
cess of modifying a model with many clone copies.

® To clone copy updating on or off in a tree:

s Choose Display > Suppress Clone Updating.

Turning this setting on also hides existing clone copies, if not already
hidden using the tree preference described earlier in this chapter. It also
temporarily disables the commands used to create new clone masters
or attach new clone copies. To create new clones, you must turn off the
suppression of clone updating.

Performing an analysis will turn off the suppression of updates and


cause clone copies to be regenerated. It will be necessary to turn clone
copy updating back on manually if you want to create new clone mas-
ters or attach clone copies. The same menu command used to turn off
clone copy updating is used to turn it back on and regenerate the clone
copies.

276 Part IV: More Tree-Building Tools and Options


A tree can be saved with clone updating suppressed, for example if
you have to close the file before you finish making changes to the clone
masters. When reopened, the tree will still be in the suppressed state.

Tip:
Simply hiding clone copies using the Tree Display preferences is not the
same as suppressing clone updating.

Model-building strategy when using clones


Even while using the Suppress Clone Updating feature, working on
very large trees composed of many thousands of cloned nodes still
requires efficient model-building strategy. If you anticipate having
many thousands of cloned nodes, it is generally a good strategy to com-
plete your clone masters before attaching any clone copies – and, thus,
before clone updating suppression is needed. If you have to make struc-
tural or value changes to the clone masters later, then you can suppress
clone updates.

Turning on the Suppress Clone Updating feature works fairly quickly.


Turning it off, on the other hand, will result in a delay while the updated
clone copies are regenerated. An efficient approach is to wait until you
have a batch of changes to make to the clone masters before turning on
the suppression of clone updates. Then, with clone updating suppressed,
make the changes to the clone masters.

The Node() function


The Node() function TreeAge Pro 2004 introduces a powerful Node() function with many
possible uses. Chapter 1 of the Excel module documentation shows how
to reference TreeAge Pro’s Node() function within the TreeCalc() work-
sheet function, in order to dynamically link a cell to the expected value
of a node in the active tree. As described in Chapter 5 of the Healthcare
module documentation, the Node() function can also be used to nest
a Markov model within another Markov model, or to enable expected
value calculations in trees that previously were limited to analyses using
Monte Carlo microsimulation trials. The Node() function also offers a
means of reusing a “master” subtree at many locations in a tree — this
is similar to the way cloning is used, but with greater flexibility.

The Node() function’s arguments are used to pick a node in the tree and
a type of calculation to perform at that node. The function syntax is:
Node(attribute; method; branch list…)

Chapter 21: Tools for Large Trees: Cloning, the Explorer View, and Linking 277
Setting attribute to 0 disables the calculation and returns a value of 0;
setting it to an integer greater than 0 performs the node calculation.
(See the Healthcare module documentation for information on appropri-
ate settings for the attribute argument in cost-effectiveness trees.) The
Global() function can be used to update values in the “master” subtree,
if necessary, before it is recalculated; see Appendix D for details on
using the Global() function.

For method, use 0 to calculate an expected value at the desired node;


use a non-zero number to average that number of microsimulation trials
(e.g., setting method to 100 will average 100 random trials).

The branch list is a series of branch numbers used to pick a node to cal-
culate. At least one branch number must be specified, to select a branch
of the root node. To select a branch of that branch, add a second integer
to the list (and so on). The numbering of a node’s branches starts at 1,
for the top branch.

Nested trees
Nested trees For some trees, it may be possible to divide the model into multiple
parts through the use of separate, linked trees. By nesting trees – design-
ing one master tree and one or more subsidiary trees to feed into it – you
can segregate some events and keep each tree more manageable than a
single large tree that models everything.

DDE links can be created to expected values, path probabilities, and


standard deviations calculated in a tree; nested trees generally utilize
links to expected value. This section covers how to use linking to set up
nested trees, while the method by which you create DDE links is cov-
ered in Chapter 20.

When not to use nested trees


The use of nested trees does have drawbacks when it comes to perform-
ing sensitivity analysis or Monte Carlo simulation on the master tree.
Nested trees are not dynamically linked, which means that the only way
to update a link value in the master tree is to first manually recalculate
the subsidiary tree. When a parameter changes during sensitivity analy-
sis or simulation on the master tree, the subsidiary tree is not updated or
recalculated automatically.

See the information on the Node() function, above, for a possible alter-
native to the use of nested trees.

278 Part IV: More Tree-Building Tools and Options


Using a subsidiary tree to calculate a probability
You may wish to employ a subsidiary trees to model the probability of
an important outcome in the master tree. In this case, you would create
the subsidiary tree, probably using only chance nodes, that models one
or a series of secondary events whose occurrence would influence the
probability of the primary event in the master tree.

To calculate a probability for the primary outcome, assign a payoff of


1 to each endpoint in the subsidiary tree (an example is shown below)
that represents the outcome of interest, and 0 to the others. The expected
value of the completed subsidiary tree, between 0 and 1, should repre-
sent the probability of the primary event in the master tree.

After creating the subsidiary tree, simply create a link to its expected
value utilizing DDE; see Chapter 20 for information on creating links.
With the link information on the clipboard, the dynamic link between
trees can be created.

® To calculate a probability using a subsidiary tree:

s Select the root node of the subsidiary tree.

s Choose Edit > Copy Special..., and paste the link (using
Edit > Paste Link) into the probability field of the node in the
master tree.

Rather than referencing the link directly in the probability field, a vari-
able can be created in the master tree to represent the primary outcome’s
probability. That variable can be then be defined default for the tree
using the link reference.

When the master tree is calculated, it will evaluate the branch prob-
ability using the last available expected value from the subsidiary tree.
Changes made to the subsidiary tree will be reflected in the master tree’s

Chapter 21: Tools for Large Trees: Cloning, the Explorer View, and Linking 279
calculations through this probability. Both trees must be open when the
subsidiary tree is recalculated, in order for the master tree to update the
link value.

Using a nested tree to calculate a payoff


A subsidiary, linked tree can also model the payoff of a terminal node
(or nodes) in the master tree.

® To calculate a payoff using a subsidiary tree:

s Select the root node of the subsidiary tree.

s Copy a link to its expected value by choosing Edit > Copy


Special..., and paste the link (using Edit > Paste Link) into the
payoff of the relevant terminal node(s) in the master tree.

280 Part IV: More Tree-Building Tools and Options


CHAPTER 22 CHAPTER 22: ADVANCED CHANCE NODE TECHNIQUES AND OPTIONS

ADVANCED CHANCE NODE


TECHNIQUES AND OPTIONS
This chapter provides information on a number of features which can
be used to customize chance nodes in decision trees, some of which
are new in TreeAge Pro 2004.

In this chapter:

• Using non-coherent probabilities................................................. 282

• Sampling normalized probabilities from a


multivariate Dirichlet distribution ............................................... 284

• Using DistKids( ) to create invisible branches ............................... 286

• Distributing a fixed set of chance node branches........................... 288

Chapter 22: Advanced Chance Node Techniques and Options 281


Using "non-coherent" probabilities:
Using "non-coherent" In order to avoid certain calculation errors, TreeAge Pro normally
requires the branch probabilities of each chance node to sum to 1.0.
probabilities Probabilities that meet this requirement are referred to as “coherent.”
However, there are some situations where it may be useful to relax or
remove this restriction. For this reason, TreeAge Pro offers the option of
turning off the error checking that normally protects against mistakenly
assigning non-coherent probabilities.

You are urged to employ this option cautiously, only after giving careful
consideration to the potential hazards of turning off the error checking.

® To disable errors when using non-coherent probabilities:

s Choose Edit > Preferences…, and select Other Calc Settings.

s Check the option labeled Allow probabilities to not sum to


100%. The sub-option, Randomize ‘discrete’ individuals…, is
described below.

As precautions against unintended use, TreeAge Pro will not save this
preference as a default setting for new trees, and will prompt you to
confirm this preference each time a tree using it is opened.

Note:
Non-coherent probabilities are not compatible with microsimulation (first-order
trials), but can be used in probabilistic sensitivity analysis using expected
value calculations.

Reporting future net present values in the tree


When net present value discounting is used in a tree, the payoff calcula-
tion TreeAge Pro reports at a terminal node and uses in expected value
calculations to the left normally reflects that scenario’s value discounted
back to the present time. Therefore, expected values reported at inter-
mediate nodes in the tree are in terms of present value — not value at
the time of the intermediate event or decision. Some kinds of analysis,

282 Part IV: More Tree-Building Tools and Options


however, such as options valuation, may require calculating net present
values at intermediate nodes in the tree in which a scenario’s value is
discounted back only to that future date, rather than to the present.

In situations where it is appropriate, it is possible to use non-coherent


probabilities to perform the discounting, instead of discounting each ter-
minal node payoff. Net present value discounting is generally performed
by dividing a value by (1+discount_rate)^time. By turning off prob-
ability error checking, this division could instead be performed on each
branch probability. If done correctly, the expected values calculated at
the root node of the tree will be unchanged from a standard, payoff dis-
counting model. See the TreeAge web site for more information.

As with other uses of probability non-coherence, care must be taken to


ensure that hidden probability errors are not unknowingly introduced.

Modeling discrete and/or changing size "populations"


Normally, decision trees are used to calculate an expected, or average,
value. In budget-oriented or population-based modeling, however, the
ultimate goal may be to determine not an average, but an overall cost or
benefit. In some cases, this can be accomplished simply by multiplying
the expected value by some number (e.g., the number of projects, or the
size of a population). If TreeAge Pro’s probability coherence require-
ment is turned off, an equivalent option would be to do the multiplica-
tion via tree “probabilities.”

Non-coherent probabilities might be used to model a population whose


size changes over time. In a Markov model built using the Healthcare
module, for example, the starting population can be initialized — sized
and distributed among possible health states — prior to the Markov cal-
culation. Then, during Markov calculations, non-coherent probabilities
could be used to change the size of the population, modeling entry from
other populations (i.e., from uninfected to infected) or internal popula-
tion growth (births).

When allowing non-coherent probabilities, a sub-option to randomize


“discrete” individuals is available that will maintain integer probabilities
at subsequent chance nodes — in effect, keeping individuals whole by
randomizing them at chance nodes (during any analysis, not just simu-
lation). This might be relevant, for example, where small probability
events are critical (i.e., in a vaccination model where continued trans-
mission of a contagious disease requires a “whole” carrier).

Chapter 22: Advanced Chance Node Techniques and Options 283


Sampling probabilities from a multivariate Dirichlet distribution
Sampling probabilities If a chance node has more than two branches with non-negligible proba-
from a multivariate bilities, performing a sensitivity analysis or Monte Carlo simulation that
changes the values of these probabilities can be problematic. One option
Dirichlet distribution is to normalize the chance node’s probability expressions. For example,
let’s say the node has three outcomes, A, B, and C. Rather than assign-
ing variables to two probabilities, and using the # remainder calculation
in the third, you could do the following: assign three expressions that
always sum to 1.0, like pA/(pA+pB+pC) and pB/(pA+pB+pC)
and pC/(pA+pB+pC). No matter what values (>= 0) are assigned to
pA, pB, and pC, the three normalized probabilities will always sum to
1.0. (The # remainder could still be used in place of one of these.)

TreeAge Pro offers another solution using a special, multivariate form


of the beta probability distribution, called a Dirichlet distribution. This
distribution can be used to represent the uncertainty in all of the prob-
abilities of a chance event. During Monte Carlo simulation, the distri-
bution can sample probabilities for each branch, using normalization to
ensure that the probabilities always sum to 1.0.

If the distribution is parameterized with a list of three positive alpha


values, as shown here, TreeAge Pro will samples three independent

284 Part IV: More Tree-Building Tools and Options


Gamma[alpha, beta=1.0] distributions and normalize these to create a
list of three probabilities.

To utilize the generated sample probabilities, the Dist() function


described in Chapter 16 is used with a second argument to indicate
which branch (i.e., alpha) to use, as shown below.

Rolling back the tree shows the mean values of the probabilities, which
are simply the normalized alpha parameters.

Performing a simulation in the example tree shows the effect of sam-


pling independent Gamma distribution values, based on the list of alpha
parameters, and then normalizing. For each iteration of the simulation, a
different set of Gamma random variates is drawn. Each iteration results
in a different sum, as well as different ratios of the Gamma random
variates to the sum (i.e., the probabilities), but normalization ensures
that the resulting probabilities sum to 1.0.

Note:
In TreeAge Pro 2004, simulation text reports and graphs report only the first
sampled Dirichlet probability. However, it is possible to use either a tracker
variable or TreeAge Pro’s Global() matrix function to store and report each
sampled probability. For example, to create a table of a branch’s sample
values, wrap the Dist() function reference in the Global() function, as in:
Global( _sample; branch; Dist(1; branch))
See Appendix D for more details on using the Global() function, including
how to dynamically save a text file of the Global matrix.

Chapter 22: Advanced Chance Node Techniques and Options 285


Using DistKids() to create invisible branches
Using DistKids() to As noted in Chapter 1, a chance node is a structural representation of a
probability distribution. In Chapter 16, which deals with Monte Carlo
create invisible branches
simulation, another representation of a probability distribution was
introduced — a sampling distribution, which is not a structural element
in the tree, but is instead a numeric input into a probability or payoff/
reward calculation.

TreeAge Pro offers two methods for combining the specific advan-
tages of a chance node and a sampling distribution. The more flexible,
dynamic option involves use of the DistKids() probability function at a
chance node, as described in this section. The other option, the Options
menu’s Distribute Children command, is covered in the next section.

If your model includes a series of decisions, there may be one or more


uncertainties that are resolved prior to a decision. In many cases, such
an uncertainty might be represented with a chance node preceding the
decision node. The problem is that in order to represent an uncertainty’s
probability distribution with sufficient detail, more than just two or three
branches may be necessary (for example, when an important parameter
has a non-linear effect on calculations; see Chapter 16). Structurally
representing even a small number of uncertainties in this fashion can
result in a very “bushy” tree.

The solution TreeAge Pro offers is to visually represent such uncertain-


ties with a chance node having a single branch, and during any calcula-
tion to invisibly expand this chance node into a fuller probability distri-
bution. An appropriate probability distribution must be added to the tree
using the Distributions dialog, as it would be for Monte Carlo simula-
tion. The distribution will be referenced twice in the tree: first, in the
probability expression of the chance node branch’s probability; second,
in a payoff or other tree calculation to the right.

® To dynamically distribute branches at a chance node:

s Choose Values > Distributions…, and define the desired distri-


bution, noting its integer index.

286 Part IV: More Tree-Building Tools and Options


s In the probability for a chance node with a single branch, enter
DistKids(index; n). The first function argument is the
distribution’s index, and the second argument is the number of
virtual “branches” to create internally during calculations.

s In a payoff or other expression, enter Dist(index; 2).


During any calculation that includes a branch generated
dynamically by a DistKids() function referencing the same
distribution, this usage of the Dist() function will return the
parameter value sampled for that branch.

The behavior of the function during any calculation (not just Monte
Carlo simulation) is to randomly sample n values from the selected dis-
tribution, creating n virtual branches (each with equal probability, 1/n,
and each assigned a randomly sampled value). The value of the chance
node is the average of the values of the n replicates of the tree structure
to the right, with each replicate calculated using a sample value for the
parameter.

TreeAge Pro 2004 currently incorporates the expected value of the


DistKids() chance node into tree calculations to the left (for example,
the initial decision node in the example), and also generates a special
text report for each dynamic chance node. The report includes rows
showing each parameter sample value and the corresponding virtual
branch’s expected value; if the branch is a decision node, a column also
reports which alternative is optimal for that branch/sample.

Roll back displays the single visual chance node branch with a proba-
bility of 1/n, where n is the number of branches specified in DistKids().

Chapter 22: Advanced Chance Node Techniques and Options 287


The roll back box for the chance node using the DistKids() probability
function will display the calculated mean for the n sampled branches,
unless there is another chance node somewhere to the left that also
uses the DistKids() function. Roll back boxes at nodes to the right of a
chance node using the DistKids() function should be ignored, because
they will display the value calculated for the last replicate of that node.

Distributing a fixed set of chance node branches


Distributing a fixed set TreeAge Pro’s Distribute Children command can be employed to assign
of chance node branches real branches (not virtual ones, as in the case of the DistKids() func-
tion), probability estimates, and value estimates at a chance node, based
on a selected distribution. The Distribute Children feature is useful
when you would like to have a chance node that visually represents the
impact that a Normal, Binomial, or other continuous or discrete distri-
bution has on the model. This is a one-time process in which TreeAge
Pro will generate the branches, probabilities, and parameter values asso-
ciated with the specified distribution.

The Distribute Children feature is a static version of the dynamic,


DistKids() feature described above. To use Distribute Children, you
must have a chance node from which no branches emanate, and a
variable to hold the values of the distribution in each branch. Unlike
the DistKids() function, it is not necessary to create a distribution in
TreeAge Pro’s Distributions dialog prior to using the Distribute Chil-
dren feature.

® To distribute a fixed set of branches at a chance node:

s Select a chance node with no branches, and choose Options >


Distribute Children….

288 Part IV: More Tree-Building Tools and Options


s In the first dialog, enter the number of branches you would like
created, and select an existing variable to hold the values of the
distribution. Click OK to continue.

s In the Distribution Picker dialog, select a distribution type and


enter its parameters. Click OK to continue.

s In the final dialog, indicate how the branches should be distrib-


uted.

In most cases, you will probably want to accept the default setting, to
assign each node an equal segment from the full range of the distri-
bution. If you click Equal Ranges, TreeAge Pro will calculate the prob-
ability to be used for each branch. However, you may instead assign
each node an equal probability. If you do so, TreeAge Pro will calculate
the value of the distribution for each node, as described below.

You may also drag the handles which separate the nodes to create a
custom allocation of the distribution.

s Press ENTER or click OK to create your distribution of branches.

Chapter 22: Advanced Chance Node Techniques and Options 289


TreeAge Pro will create the branches for you. At each branch, the prob-
ability will be entered and the value of the distribution will be stored in
the definition of the selected variable.

TreeAge Pro assesses the probability for each branch by finding the area
beneath the curve over the node’s range. The value of the distribution
variable at a given branch is the midpoint of that node’s range. In some
circumstances, the probabilities of the branches may not add to 1.0 due
to rounding error. If so, slight manual corrections to the calculated prob-
abilities will avoid an error message when you try to calculate the tree.

The custom, table-based distributions described in Chapter 17 cannot be


used with the Distribute Children command.

290 Part IV: More Tree-Building Tools and Options


CHAPTER 23

BAYES’ REVISION IN
DECISION TREES

This chapter shows how, in the tree window, TreeAge Pro can assist
you in performing the calculations that implement probability revision
using Bayes’ theorem.

Chapter 27 provides instructions on performing more complex Bayes’


revision using influence diagrams.

In this chapter:

• An introduction to Bayes' revision............................................... 292

• Performing Bayes' revision in the tree......................................... 294

CHAPTER 23: BAYES’ REVISION IN DECISION TREES

Chapter 23: Bayes‘ Revision 291


An introduction to Bayes’ revision
An introduction to If your model includes imperfect tests or forecasts followed by deci-
Bayes’ revision sions, you may wish to utilize TreeAge Pro’s Bayes’ revision feature.
TreeAge Pro can automatically perform probability revision using
Bayes’ theorem. The process occurs once, during the initial construction
of the model; based on your answers to a few questions, TreeAge Pro
will generate a set of variable definitions that calculate the revised prob-
abilities. The probability expressions will be recalculated every time the
model is evaluated, and results can change as your estimates of prior
and likelihood probabilities (see below) change.

Bayes’ revision is implemented in both the tree and influence diagram


windows. Bayes’ revision in the tree window is able to revise prob-
abilities automatically based upon a single test. To revise probabilities
associated with sequential tests, you should initially build your model as
an influence diagram.

Probability revision using Bayes' theorem


Bayes’ revision allows decision makers to calculate decision probabili-
ties from likelihood probabilities. Likelihood probabilities, or forecast
likelihoods, are answers to questions in the form, “If this test is per-
formed on a part known to be faulty, what is the probability of a positive
result, indicating a problem?” This type of probabilistic information is
often available, but is not immediately useful in making decisions. What
is needed are the decision probabilities, which address questions such
as, “If a particular part tests positive, what is the probability that it really
is faulty?”

The decision probabilities are so named because in the real world, they
are the probabilities upon which decisions are based. These are also
sometimes called posterior (or a posteriori) probabilities.

The basic formula for revising probabilities is:


P ( E | H ) ∗ P( H )
P( H | E ) =
P( E )
where H is the hypothesis (e.g., faulty or not faulty) and E is the evi-
dence (e.g., test result). The formula is applied once for each hypoth-
esis-evidence combination — for example, P(not faulty | positive), or
the probability not faulty given a positive test result. P(H) represents the
prior (or a priori) probability of the condition. P(E) is a marginal prob-
ability, calculated as part of the revision.

292 Part IV: More Tree-Building Tools and Options


A simple numeric illustration
The following example is designed to offer a sense of the potential use-
fulness of Bayes’ revision. If you are already familiar with the type of
applications that require Bayes’ revision, you may want to skip this sec-
tion.

Consider an automated test for a defect in a semiconductor. The defect


is present in 1% of the items under scrutiny. It has been demonstrated
that the available test will detect 98% of the faulty materials, mean-
ing that 2% of those pieces with the defect will not be picked up by the
test. Also, the test is known to incorrectly identify as faulty 3% of those
pieces that are without defect.

You have under consideration installing a machine to perform this test


in your facility. What is the likelihood that a part which tests positive
actually has the defect? How certain can you be parts that tested nega-
tive don’t have a defect? The information about the accuracy of the test-
ing equipment provided above does not directly answer these crucial
questions, but Bayes’ revision can be used to do so.

Let’s say we have a batch of 10,000 items to be tested. If the estimated


prior probability of defect is 1%, we would expect 100 items in the
batch to have the defect. Of these, about 98 should test positive. Of the
9,900 pieces without the defect, we said approximately 3% (297) would
test positive. Thus, a total of 395 (297 + 98) test subjects would test
positive (this is one of the marginal test probability).

The Bayes’ revision formula is relatively intuitive when worked out


using trees, as shown below.

The first revised decision probability is the ratio 98/395, or approxi-


mately 25%. This is the probability that a positive test actually indicates
the presence of the defect. In this case, 75% of the positive tests are in
error. The other decision probabilities are similarly calculated. With this
information, a decision maker could compare the performance of the
new test with existing methods or competing technologies.

Chapter 23: Bayes‘ Revision 293


Performing Bayes' revision in the tree
Performing Bayes' To use TreeAge Pro’s automatic probability revision, you should first
revision in the tree obtain numeric values for the likelihood probabilities associated with
the test and the a priori probabilities for the hypotheses. Then, your tree
must be set up with a specific structure:

• The root of the Bayes subtree (the Bayes node) must be a


chance node; it does not have to be the root node of your tree.
• The immediate descendants of the Bayes node must be
chance nodes. They represent the possible outcomes of the
test or forecast.
• The test subtree must be symmetrical, i.e. each test outcome
(e.g., T+ and T-) must have an identical subtree whose
branches represent the possible underlying conditions (the
hypothesis; e.g., C+ and C-).

Branches should be named descriptively. TreeAge Pro will walk you


through the process of inputting the appropriate values or variables, and
will need the branch descriptions in order to be able to phrase questions
about the known and calculated probabilities.

Note that the structural limitations specified above apply only at the
time of using TreeAge Pro’s automatic Bayes’ revision command. After
TreeAge Pro calculates and inserts the decision probabilities, you may
refine the structure of your model to include asymmetries or interme-
diate events, including decisions interposed between the evidence and
hypothesis nodes. The structural requirement allows TreeAge Pro to
decipher the natural structure of your problem during the probability
revision calculations.

The limitations specified above do not necessarily apply when Bayes’


revision is used in the influence diagram window; see Chapter 27.

Entering the probabilities


Once you have properly constructed the test subtree, you can choose
its root node and perform Bayes’ revision. TreeAge Pro will then ask
a series of questions. If the test subtree represents a dichotomous test

294 Part IV: More Tree-Building Tools and Options


for a binary hypothesis (two possible results, two possible conditions),
TreeAge Pro will ask if you have sensitivity and specificity informa-
tion; see the Note below. Otherwise, for each hypothesis, TreeAge Pro
will ask you to enter the a priori probability that the condition is pres-
ent. It will then ask you to enter the test likelihoods associated with the
hypothesis.

If you use variable names for the probabilities that you enter, you can
easily perform sensitivity analysis on these parameters. It is also pos-
sible to enter numeric probabilities.

After you have completed the entry of probabilities, TreeAge Pro will
create an additional set of variables representing the revised prob-
abilities to insert into your tree. These variables are automatically set to
hide their definitions (at the test node)

Tip:
If you tell TreeAge Pro that you have sensitivity and specificity informa-
tion for the test in question, you will need to indicate which evidence node
represents a positive test result and which hypothesis node represents the
presence of the condition for which you are testing.

Let’s get started with an example of Bayes’ revision in the tree window.

s Open the file Oil Drilling Bayes, found in TreeAge Pro’s Tuto-
rial Examples subdirectory.

Chapter 23: Bayes‘ Revision 295


In this unfinished model, simple prior probability estimates are assumed
for the outcomes of drilling an oil well in a target area based on prior
success in the immediate region. We’ll assume the prior results for 10
other wells, which will make up the prior probability distribution, are:

Dry: 5/10 (50%)


Wet: 3/10 (30%)
Soaking: 2/10 (20%)

Based on prior experience, we’ll assume, a table is constructed showing


for a well’s actual state (dry, wet, or soaking) what the test probabilities
are for seismic soundings (no, open, or closed structure) :

No Open Closed
Structure Structure Structure
Given Dry 0.6 + 0.3 + 0.1 = 1.0
Given Wet 0.3 + 0.4 + 0.3 = 1.0
Given Soaking 0.1 + 0.4 + 0.5 = 1.0

If knowledge about the underlying geological structure of the well site


can be obtained through seismic soundings, Bayes’ theorem can be used
to revise the probability distribution of the extractable oil deposits based
on the test results.

Although the probability revision calculations can be done by hand, or


manually in the tree as shown on a previous page, TreeAge Pro is able
to manage this much more easily. Moreover, if the tree is set up using
variables, it will be possible to carry out sensitivity analysis out on prior
and likelihood probabilities.

Take a moment to examine the structure of the Oil Drilling Bayes tree.
The extra decision node at the root will be explained later. The chance
node closest to the root node has three branches representing the pos-
sible results of the seismic soundings. The results of the test are the first
event in the tree. The ultimate condition of interest is the amount of oil
that can be extracted, and this uncertainty is represented by the three
subtrees with the branches Dry, Wet, and Soaking.

® To perform Bayes’ revision:

s Select the Seismic Soundings node, and choose


Options > Bayes Revision….

296 Part IV: More Tree-Building Tools and Options


TreeAge Pro will present a series of dialogs for required parameters.
In each dialog, TreeAge Pro requires a valid entry in the Variables or
Expression field, usually the name of a new or existing variable. The
bottom field is optional. It can be left blank; any value entered there will
be used to define a variable specified in the top field.

s For the prior probability of a dry well (your estimate prior to


receiving the results of seismic sounding) enter the variable
name pDry in the Variable or Expression field. Delete the 0 in
the Variable definition… box. Click OK to continue.

TreeAge Pro will prompt you to create the new variable pDry.

s Check the Define numerically option, and enter 0.5 in the


value field. Click OK to create and define the new variable.

Chapter 23: Bayes‘ Revision 297


s For the likelihood probability that no structure will be detected
in a dry field, enter pDry_NoS in the Variable or Expression
field and click OK. Define the new variable equal to 0.6.

s For the probability that no structure will be detected in a dry


field, enter pDry_OpenS in the Variable or Expression field
and click OK. Define the new variable equal to 0.3.

s For the probability that closed structure will be detected in a


dry field, accept TreeAge Pro’s default expression 1-(pDry_
NoS+pDry_OpenS).
s For the prior probability of a Wet well, use another new vari-
able, pWet, and define it equal to 0.3. For the next two likeli-
hood probabilities, use new variables pWet_NoS (= 0.3) and
pWet_OpenS (= 0.4). For the third likelihood probability,
accept the default expression again, 1-(pWet_NoS+pWet_
OpenS).
s For the prior probability of Soaking accept the default
expression 1-(pDry+pWet), which will calculate to 0.2. For
the next two likelihood probabilities, use new variables
pSoak_NoS (= 0.1) and pSoak_OpenS (= 0.4). For the
third likelihood probability, accept the default expression again,
1-(pSoak_NoS+pSoak_OpenS).
Note that existing variables can also used in assigning likelihood prob-
abilities, if you create them before performing Bayes’ revision.

After the last required expression is entered, TreeAge Pro will define
another set of variables, at the selected test node, to hold the formulas
for the decision probabilities.

298 Part IV: More Tree-Building Tools and Options


The complex expressions used to define these variables (with names
like “_p1”) will be hidden from view in the tree, even if you have the
variable definitions display preferences turned on. TreeAge Pro auto-
matically turns off the Show in tree property of these variables. See
Chapter 13 for information on changing variable properties.

® To view the definitions of the revised probabilities:

s With the test chance node still selected, choose Values > Show
Variable Definitions Window.

The window should show a list of definitions like that on the next page.

You may later perform sensitivity analysis on any of the variables you
created to represent underlying quantities, both prior probabilities and
likelihoods. You should not perform sensitivity analysis directly on the
decision probabilities created by TreeAge Pro and used in the chance
node branches. Analyzing the prior and likelihood probabilities, instead,
will work correctly.

Making changes to the test subtree


Once you have completed the Bayes’ revision process, it will probably
be necessary to modify the structure of the tree in a number of ways.
The example file Oil Drilling #3 illustrates a tree initially set up using
Bayes revision, and then modified to include the various decisions. To

Chapter 23: Bayes‘ Revision 299


get from the Oil Drilling Bayes tree to the completed Oil Drilling #3
tree, you must add the initial decision whether or not to undertake seis-
mic tests, and the four decisions whether to drill.

In the Oil Drilling Bayes tree, you can select No Structure, Open Struc-
ture, and Closed Structure, one at a time, and choosing Options > Insert
Branch. Choosing to insert a branch to the right of each will create new
chance nodes.

Adding the initial decision, whether to undertake the seismic testing,


requires close attention to detail. In this case, an extra decision node was
included at the outset to simplify matters somewhat. The prior probabil-
ity variables pDry and pWet should apply in both the Seismic Soundings
and No Soundings subtrees; since they have been defined at the root
node, this will be the case.

Valid prior and likelihood probability expressions


Two types of entries are valid in the Variable or Expression field. You
may enter the name of a variable, as in the above examples, or you may
enter an expression, such as “var1+var2.” Expressions are scanned for
new variables. You may not use the hash mark (#) in the Expression
field.

Any variables already created in the tree may be selected from the pop-
up menu and inserted into the expression.

If the expression entered is a simple variable name, the variable will be


defined at the Bayes node if you enter a numeric value in the Variable
definition field of the dialog. If you leave the definition field blank, as in
the tutorial above, no definition of the variable will be added to the test
node.

Tip:
If, as in the example, the test node is an internal node, entering both a new
variable name and a numeric value in the Bayes’ revision dialog, and then
giving the new variable a numeric value in the Properties dialog, will create
definitions in two places: at the selected test node and at the root node of
the tree. The root node definition will, of course, be overridden in the Bayes
subtree by the Bayes node definition. The risk is that the modeler may change
the value at the root node definition, but not at the Bayes node definition,
resulting in incorrect calculations.

300 Part IV: More Tree-Building Tools and Options


CHAPTER 24

UTILITY FUNCTIONS AND


RISK PREFERENCE

TreeAge Pro allows you to set up a risk preference utility function in a


tree, which can be used to account for a decision maker’s aversion to
risk.

In this chapter:

• Risk preference: an illustration ................................................... 302

• Creating a risk preference function.............................................. 303

• Risk preference curves .............................................................. 307

CHAPTER 24: UTILITY FUNCTIONS AND RISK PREFERENCE

Chapter 24: Utility Functions and Risk Preference 301


An illustration
Risk preference: an Assume that a rich uncle offers you an opportunity to win some money.
illustration He proposes to flip a coin giving you the opportunity to receive either
$10,000 or $1,000, depending on whether you correctly predict the out-
come. If you call the flip correctly, you will receive $10,000, and if you
are wrong you will receive $1,000.

To make this game more interesting, assume that your uncle complicates
matters by offering an alternative opportunity. The alternative is also a
coin flip. Under this one, you will receive $50,000 if you are correct, but
you will have to pay him $5,000 in the event you lose on the coin flip.
There will be only a single coin flip; it is up to you to choose between
the two. As you will see, it may not be wise to base your decision solely
on traditional expected value calculations. The tree below models your
uncle’s offer.

As the tree illustrates, there are two lotteries. Both provide the same
(50 - 50) odds of winning, but they have different outcomes. You must
choose one of them. On the basis of expected value, you should choose
lottery #2. Its expected value ($22,500) is more than four times that of
lottery # 1 ($5,500).

However, what about the risk posed in lottery #2 that you could actually
end up losing $5,000? At least in lottery #1 there is no risk of being out-
of-pocket – you are guaranteed to win something. How one responds to
the downside risk posed by lottery #2 involves a subjective analysis of
the decision maker’s aversion to risk.

Note:
Risk preference functions can be used only if the calculation method is set
to Simple.

Certainty equivalents and risk aversion


Consider lottery #1 described above. The expected value is $5,500.
Would you sell the opportunity to play this lottery for $4,000? In other
words, if you were offered $4,000 by a third party who wanted to buy
into the lottery, would you sell? Would you sell for $3,000? What is the
302 Part IV: More Tree-Building Tools and Options
minimum value for which you would sell the lottery? This value is your
certainty equivalent for this lottery. The certainty equivalent of a lottery
can be perceived as the expected value of that lottery, adjusted for risk
preference (the risk-adjusted expected value).

A certainty equivalent is similar to an expected value, in that it is a


single numeric quantity which represents the value of an uncertain
event. The expected value of an uncertainty is a statistical mean calcu-
lated for the possible outcomes based on their probabilities. The cer-
tainty equivalent, on the other hand, is a subjective measure. It is the
answer to a question of the form, “What is the minimum (or maximum)
value for which I would trade this uncertainty?”

Now consider a situation which is undesirable from the start. Lottery #3


is a coin flip in which you will either owe your uncle $2,000 or you will
owe him $12,000. In this situation, we are interested in finding the max-
imum amount that you are willing to pay to a third party to assume your
obligation under the lottery. Would you pay $4,000? Or $5,000? Your
answer to this question is your certainty equivalent for that lottery.

The certainty equivalent for a lottery is usually in the same numeric


range as the expected value. The gap between the certainty equivalent
and the expected value is a measure of risk aversion.

Most decision makers are risk-averse to some degree. They are willing
to pay a premium, small or large, to avoid risk. Their certainty equiv-
alent for any lottery will be lower than the lottery’s expected value. In
contrast, a risk-seeking decision maker is one whose certainty equiv-
alent for a lottery is higher than the lottery’s expected value. The risk
taker is willing to pay a premium in order to participate in the lottery.

Creating a risk preference function


Creating a risk TreeAge Pro is able to record your risk function as a mathematical
curve, and apply this curve to the expected value of an uncertainty. Rec-
preference function ommendations are then made based on your derived certainty equiva-
lents, rather than on expected values.

There are two types of curves, or risk functions, which TreeAge Pro can
use. The first is called the constant risk-aversion function. It is calcu-
lated by using the formula:

U( x) = 1 − e− x / R

where U is an arbitrary utility scale, and R is a risk preference coef-


ficient, described below. The utility scale is used only for internal calcu-

Chapter 24: Utility Functions and Risk Preference 303


lations; the formula’s inverse is later applied to find certainty equiva-
lents.

If constant risk aversion is selected, you will be asked to supply a single


value. Specifically, you will be shown a generic lottery in which you
have a 0.5 probability of winning X and a 0.5 probability of losing one-
half X, and asked to specify the largest value of X for which you would
be willing to take part in the lottery. This value is used as the risk prefer-
ence coefficient in the above formula.

You can think of the lottery as representing an investment in a bio-


tech company which is about to get a judicial ruling on the validity
of an important patent. If the ruling is favorable (0.5 probability), the
investment will double in value; if unfavorable (0.5 probability), the
investment will fall in value by 50%.

What is the most you would invest under these circumstances? This
amount is referred to as your risk preference coefficient.

® To assign a constant risk-aversion preference function:

s Choose Options > Enter Risk Preferences….

s Ensure that the Constant risk aversion button is selected, and


choose OK.

s Answer the single lottery question, shown below. This is the


risk preference coefficient.

A serious shortcoming of the constant risk aversion function is that the


accuracy of the exponential formula on which it relies becomes unre-
liable (or mathematically undefined) if any one of the model’s outcomes
— with either a positive or negative payoff — are much larger than the
risk preference coefficient.

304 Part IV: More Tree-Building Tools and Options


The non-constant risk-aversion function avoids this shortcoming. More-
over, since it is tailored to fit your specific model, it is superior to the
constant risk aversion function in all respects, except that it takes longer
to set up initially. TreeAge Pro will ask you a series of questions about
your certainty equivalents for the model you are working on. It will then
create a curve made up of line segments approximating your true risk
function.

Because the non-constant risk function is assessed on the basis of the


range of payoffs in your model, it is not possible to set up this risk func-
tion until after your model is complete. If you plan to change any of
the payoffs in your model after entering a non-constant risk preference
function (including during a sensitivity analysis), note that the risk func-
tion may no longer be valid if payoff values fall outside the range of
payoffs considered in the risk preference function (see the tip below).
TreeAge Pro will warn of an attempt to apply an invalid non-constant
risk preference function.

Tip:
To extend the range of payoffs used in building the risk preference function,
add a zero probability event somewhere in the tree with the highest (or
lowest) possible value to represent in the function.

After entering the non-constant risk function, it can be graphed from the
Analysis menu; the graph’s text report will show the values used in the
function.

® To assign a non-constant risk-aversion preference function:

s Select the root node and choose Analysis > Payoff Range, to
ensure that your model calculates correctly (to create the risk
preference function, TreeAge Pro must determine the range of
potential payoff values).

s Choose Options > Enter Risk Preferences….

s Ensure that the Non-constant risk aversion button is selected.


Select the number of linear segments used to approximate your
preference function. More segments will result in a more accu-
rate picture of how your risk preferences vary over a range of
potential outcomes, but you must take the time to answer more
questions about your certainty equivalents.

Chapter 24: Utility Functions and Risk Preference 305


s TreeAge Pro will ask you for certainty equivalents for a series
of lotteries based on your tree. For each lottery, you must
assign the minimum (or maximum) certain value for which you
would trade the uncertainty displayed.

s Click the More button after entering each certainty equivalent.


For the last certainty equivalent, click Done.

s As you supply the requested information, TreeAge Pro will


generate your risk preference curve, shown in the top part of
the window.

Other options
Risk preferences can also be set up via the Preferences dialog box. From
there you may turn the risk preference function on or off, and enter the
risk preference functions.

The active risk preference function can be graphed by choosing


Analysis > Graph Risk Preference Function.

If you are using the constant risk-aversion preference function, you may
perform a one-way sensitivity analysis on the risk preference coef-
ficient. At the bottom of the list of variables specified in the sensitivity
analysis dialog box will appear Risk Preference Coeff. If you select this
“variable,” your analysis will graph the effect of varying the coeffi-
cient’s value.

306 Part IV: More Tree-Building Tools and Options


When a risk preference function has been turned on, an item in the
status bar will read RISK. In addition, the boxes that appear to the right
of each node following Roll Back will be drawn with rounded corners.

Risk preference curves


Risk preference curves A straight-line risk-preference curve represents a decision maker who
is risk-neutral. This type of decision maker bases decisions on expected
values rather than certainty equivalents.

A risk-averse decision maker will have a curve with a decreasing slope,


meaning that certainty equivalent is less than expected value. The curve
will typically be steeper in the low value range, where aversion to risk is
weak, and will grow progressively flatter as the values get larger (both
positive and negative), where aversion to risk becomes stronger. The
more risk-averse you are, the more your curve will deviate from the 45°
straight line representing risk neutrality.

If you encode a curve that includes some unexpected bumps when


graphed, this means that some of your responses were inconsistent. You
should repeat the process. Don't be discouraged; developing a meaning-
ful non-constant risk utility curve takes hard thinking and careful con-
sideration.

For further reading on risk preference, refer to the general texts on deci-
sion analysis listed at the end of Chapter 1.

Chapter 24: Utility Functions and Risk Preference 307


308 Part IV: More Tree-Building Tools and Options
CHAPTER 25

TREEAGE PRO™ INTERACTIVE


AND TREEAGE PRO RUN-TIME

This chapter describes TreeAge Pro InteractiveTM and the TreeAge Pro
2004 Run-time version, both of which are designed to make it possible
to distribute decision trees beyond the community of TreeAge Pro users.

Using TreeAge Pro 2004, you can quickly create a simple interface
for your tree which can be shared via the Run-time version. TreeAge
Pro Interactive, on the other hand, is a powerful software component
that can be used to integrate any tree with a wide variety of custom
interfaces, including: Excel macros; stand-alone Visual BasicTM or
FlashTM applications; and Internet-based applications hosted on
Windows servers.

In this chapter:

• Developing TreeAge Pro Interactive applications ............................ 310

• Creating Run-time custom interfaces ........................................... 312

CHAPTER 25: TREAGE PRO INTERACTIVE AND TREEAGE PRO RUN-TIME

Chapter 25: TreeAge Pro Interactive and TreeAge Pro Run-Time 309
Developing TreeAge Pro Interactive™ applications
Developing TreeAge Pro TreeAge Pro Interactive is an ActiveX control used to integrate TreeAge
InteractiveTM applications Pro decision trees with web sites, databases, spreadsheet macros, and
custom applications. With TreeAge Pro Interactive, it is possible for
applications such as browsers, spreadsheets, and Visual Basic programs
to view, update, and analyze trees created in TreeAge Pro.

You design a user-friendly interface utilizing your choice of Window-


sTM development tools (Active Server Pages and VBA macros being
the most popular), and then link it to a decision tree using TreeAge Pro
Interactive's straightforward set of commands. A simple interface might,
for example, enable remote users to view the tree, make changes to
selected values (probabilities, payoff components, etc.), and then per-
form appropriate analyses, such as sensitivity analysis.

310 Part IV: More Tree-Building Tools and Options


With TreeAge Pro Interactive, it has become feasible for any decision
maker – even one without expertise in decision theory and model build-
ing – to perform sophisticated decision analysis. Your decision analysis
application can be accessed remotely, over an intranet or the Internet, or
distributed on CD-ROM (or other media) to a targeted audience.

TreeAge Pro Interactive makes it practical to pursue many new applica-


tions of decision analysis, for example:
• R&D portfolio analysis – facilitates continued monitoring and
analysis of R&D projects and their associated uncertainties,
including costs, timing, market characteristics, and return on
investment.
• Dynamic treatment protocols – enable input of patient-
specific information by the treating physician or dispensing
pharmacist, deliver decision analyses at points of care, and
facilitate the prompt implementation of new treatment options;
• Pharmaceutical sales tools – employ cost-effectiveness
models developed during drug development and testing for
marketing the resulting product, giving a pharmaceutical sales
force a dynamic tool able to take into account customer-spe-
cific costs and outcomes for alternative treatments;

Web-based demonstrations, as well as trial versions of the TreeAge Pro


Interactive software for modelers and interface builders, can be found at
the TreeAge web site: http://www.treeage.com/

Technical information
TreeAge Pro Interactive is a separate software component available
from TreeAge Software which allows trees to be integrated with stand-
alone Windows applications, as well as multi-user applications, includ-
ing Windows web server applications. In a web environment, since all
processing can be done on the server side, there is no restriction on the
choice of operating system or browser used to access the model, making
TreeAge Pro Interactive useful for worldwide distribution of models.

In addition to the web-based demonstrations at the web site, example


scripts are available with the trial version that demonstrate the use of
Excel, Visual Basic, or Delphi as the host application. Visit the TreeAge
Software web site for more information.

Chapter 25: TreeAge Pro Interactive and TreeAge Pro Run-Time 311
Creating Run-time custom interfaces
Creating Run-time custom The Run-time version of TreeAge Pro offers another means of distribut-
interfaces ing decision analyses to clients (or others in your organization). It has
all of the analysis capabilities of TreeAge Pro, but no model-building
features. Using TreeAge Pro’s built-in Custom Interface designer, in a
matter of minutes a simple interface can be set up to allow users of the
Run-time software to interact with your model. Low-cost licenses of the
Run-time software can be purchased from TreeAge Software, Inc. and
downloaded by the end user.

Run-time custom interfaces are useful for projects which do not require
either TreeAge Pro Interactive's Internet/intranet capabilities, or the high
level of control over interface customization possible with Visual Basic
and other programming tools. All customization is done in TreeAge
Pro and stored in the tree. Simplified input windows allow for changing
selected parameters and performing preset analyses.

In addition, users with both TreeAge Pro and a developer license of


TreeAge Pro Interactive have the ability to convert a Basic Custom
Interface into a more customizable TreeAge Pro Interactive application;
refer to the TreeAge Pro Interactive documentation for details.

How it works
The first step, of course, is building the necessary model or models in
TreeAge Pro. Designing a Custom Interface for one of your trees is
quite simple:

• Before adding the Custom Interface, save a backup copy of


the tree.
• Set the display and analysis privileges users should have.
• Decide which variables in your model can be modified by
clients. For each variable, you will enter certain information
specifically for use in the Custom Interface.
• If you are designing an Extended mode interface, turn on the
display of variables in the tree under Edit > Preferences….
Run-time users click on the variables display boxes to
modify model parameters.
• Run and store the analyses that you want clients to perform.
Stored analyses (listed in the Analysis > Storage submenu)
will be available for recall by clients.
• Save your tree; the custom interface will be saved with it.

312 Part IV: More Tree-Building Tools and Options


The model builder chooses between two interface modes, Basic and
Extended, when designing a tree's Custom Interface. Generally, the
choice between the two modes should be based on the sophistication
and needs of the end user. If the interface will be converted into a
TreeAge Pro Interactive application, however, then a Basic Custom
Interface should be used.

The Basic mode is primarily for clients who do not need (or should not
be allowed) to see the tree directly. You may optionally permit them to
view the tree structure, but all menu items will be disabled.

When a Basic mode file is opened with the run-time version of TreeAge
Pro, a gray window (the “Basic Client Window” or “BCW”) with sev-
eral buttons will appear. The two most important are the Change Values
and Analyze buttons. By clicking on the Change Values button, a client
can change specified parameters in your model by entering the new
values in a simple list, without having to select the appropriate node and
then open the Define Variable window. The Analyze button will bring up
a list of analyses prepared (i.e., stored) by the model builder for use by
the client.

The Extended mode is for clients who are more savvy about decision
trees. When an Extended mode file is opened with Run-time TreeAge
Pro, the tree is in full view. In contrast to the Basic mode, where a single
Change Values dialog applies to the entire tree, each node in the tree can
have its own Change Values dialog box for changing model parameters
locally.

Chapter 25: TreeAge Pro Interactive and TreeAge Pro Run-Time 313
In either mode, stored analyses created by the model builder may be run
by the client. In the Extended mode, it is also possible to allow clients
to run certain of their own analyses, since the model builder can decide
which Analysis menu items are to be disabled and which are to remain
active.

Creating a Basic Custom Interface


The Basic mode has a single Change Values dialog. It applies only
to numeric values stored as defaults for the entire tree. Thus, any
parameters that will be modified by the client must be stored by the
model builder as numeric default values at the root node. In designing
your model, remember that the client will not be able to modify any def-
initions at internal nodes or any non-numeric definitions. Thus, if you
are modifying an existing tree for use as a run-time tree, some additional
variables, as well as some modifications to existing variable definitions,
may be required.

Tip:
Remember to maintain backup copies of your original tree, without the
Custom Interface features. The Custom Interface becomes a permanent
part of a tree file.

® To start setting up a Basic Custom Interface:

s Choose Options > Design Custom Interface…. Ensure that


the Basic radio button is selected and click the Basic Options
button.

314 Part IV: More Tree-Building Tools and Options


This will open the Basic Custom Interface Options dialog shown below.
This dialog box provides options for allowing clients to:
• view the tree;
• save changes to the tree;
• turn a risk preference function on or off (if one has been
entered by the model builder); and
• change the payoff being calculated, or the calculation
method being used (e.g. from simple to multi-attribute).

If you opt to allow clients to change the active calculation method, they
will see a pop-up menu in the interface that will allow them to select
from the items you enter in this dialog. The client’s current selection
for calculation method does not affect the list of stored analyses, so you
must indicate for each stored analysis any dependence on a specific cal-
culation method.

To select default values that should be accessible to the client, return


to the main Design Custom Interface window and click the Basic
Parameters button. The Parameters dialog is shown at the top of the
next page.

Chapter 25: TreeAge Pro Interactive and TreeAge Pro Run-Time 315
The list in the top-left corner of the dialog shows all variables with
default definitions. At the bottom is the list of parameters that clients
will see. To move a variable from the top list to the bottom list, use your
mouse to select the variable in the top list and click the Add button. This
will open the Add Parameters dialog, shown below.

316 Part IV: More Tree-Building Tools and Options


You may change the order of presentation of variables added to the
interface display by selecting an item in the bottom list and clicking
either the Move Up or Move Down button. If you click Remove, the
selected parameter will no longer be included in the list of modifiable
values, and will return to the top list. Clicking Remove will not remove
that variable from the underlying tree. Clicking Edit… with a variable
selected will open the Add Parameters dialog for that variable.

The description, comment, low value, high value, and default (baseline)
value displayed initially in the Add Parameters dialog for a variable are
taken from the variable’s Properties dialog (see Chapter 13 for details),
but can be changed and are maintained separately from the regular set
of variable properties.
• Description: The text you enter here will be seen by the user
in the Change Values dialog, instead of the variable’s name.
If you have previously entered a short description for the
variable (in the Properties dialog), that description will be
used by default.
• Comment: If you have entered a longer comment for the
variable (in the Variable Properties dialog), the user will see
a button labeled with a “?” to indicate that more information
is available for a particular parameter.
• Low/High values: These specify the range of values that
you will allow clients to enter.
• Default value: The client always has the option of resetting
a given parameter to this default value. Note that the default
value is not used initially. When a client first opens the
model, the initial values are those that are saved in the tree.
If you allow clients to save the tree, whenever the tree is
reopened, the initial values used are those that were saved,
not the specified default values.
• Allow probability wheel: If the low and high values are 0
and 1, you may allow clients to enter this parameter by using
the wheel. Unlike the wheel when it is called directly from
the tree window, this option will work only on one value at
a time. Thus, if you have a chance node with more than two
branches whose probabilities you would like to allow users
to change, you have little control over the coherence of the
probabilities.

Chapter 25: TreeAge Pro Interactive and TreeAge Pro Run-Time 317
• Integer values only: If this box is selected, only integers
will be allowed. Otherwise, any real number in the specified
range is accepted.
• On/off switch: If you select this option, clients will not see a
numeric editor in the Change Values dialog. Instead, a check
box will be displayed with the name you enter. The client’s
selection will be stored as 1 if the check box is selected, and
0 if it is cleared. The default value must be 0 or 1 to indicate
the initial state of the check box.

Testing the Basic Custom Interface


As explained above, the analyses that will appear in the run-time inter-
face are those that you have saved via the Analysis > Storage sub-
menu. See Chapter 18 for detailed information on storing analyses. Note
that your basic custom interface will not become active until you store
at least one analysis in the tree; instead, the user will see the tree and
menus, as in an extended interface.

Every analysis available in the Analysis menu may be stored for use
from the Basic Custom Interface except Graph Risk Preference Func-
tion, Show Optimal Path, Verify Probabilities, and Roll Back. If you
set the Basic Options so that the user can see the tree, they will have
the option of running any of these analyses from the Analysis menu.
In order to deactivate the Analysis menu when the tree is displayed, the
designer must temporarily switch the tree to extended interface mode
and disable the Analysis menu items there.

To view the Basic Custom Interface, simply select Options > Show
Custom Interface. This will activate the BCW. As a designer, you will
always have access to the Show Tree button, even if you have not
enabled this option for your clients. To fully test the interface, open the
tree using a purchased Run-time version of TreeAge Pro.

Creating an Extended Custom Interface


When you select Extended Options from the Design Custom Interface
dialog, you will be able to select which analyses clients will be able to
perform manually. Typically, you should prepare most analyses using
the Analysis > Storage sub-menu, but you may wish to allow clients to
experiment with performing some simpler analyses on their own. In this
event, you should consider disabling the sensitivity analyses, threshold
analysis, and tornado diagrams, as these require considerable knowledge

318 Part IV: More Tree-Building Tools and Options


of TreeAge Pro’s interface. This will avoid the risk that your client will
get a result that has the appearance of being correct, but is not.

From the Design Custom Interface dialog, press the Extended radio
button to begin designing the interface. Press the Extended Parameters
button, and you will see a list of all variables in your tree.
A variable will be ready for use in the Extended Custom Interface if all
of the following apply:
• it is shown in the tree;
• it has an assigned range of values (the low and high
values will be used to check the validity of the user’s
input);
• it has a short description; and
• it is not a Monte Carlo tracker variable.

You may verify these characteristics (or set them) in the Properties
dialog box, which you can access by pressing the Properties button
either here or in the Define Values dialog box. If all of the above crite-
ria are met, a "+" symbol will appear in the Ready for ECI column in
the list box of the Extended Custom Interface Parameters dialog. How-
ever, the only definitions of that variable which may be modified by cli-
ents are those which are numeric.

If, for example, the variable TestCost is designated Ready for ECI, cli-
ents will be able to use the Change Values dialog box (described below)
to modify any numeric definition of TestCost. Any instances where
TestCost is defined in terms of another variable, or where the definition
consists of an expression, will not be modifiable.

These limitations are not necessarily imposed when the user runs analy-
ses directly from the Analysis menu, if you so permit in the Options
dialog, discussed above. For example, if you permit the client to select
Analysis > Sensitivity Analysis..., the client will be able to run a sensi-
tivity analysis on any tree variable.

When an Extended mode tree is opened by a client using the Run-time


version of TreeAge Pro, the full tree appears. To run analyses previ-
ously prepared and stored by the designer, clients will need to choose
Analysis > Storage > Run. The ensuing dialog will be the same as that
shown for the Basic Custom Interface.

Chapter 25: TreeAge Pro Interactive and TreeAge Pro Run-Time 319
In addition, clients may be allowed to perform their own analyses, as
described above.

Changing values in the Extended Custom Interface


To open the Change Values dialog box at a particular node, the client
must double-click inside the variables box at that node. The variables
box is the list of variables that is displayed below the node name when
the model builder has elected to show variable definitions in the tree.
(To use the Extended Custom Interface, this flag must be set; see the
Variables Display page of the Preferences dialog.) Not all variables that
appear in the variables box will be editable in the Change Values dialog
box, nor will all nodes that have a variables box necessarily display a
Change Values dialog box. See the section about parameters, above.

Clients will not be able to modify probabilities directly. If you wish to


allow clients to change probabilities, you must either set up the appro-
priate probability variable for use in the Change Values dialog, or enable
the probability wheel (discussed below). All probabilities will be dis-
played as their numeric equivalents, even when roll back is turned off.

The probability wheel can be very useful in the Extended Custom Inter-
face. In order to enable its use at a particular chance node, you must
ensure that at least one branch has a probability stated as a variable that
has been prepared for the Extended Custom Interface. (This variable
need not be shown in the tree.) Clients using Run-time TreeAge Pro will
not be able to change the storage location for probability values. See
Chapter 12 for detailed instructions on using the probability wheel.

Testing the Extended Custom Interface


When building a model’s Extended Custom Interface, you may want
to test it from time to time to see how it will look when opened with
Run-time TreeAge Pro. This is possible from within the full version of
TreeAge Pro.

To see how a model’s Extended Custom Interface will look to some-


one with the run-time version, simply pull down the Options menu, and
choose Mimic Run-Time. If you set this option, TreeAge Pro will enable
and disable menu items exactly as it does for users of Run-time TreeAge
Pro. To turn off run-time emulation, simply repeat the same menu selec-
tion.

320 Part IV: More Tree-Building Tools and Options


Protecting your intellectual property
If your model is going to be distributed to users outside of your orga-
nization, you may want to take a few additional steps to help protect the
model's intellectual property content.

It is possible to prevent anyone from using the full version of TreeAge


Pro to open your model, specifying that a particular model can be
opened only with Run-time TreeAge Pro. You may also specify a start-
up message (e.g., a license agreement) to be displayed when the model
is opened. Any attempt to open a “Run-time-only” tree with the regu-
lar TreeAge Pro software will generate a message that the file can be
opened only with Run-time TreeAge Pro. This level of protection may
be desirable even if you are not concerned with protecting intellectual
property, but only with ensuring that users not misuse or make unde-
sirable changes to the model.

For information on how to implement these features, contact TreeAge


Software technical support ([email protected]).

Chapter 25: TreeAge Pro Interactive and TreeAge Pro Run-Time 321
322 Part IV: More Tree-Building Tools and Options
Part
Part IIIV
WORKING WITH INFLUENCE
DIAGRAMS

The two chapters in Part V detail TreeAge Pro’s influence diagram interface. These chapters
cover the basics of influence diagrams as well as advanced topics such as asymmetry, Bayes’
revision, and EVPI.

See the TreeAge Pro Excel module documentation for information on converting a spreadsheet
into a fully-linked influence diagrams.

In this part:

• Chapter 26, "Building Influence Diagrams"

• Chapter 27, "Advanced Influence Diagram Features"

PART V: WORKING WITH INFLUENCE DIAGRAMS


CHAPTER 26

BUILDING INFLUENCE DIAGRAMS

This chapter builds on the basic information provided in Chapter 3 on


creating influence diagrams in TreeAge Pro. The topics covered in this
chapter – including creating asymmetry, converting influence diagrams
to trees, and using value nodes – will apply to most influence
diagrams you create.

See the Excel module documentation for information on importing


fully-linked models from spreadsheets.

In this chapter:

• When to use influence diagrams ................................................ 326

• Time ordering of nodes ............................................................. 328

• Asymmetry ............................................................................. 329

• Variables and values................................................................. 330

• Using the assessment window ................................................... 333

• Miscellaneous ......................................................................... 336

CHAPTER 26: BUILDING INFLUENCE DIAGRAMS

Chapter 26: Building Influence Diagrams 325


When to use influence diagrams
When to use influence TreeAge Pro’s influence diagrams has both benefits and drawbacks com-
diagrams pared to trees, which may affect your decision about whether to begin a
particular model as an influence diagram. First, the benefits:

Bayes’ revision
TreeAge Pro’s implementation of influence diagrams includes some
features that simply are not available in the tree window. Influence dia-
grams can, for example, automatically calculate posterior probabilities
using Bayes’ revision with multiple sequential tests (the tree window’s
implementation of Bayes’ revision can handle only a single test). More-
over, TreeAge Pro’s implementation of Bayes’ revision is handled more
intuitively in the influence diagram window. For example, in the tree
window, you must perform Bayes’ revision prior to modeling any inter-
vening decisions. Since this restriction does not apply to influence dia-
grams, several steps in the model-building process can be avoided.

EVPI (expected value of perfect information)


Calculation of EVPI can be handled more elegantly in the influence dia-
gram window. There are situations that the tree implementation of EVPI
cannot handle, especially in larger models, but that are straightforward
and simple to handle in the influence diagram window. Detailed instruc-
tions on implementing Bayes’ revision and EVPI in the influence dia-
gram window follow in Chapter 27.

Model size and other considerations


Many model builders feel that the ability to build the model as an influ-
ence diagram which can be converted automatically into a fully-func-
tioning, asymmetrical tree offers the best of both worlds. With its com-
pact size, it is often more practical to print and present an influence dia-
gram than the associated tree. Moreover, building an influence diagram
forces you to consider issues of influence that may be overlooked when
building a tree.

While learning to build influence diagrams, the greatest frustration flows


from uncertainty about whether their influence diagram correctly models
their problem. In TreeAge Pro, the remedy is to convert the influence
diagram into a tree, and check the tree’s structure. If the tree is not what
you expected, return to the influence diagram, correct it, and try again.

326 Part V: Working with Influence Diagrams


Limitations of an influence diagram
Certain features – for example multi-attribute (such as cost-effec-
tiveness) models and Markov processes – are not available in influence
diagrams. This doesn’t mean that a model begun as an influence dia-
gram can never contain these features, but simply that they will have to
be added after the influence diagram has been converted into a tree.

As the model builder, you will have to decide, on a case-by-case basis,


whether it pays to begin a model as an influence diagram when it cannot
be converted into the completely functional tree you require.

Time ordering of nodes


Time ordering of nodes In TreeAge Pro, it is not possible to perform calculations directly on an
influence diagram. To calculate the model, the influence diagram must
be converted into a tree. Thus, to correctly structure an influence dia-
gram, you must know the rules by which TreeAge Pro will convert that
influence diagram into a tree. Fortunately, these rules conform to the
standard method of influence diagram construction and conversion.

TreeAge Pro’s node conversion algorithm


When an influence diagram is converted into a tree, TreeAge Pro uses
a fixed set of rules to determine the order in which influence diagram
nodes should be converted into tree nodes, beginning on the left side of
the tree. Here is the complete algorithm used by TreeAge Pro to deter-
mine node ordering. The algorithm conforms to standard practice.

• Decision nodes are ordered. TreeAge Pro determines


in what order decisions occur by looking at the arcs
between them. You should draw arcs from a decision
node to every other decision node which occurs later in
time. This convention not only resolves any ambiguity
regarding decision ordering, but also conforms to the
standard use of no-forgetting arcs (see tip below). Any
remaining ambiguity in ordering the decisions is resolved
by graphical node position, as described below.
• Chance nodes are grouped. For each chance node,
TreeAge Pro determines which decision nodes it precedes
and which it follows. This determination is made solely on
the basis of direct arc-connections. If there is an arc from
the chance node to a decision node, the chance node must
precede the decision, and all subsequent decisions. If there

Chapter 26: Building Influence Diagrams 327


is no arc, or if the arc points from the decision node to the
chance node, the decision node will be converted first. You
should draw arcs from a chance node to every decision it
precedes. If the outcome of an uncertain event is known
when the decision is made, the uncertainty precedes the
decision. This also conforms to the no-forgetting principle
of arcs. At this point, chance nodes will be grouped in
positions between decisions, although no ordering has
taken place within each group. Some chance nodes may, of
course, precede or follow all decisions.
• Chance groups are individually sorted. For each group
of chance nodes, the order is determined by considering
arc flow, with a node at the base of an arc converted
before the node at the tip. Ambiguities are resolved by
considering graphical position, as described below. Each
group is ordered independently; for this purpose, arcs from
nodes in one group to nodes in another group are ignored.

Tip:
The no-forgetting principle of arcs simply states that if a node precedes a
decision, it must also precede all subsequent decisions. Thus, the infor-
mation is remembered at all subsequent decision points. In TreeAge Pro,
no-forgetting arcs are not required, so long as you draw an arc from each
decision or chance node to its immediate successor decision node. However,
in order to avoid confusion when sharing your model with others, you may
want to include arcs to all subsequent decisions.

How the standard conversion algorithm makes it possible to automate


Bayes’ revision and EVPI is covered in Chapter 27.

In TreeAge Pro, it is possible to create timing-only arcs to indicate the


ordering of nodes, consistent with the no-forgetting principle. To draw a
timing-only arc, simply uncheck all of the Probs and Values check boxes
in the arc editing window, and ensure that all the structural influences
are set to “Symm” (symmetric).

Using graphical position to resolve time order


Some timing issues may not be resolved by considering arcs alone. In
these cases, TreeAge Pro will convert nodes on the left of the influence
diagram before nodes on the right. (There is a preference item which
will force this left-to-right ordering to be performed top-to-bottom.)

328 Part V: Working with Influence Diagrams


For instance, consider the following influence diagram fragment.

The arcs indicate timing, so X will be con-


verted before both A and B. Since the arcs
provide no way to tell between A and B which
should appear first in the tree, their respective
positions in the influence diagram are used to
make this determination. Since A is to the left
of B, the nodes will be converted X, A, B.

The left-to-right (or top-to-bottom) ordering of nodes uses the center of


each node as the point by which sorting occurs.

Asymmetry
Asymmetry This topic was covered initially in Chapter 3. If you have not worked
through the tutorial in that chapter, it may be helpful to do so now.

Here is a description of the various structural influence types and how


you might use them:
• Symm - Short for symmetric, Symm indicates that, for the
influenced event, the tree should be as bushy as possible, with
all branches drawn.
• Force - Use this influence type to indicate that when one con-
ditioning event occurs (or one alternative is chosen), the result
(or choice) associated with the conditioned node is known or
determined. You will need to pick which outcome is forced via
a pop-up menu in the Additional Info field.
Consider, for example, a patient with an early stage of pros-
tate cancer; you must decide whether to (i) perform a pros-
tatectomy, (ii) treat with radiation, or (iii) do nothing. If you
choose to do nothing immediately, the outlook for the patient
is uncertain (with possible outcomes “Metastasized Cancer,”
“Local Cancer,” and “No Detectable Problem”). However,
if you choose to remove the prostate, then the outcome will
always be “No Detectable Problem.” In some cases, this asym-
metry can be handled with the “Skip” command, but in many
situations you will want to include (force) the event, with a
single branch (here, “No Detectable Problem”) for clarity.
• Elim - Similar to Force, this command eliminates one possible
outcome or alternative from the conditioned node. You will
need to pick which outcome is eliminated via a pop-up menu
in the Additional Info field.

Chapter 26: Building Influence Diagrams 329


In the cancer treatment example above, the “Elim” com-
mand might be used to indicate that if radiation therapy is the
selected treatment, one of the possible outcomes, “Metastatic
Cancer,” may be eliminated. The situation is still uncertain, but
one possibility has been eliminated.
• Skip - This is the most common type of structural influence.
It indicates that when one outcome occurs (or one alternative
is chosen), all branches associated with the conditioned node
should be omitted; events that follow the skipped node will still
be included in the model.
• Skip All - Use this to indicate that all subsequent events are to
be eliminated. This is a shortcut for creating many Skip arcs to
other nodes in the influence diagram. Whenever the particular
outcome or alternative is reached, it will become a terminal
node in the tree.

When an arc has no probabilistic or value influence, and is used only


to indicate asymmetry, it is drawn in dotted gray. You may choose not
to print these nonstandard arcs; see the section describing preferences
below.

Variables and values


Variables and values This section describes how to use node variables, value nodes, and
deterministic nodes to create payoff formulas for your models.

Node variables
Each node in an influence diagram can represent a parameter in your
model’s calculations. TreeAge Pro will automatically generate a con-
forming variable name from the node name when you first create it. You
will be able to modify the variable name at any time. See Chapter 13 on
variable naming rules in TreeAge Pro.

A variable associated with an influence diagram node may be used only


to calculate a payoff formula. Node variables cannot be used in prob-
ability calculations; see the section Using the assessment window.
Not every parameter in your model will be a part of a payoff formula.
Accordingly, it is possible to suppress a selected node’s variable.

® To indicate that a node’s variable will not be used:

s Select the node, and choose Variable from the right-click pop-
up menu (or from the Diagram menu in the main menu bar).

330 Part V: Working with Influence Diagrams


s Check the box labeled Never define this variable.

Setting this flag will prevent the node’s variable from being defined in
the tree. As a result, the node’s variable will not be available for use in
the payoff formula, and the node will not be available for value-con-
ditioning by another node (no arc pointing to the node may indicate a
“values” influence type).

The use of node variables in formulas is discussed below in the context


of value nodes.

Node variables and asymmetry


The model shown at left illustrates asymmetry. The value of the model
(i.e., the payoff formula) is the difference between the value of the lot-
tery and the cost of playing. If, however, you decide not to play the lot-
tery, and the uncertainty is skipped, how will TreeAge Pro determine
the value of the Lottery variable for purposes of calculating the payoff?

If a node whose variable is used as part of the payoff formula is skipped


by asymmetry, TreeAge Pro offers you the chance to give it a default
value. For instance, if you decide not to play the lottery, you would give
the lottery a value of 0 whenever asymmetry indicates that the node
should be skipped.

® To assign a default value to a variable:

s Select the node, and choose Variable from the right-click pop-
up menu (or from the Diagram menu in the main menu bar).

s Enter a default value in the box labeled Value when skipped.

Chapter 26: Building Influence Diagrams 331


Value nodes
There are two different uses for value nodes. The primary purpose of
value nodes is to act as a placeholder for the model’s final outcome
(payoff). This node has arcs leading in from the nodes which influence
the payoff, but has no arcs leading out. Payoffs may be enumerated on a
scenario-by-scenario basis, or described by a formula.

The secondary purpose of value nodes is to create an intermediate for-


mula. This is useful for combining formula components in the main
payoff. The various components of this formula would be represented
by other nodes with arcs pointing into the intermediate value node,
which would then have an arc pointing to the final value node.

Every influence diagram must contain a final value node for assigning
final outcomes. The use of intermediate value nodes is optional.

If you opt to assign a formula to a value node, that formula will actually
be defined at the root node of the converted tree.

Intermediate value nodes may be described only by formula, not enu-


meration.

® To assign a formula to a value node:

s Select the value node, and choose Diagram > Variable… (or
choose Variable… from the right-click pop-up menu).

s Select the Formula radio button.

s Enter the formula in the editor. You may use the Insert pop-up
menu to select variables from nodes which directly influence
the value node.

332 Part V: Working with Influence Diagrams


® To enumerate payoff values for a final value node:

s Select the value node, and choose Diagram > Variable (or
choose Variable from the right-click pop-up menu).

s Select the Enumeration radio button.

s Click the Values… button to bring up the mini-tree value


assessment dialog.

Enumeration is the default value assignment for final value nodes.

Deterministic nodes
A deterministic node is useful for including a parameter which has a
single, fixed value in your model, even if your estimate is uncertain.
You have the option of assigning not only a numeric value to a deter-
ministic node, but also a range of possible values for future sensitivity
analysis.

In other words, deterministic nodes in an influence diagram are used in


much the same way that variables are used in a tree. Rather than enter-
ing a fixed numeric value, use a deterministic node to allow for more
complete analysis. The variable associated with the deterministic node
may then be used in the probability or value associated with whatever
node(s) it influences. See the section Using the assessment window for
more details.

Variables created from deterministic nodes will be defined at the root


node of the converted tree.

Using the assessment window


Using the assessment The assessment mini-tree window, first described in Chapter 3, is used
window to assign both probabilities and variable (or payoff) values. Its usage is
virtually identical in both cases. Each node which requires your atten-
tion will be displayed with a red diamond. Note that while these nodes

Chapter 26: Building Influence Diagrams 333


look like terminal nodes in this mini-tree, they are not necessarily final
outcomes.

The first red diamond node, at the top of the mini-tree, will be selected
initially. A selected node will have its diamond filled in and its name
drawn in bold. Only red-diamond nodes may be selected. When a node
in the mini-tree is selected, the text editor in the right part of the dialog
becomes active. The information you enter in the text editor will be used
for the selected node.

To select another node in the tree, you may use any of the following
methods:
• click directly on the node in the mini-tree;
• use the Prev/Next buttons to select the next node in the indi-
cated direction; or
• hold down the CONTROL key and press either UP ARROW or DOWN
ARROW.

To view more or less of the mini-tree, use the Zoom pop-up menu (dis-
played with a magnifying glass icon) or resize the window itself.

Entering a new variable in the editor


The text editor accepts any valid number or expression. You may enter
numeric values directly, such as 0.4, or you may enter expressions, such
as 1-pLow, Cost/(1+rate)^time, or #. You may also define a new vari-
able.

Unlike deterministic nodes, in which the variable is always defined


at the root of the converted tree, variables created in the assessment
window are defined at the selected node or its parent. This may result in
multiple (identical) definitions in the tree.

® To define a new variable in the assessment window:

s Type the name of the variable in the text box and click the
Define… button.

s Enter a numeric value in the Define Variable dialog box, and


press ENTER.

334 Part V: Working with Influence Diagrams


The numeric value is displayed next to the Define button, as well as in
the mini-tree.

s To change the definition of the variable, click Define… again.

s To eliminate the definition, simply type over the variable’s


name in the editor. TreeAge Pro will use the new expression
and eliminate the old variable.

Using existing variables in the editor


The Insert pop-up menu enables you to use variables from other, influ-
encing nodes. For example, consider a decision node, Project, whose
values represent the cost of the project, and a chance node, Sales,
whose values represent the possible sales revenues. If these two nodes
influence a value node, you may use the Insert pop-up menu to create
the expression Sales - Project.

You are urged to use variables in the editor box rather than assign-
ing numeric values directly. These variables may be defined either in
the editor box (as just described) or at a separate deterministic node.
Entering variable names directly in the editor (regardless which method
you use to define the variables) will encourage you to assign differ-
ent variable names to different outcomes, such as “CostLow” and
“CostHigh,” making it very simple to perform sensitivity analysis on
your parameters. (See Chapter 13 for more on this subject.)

If, instead, you enter numeric values directly, you run the risk of having
multiple numeric definitions of the same node variable. In other words,
the node’s main variable will be defined at each branch with each of the
different numeric values in turn; this will cause analysis problems later.

Probability wheel
The probability wheel is available when editing probabilities for a
chance node with at least two but not more than seven outcomes. The
probability wheel and its use are described in Chapter 12.

® To use the probability wheel:

s Select one of the branches of a chance node. The wheel oper-


ates on the set of branches, so it does not matter which of the
branches you select.

s From the Tools pop-up menu, choose Probability Wheel.

Chapter 26: Building Influence Diagrams 335


Linked values
It is possible to link to externally stored values while in the influence
diagram. The links you create will be included in the converted tree as a
DDE linkage.

® To link to a value stored in another program:

s Switch to the other application. Select the value to which you


will link, and choose Edit > Copy.

s Switch to TreeAge Pro. Select a node in the influence diagram


and choose Diagram > Probabilities or Diagram > Values.

s In the mini-tree window, select the node which will use the
link. From the Tools pop-up menu, select Paste Link.

The link will be stored in the influence diagram window. You may edit
the link using the Links dialog in the Edit menu. When you convert
the influence diagram into a tree, the links will be copied and included
as DDE links. When the value changes in the external application,
TreeAge Pro will update it in both the influence diagram and the con-
verted tree.

See Chapter 20 for more information on using DDE links.

Miscellaneous
Miscellaneous Node description
Nodes in the influence diagram may be annotated. This annotation is not
carried over to the converted tree. Select the node you wish to annotate,
and choose Diagram > Description. In the Node Description dialog,
both the node name (as it displays in the window) and the hidden anno-
tation may be changed.

Aligning nodes
When your influence diagram is ready for presentation, you may
wish to align nodes so that arcs appear perfectly straight. To
accomplish this, select those nodes you wish to align, and choose
Display > Align.

If you vertically align the centers of your nodes, then arcs between
them will be drawn perfectly horizontally. If you horizontally
align the centers of your nodes, then arcs between them will be
drawn perfectly vertically.

336 Part V: Working with Influence Diagrams


Remember that, during conversion, ambiguous time-ordering is
resolved on the basis of node position; in particular, the position of the
centers of the nodes is used to sort them. If ordering is performed left-
to-right, and two nodes have been horizontally aligned at their middles,
so their horizontal position is identical, then the resolution of time-
ordering is unpredictable. In situations such as this, you should use a
visible, even exaggerated, horizontal displacement to indicate time-
ordering.

Arc operations
You may curve a selected arc by dragging its square handle. To
straighten a curved arc, select Diagram > Straighten Arc.

To flip a selected arc’s direction, choose Diagram > Flip Arc. Any
asymmetry specified in the arc will be lost, as the direction of influence
has been reversed. This operation is primarily graphical; it does not per-
form intelligent reassignment of probability or value information. How-
ever, careful arc-flipping can help you calculate EVPI in the converted
trees. See Chapter 5 for more on EVPI.

Arcs may be annotated. Double-click the arc (or right-click on it and


choose Arc Info…) and enter a comment in the dialog. If the comment
displays in an undesirable location, it can be moved by clicking any-
where inside the comment and dragging.

Arcs may not be cut and pasted like other objects, because the infor-
mation stored in an arc is specific to the nodes that the arc connects. If
you copy two nodes linked by an arc, then the arc will be copied (and
pasted) with the nodes. To eliminate a selected arc, choose Edit > Clear
Arc as described in Chapter 3.

Chapter 26: Building Influence Diagrams 337


338 Part V: Working with Influence Diagrams
CHAPTER 27
CHAPTER 27: MORE INFLUENCE DIAGRAM TOOLS

MORE INFLUENCE DIAGRAM


TOOLS

This chapter covers a number of advanced influence diagram topics.

In this chapter:

• Bayes' revision........................................................................ 340

• EVPI (expected value of perfect information) ............................... 344

• Clones.................................................................................... 346

• Sub-models............................................................................. 346

Chapter 27: More Influence Diagrams Tools 339


Bayes’ revision
Bayes’ revision Bayes’ revision constitutes an exception to the rule that all of TreeAge
Pro’s calculations are performed in the tree window. Since Bayes’ revi-
sion involves not only calculations but also elements of model design,
TreeAge Pro performs all calculations associated with Bayes’ revision
during the process of converting your influence diagram into a tree.

Accordingly, you must enter the likelihood probabilities (such as the


probability of a positive test result on a patient known to have a certain
disease) within the influence diagram window. Based on this infor-
mation, TreeAge Pro will calculate the decision probabilities (such as
the probability that a patient has the disease if she has tested positive) at
the time that the influence diagram is converted into a tree.

See Chapter 23 for further background on Bayes' revision.

If you set up your tests properly in the influence diagram window, you
will not need to use the Bayes’ revision tool in the tree window, as all of
the revised probabilities’ formulas will have been created for you.

A copy of the tree built in the following tutorial can also be found in
TreeAge Pro’s Tutorial Examples subdirectory, with the name “Bayes
ID”. You may want to check your results against that file after working
through the tutorial.

The problem being modeled involves deciding whether or not to replace


the product of a manufacturing process. If the machine is faulty, it
should be replaced. If it is not faulty, the cost of replacement would not
be warranted. A reasonably reliable, but imperfect, test is employed to
help ascertain the machine’s condition.

This chapter assumes you are familiar with how TreeAge Pro converts
influence diagrams into trees, as discussed in Chapters 3 and 26.

Setting up a single forecast


First, create the chance nodes representing the true condition (whether
the machine is faulty) and the test/forecast of that condition.

s Create a chance node called Machine Condition, with


two outcomes Faulty and Not Faulty.

s Create a second chance node called Test Result with two


outcomes: Test Positive and Test Negative.

s Draw an arc from Machine Condition to Test Result.

340 Part V: Working with Influence Diagrams


The direction of the arc indicates the direction of influence; probabilities
of testing positive or negative are conditioned on the actual status of the
machine. This conditioning reflects the data to which one typically has
access, namely, the quality of the test.

The order in which the events unfold is opposite to the direction of


influence. Even though Machine Condition influences Test Result,
the outcomes of the test are known before the true machine condition
is determined. Under normal circumstances, a node at the base of an
arc is converted before the node at the tip; in other words, arcs rep-
resent timing as well as influence. In this situation, the timing of the
nodes should be opposite from the direction of the arc. Only by adding
an intervening decision, as you will do momentarily, can the software
determine that the conversion order is opposite to the arc flow.

s Select the Machine Condition node, and choose Diagram >


Probabilities… (or right-click and choose Probabilities…).

s Assign 0.01 to the Faulty outcome, and # to the Not Faulty


outcome.

These values are called the prior probabilities; they represent the preva-
lence of this kind of fault in machines of this type. Next, enter the test
node probabilities.

s Select the Test Result node, and choose Diagram >


Probabilities….

s For the test outcomes conditional on Faulty, enter 0.95 for


Test Positive, and # for Test Negative.

s For the test outcomes conditional on Not Faulty, enter # for


Test Positive, and a value of 0.9 for Test Negative.

Chapter 27: More Influence Diagrams Tools 341


Tip:
In the example file Bayes ID, prior and likelihood probabilities are assigned
using variables, such as pTruePos. If you use variables, as is generally rec-
ommended, you will be able to perform sensitivity analysis on these values
after converting the influence diagram to a tree. See Chapter 26 for more
detail on using variables in the Assign Probabilities window.

Next, it is necessary to add a decision based on the test results, and a


final value node. Without an intervening decision, Bayes’ revision will
not be applied, and the chance nodes will not be ordered correctly. The
value node is required to create a properly structured influence diagram.

s Create a decision node called Maintenance, with two alter-


natives: Replace and Don’t Replace.

s Create an arc from Test Result to Maintenance to indicate that


the test results are known prior to making the decision.

s Create a value node called Value.

s Create two arcs, one from Maintenance to Value and the other
from Machine Condition to Value.

Since the purpose of this example is to work through the steps needed
for Bayes’ revision, you can skip the process of assigning values at the
value node. If, however, you wish to view the calculated probabilities in
the converted tree, prior to doing the conversion you might indicate that
the value node has a formula of 0 or 1. This will at least allow TreeAge
Pro to perform roll back.

Understanding the structure


For the moment, ignore the value node, as it has no bearing on the con-
version order. Focus your attention on the relationships among the other
three nodes.

The only arcs are from Machine Condition to Test Result, and from Test
Result to Maintenance.

The absence of an arc from Machine Condition to Maintenance indi-


cates that the uncertainty will not be resolved until after the decision is
made. In contrast, the arc from Test Result to Maintenance specifies that
the test result is known before the decision is made.

342 Part V: Working with Influence Diagrams


When TreeAge Pro converts your influence diagram into a tree, the
nodes will be converted in the following order: Test Result, Mainte-
nance, Machine Condition. This makes sense – the test result is first
learned, then a decision is made, and then the true condition is learned.

You may be wondering about the arc between Machine Condition


and Test Result, which indicates probabilistic dependence (described
above). Why will these nodes be converted in the opposite order from
the direction of arc flow? You may recall that node ordering is per-
formed by first ordering the decisions, then grouping the chance nodes
according to which decisions they precede and which they follow, and
finally ordering the nodes within specific chance groups. Because Test
Result and Machine Condition fall into different chance groups (one
before and the other after the decision), the arc between them is not
used to determine their relative ordering.

In cases such as this one – where the order of conversion will be oppo-
site to the arc flow between two chance nodes – TreeAge Pro will auto-
matically apply Bayes’ revision when the influence diagram is con-
verted into a tree, as illustrated below.

Asymmetry inside the Bayesian model


In the example, one of the alternatives is costly but risk free. If the
potentially faulty machine is replaced, the new machine will run the
same regardless of whether the machine was actually faulty to begin
with. In essence, the Machine Condition node no longer influences the
Value node if Replace is chosen.

Chapter 27: More Influence Diagrams Tools 343


In this situation, you may add a structure-only arc from Maintenance
to Machine Condition. You should edit the arc information to ensure
it contains no probabilistic influence (i.e., the original condition of the
machine is not dependent on the later decision). This arc will contain
only structural influence. Now, you can indicate using the symmetry
pop-up menu that the Machine Condition node should be skipped when
the alternative Replace is chosen.

Converting the influence diagram into a tree (or viewing the enumerated
values at the Value node) will allow you to view the resulting asym-
metry.

Another type of situation where asymmetry may affect the Bayes’ revi-
sion structure is if there is an earlier decision whether or not to utilize
the test.

Bayes’ revision with sequential tests


TreeAge Pro knows how to apply Bayes’ revision when more than one
test (or predictor) is used on a single event (or hypothesis).

Setting up the required influence diagram structure, shown at right, is


quite simple.

The hard part comes next. In order for TreeAge Pro to be able to per-
form its probability revision calculations, you must provide all the infor-
mation identified in the tree fragment.

For example, you must know the probability of testing positive on


test 2, given that the underlying hypothesis C is positive and that test 1

344 Part V: Working with Influence Diagrams


returned a negative result. Obtaining these conditional probabilities is
required.

It is possible to specify asymmetry in the arc from Test1 to Test2 if, for
instance, Test2 should not be used if Test1 is negative.

Expected value of perfect information


EVPI (expected value The expected value of perfect information (EVPI), as described in
Chapter 5, is a measure of the maximum amount one should be willing
of perfect information)
to pay for a predictor of an uncertain outcome or variable. See the dis-
cussion in that chapter for general information on the concept of EVPI.

EVPI can be calculated in the tree structure by inverting the time order
of a chance node and a decision node. Under normal circumstances, the
outcome of the chance node is not known before the decision is made.
For EVPI calculations, we assume that the outcome is known before the
decision.

To calculate EVPI, you should flip the arc pointing


from the decision node to the chance node. Or, if
there is no arc, add a new one from the chance node
to the decision node. This will ensure that the uncer-
tainty is resolved before the decision. The expected
value of perfect information is equal to the value of
this converted tree minus the value of the original
tree.

A meaningful value of EVPI requires that there be arcs from both the
decision node and the chance node to the final value node.

Revising the influence diagram in this way may result in some nodes
becoming unnecessary. For instance, if there is an imperfect predictor
of the chance node in question, it will become irrelevant in the presence
of a perfect predictor. TreeAge Pro will not automatically remove these
nodes for you, but they will not affect calculations in the converted tree.

Other points to bear in mind:


• the application of Bayes’ revision may be affected by these
changes to the model; and
• any asymmetry specified in the original arc (from the
decision node to the chance node) will be lost when the
arc is flipped.

Chapter 27: More Influence Diagrams Tools 345


Clones
Clones A clone of an influence diagram node is drawn in gray. Any changes you
make to the clone will actually be made in the original (“master”) node.
Any arcs to or from the clone node act as if they pointed to or from the
master node. Thus, the two influence diagrams in the left margin are
functionally identical.

To create a clone, select a node and choose Edit > Create Clone. You
may also destroy all clones of a node by selecting Edit > Destroy
Clones when the clone master is selected.

Note that the position of a clone is not relevant during conversion to


tree. If graphical positioning is needed to resolve ambiguities in time-
ordering, only the position of the master node will be considered.

Sub-models
Sub-models If you have a number of nodes which belong to the same logical group,
you may find it helpful to put them into a sub-model. This can greatly
simplify the printed and screen display of your model.

In the diagram above, the deterministic nodes are logically grouped. If


you select the three “P” nodes and choose Display > Collapse to Sub-
Model, the selected nodes will be hidden, and a single, blank hexagonal
node created in its place.

The new node represents the sub-model; it is possible to name the sub-
model as you wish. Even though a sub-model is displayed as a node in
the diagram, it has no functionality of its own, except as an organiz-
ational tool. Double-clicking on the sub-model node will open a new
document window displaying the collapsed nodes.

346 Part V: Working with Influence Diagrams


Sub-models and clones
TreeAge Pro will automatically create a clone of any node influencing,
or influenced by, the sub-model nodes (in this case, X). This clone will
be placed in the sub-model. You may also place new clones created in
the main influence diagram window inside the sub-model. If there are
sub-models in an influence diagram window when you create a clone,
TreeAge Pro will offer to place the clone inside one of the sub-models
instead of in the main window.

The position of a sub-model node is not relevant during conversion to


tree. If graphical positioning is needed to resolve ambiguities in time-
ordering, only the positions of the nodes it contains will be considered.

A sub-model may contain further sub-models. This recursive nesting


can be dangerous while building a model, as it is easy to lose track of
node locations. Even though the functionality is available, it may be
unwise to place sub-models inside sub-models.

The sub-model is not a stand-alone document; it cannot be saved inde-


pendently of the main model. On the other hand, it is possible to print
a sub-model separately. The preference settings for the main influence
diagram document apply to all of its sub-models.

Chapter 27: More Influence Diagrams Tools 347


348 Part V: Working with Influence Diagrams
Appendices
Part III
Appendices
APPENDICES

APPENDICES

• Appendix A, "Changes from DATA 3.5, DATA 4.0, and DATA Professional"

• Appendix B, "The Tool Bar, Status Bar, and Menus"

• Appendix C, "Preferences"

• Appendix D, "Functions and Operators"

• Appendix E, "Distribution Types"

• Appendix F, "Technical Notes"


APPENDIX A
APPENDIX A: CHANGES FROM EARLIER VERSIONS

CHANGES FROM EARLIER VERSIONS

This chapter provides a detailed listing of the feature changes and


additions in TreeAge Pro 2004 for users of recent versions of DATA.

In this appendix:

• Changes from DATA 3.5 to TreeAge Pro 2004 .............................. 352

• Changes from DATA 4.0 and DATA Professional


to TreeAge Pro 2004................................................................ 356

Appendix A: Changes from Earlier Versions 351


Changes from DATA 3.5 to Treeage Pro 2004
Changes from DATA 3.5 Below is a list of the notable differences between DATA 3.5 and
to TreeAge Pro 2004 TreeAge Pro 2004, not including features found only in TreeAge Pro
modules (see module documentation for other new features).

Dynamic linking to Excel – The Edit menu now includes a Links sub-
menu, with a new Dynamic Links command. Dynamic links and the
Bilink() function are designed to replace both bi-directional and DDE
links, and are the default format for new links. Dynamic links are more
reliable, faster, and easier to setup and maintain than old DDE and
bi-directional links. (The optional Excel module allows you to create
dynamic links without leaving the spreadsheet.) See Chapter 20.

Link to cell ranges – Any single link (dynamic or otherwise) can be to


a range of spreadsheet cells. See Chapter 20.

Multi-level Monte Carlo simulation – TreeAge Pro employs a more


flexible simulation algorithm. It includes options for two- and three-
level simulations. Multi-level simulations are useful, for example, in
value of information analysis. A more sophisticated random number
generator supports simulations of up to 5 million iterations. See Chap-
ter 16.

Simulation output – The simulation output window itself can be saved


and reopened or shared with other users. TreeAge Pro provides separate
graphs and reports for each strategy at a decision node. See Chapter 16.

Simulation duration – The estimated time remaining in a simulation is


reported. See Chapter 16.

Simulation using multiple processors – To support complex, lengthy


Monte Carlo simulations, TreeAge Pro can use up to 8 processors on a
single computer. See Appendix F.

Tree Explorer view – The tree window now includes a compact tree
view side by side with the regular tree view. The Explorer view makes it
easy to navigate in very large models, and includes cut/copy/paste sub-
tree functionality. See Chapter 21.

“Skeleton” tree display – It is possible to display a “skeleton” view of


a tree by turning on a tree preference. This will display subtrees as float-
ing slightly to the right of the parent node, and collapsed subtrees will
be completely hidden, creating a highly compact, abstract view of the
tree. See Appendix C.

352 TreeAge Pro 2004 User's Manual


Wrap long variable definitions – A display preference allows long
variable definitions to be wrapped to a fixed multiple of the minimum
standard branch width (8/10”). See Appendix C.

Cut/copy/paste definitions – Selected variable definitions can be


cut, copied, or pasted at a selected node, via the Variable Definitions
window. See Chapter 10.

Enter up to 9 sets of payoffs – Up to 9 sets of payoffs (or Markov


rewards in the Healthcare module) can be assigned at terminal nodes
(increased from 4 sets in previous versions). See Chapter 7.

Additive/multiplicative chance nodes – TreeAge Pro includes a pref-


erence to allow non-coherent probabilities (sum to greater than 1.0, or
even less than 1.0). In a regular decision tree, this can be used to have
chance nodes in which the branches are additive rather than mutually
exclusive. (In the healthcare module, this means that a Markov model
can perform calculations based on a population of individuals, and
could even be used to change the size of the cohort over time — e.g., to
handle births, population growth.) See Chapter 22.

Discrete “population” behavior –With non-coherent probabilities,


the default behavior is to perform expected value calculations using the
non-coherent probabilities. However, an additional preference can be
used to randomize “individuals” at chance nodes based on probabilities,
always keeping them “whole.” See Chapter 22.

PathProb() function – This new function returns the cumulative path


probability calculated for the node being calculated (the Markov node
in a Markov subtree). See Appendix D. Users of the Healthcare module
also have a new StateProb() function; see the Healthcare module docu-
mentation for details. See Appendix D.

MatrixMult(), Matrix(), Global() functions – MatrixMult() performs


matrix multiplication on two matrices, returning a cell from the result-
ing matrix. MatrixMult() can be used to correlate a list of distribu-
tion samples using a covariance matrix; use Matrix() to input matrices,
with a specified number of values per row. The Global() function is a
dynamic table/matrix which can be used to save custom reports during
complex analyses. See Appendix D.

New distribution functions – TreeAge Pro includes a variety of new


functions related to sampling distributions. The DistKids() function
dynamically creates (hidden) branches at a chance node, including

Appendix A: Changes from Earlier Versions 353


internal chance nodes, during an analysis. The DistTrim() function trun-
cates distribution samples by forcing resampling until a number in the
desired range is returned. The DistProb() function returns the cumula-
tive probability of a particular value in a selected sampling distribution.
The DistValue() function returns the value of a selected sampling distri-
bution for a particular cumulative probability. See Appendix D.

10/50/90 fractile distributions – TreeAge Pro’s palette of distribu-


tions includes new options for creating discrete distributions based on 3
fractiles/percentiles. The available forms are: .10, .50, .90 fractiles with
30%, 40%, and 30% sampling probabilities; and .10, .50, .90 fractiles
with 25%, 50%, and 25% probabilities. See Appendix E.

Dirichlet distribution (multivariate normalized Betas) – The


Dirichlet distribution is used to sample probabilities for all branches of
a chance node (summing to 1.0). It uses a list of parameters to gener-
ate sets of Gamma random variates that are normalized (divided by their
sum). See Appendix E.

Uniform distribution, integer form – The Uniform distribution now


includes an option to sample only integers in the range specified (each
with equal probability). See Appendix E.

Sampling distribution names – In addition to referring to distributions


using the Dist(n) syntax, distributions now have a name property, and
can be referred to in formulas by name, without having to create a vari-
able. See Chapter 16.

Sampling distribution frequency – In addition to sampling once per


2nd-order iteration, distributions can be set to sample once per 1st-order
trial. See Chapter 16.

Sequenced analyses – The analysis storage feature has been extended


to enable batch processing of analyses through the use of a new
sequencing feature. See Chapter 18.

Line graphs – Multiple graphs can be merged, line colors can be


changed, and the coordinates of any selected threshold points on a line
can be checked. See Chapter 6.

Regional numeric settings – A number of options are available to facil-


itate sharing a model between different countries/regions using differ-
ent numeric settings (i.e., commas vs. periods as decimal and thousands
separator characters). See Chapter 7.

354 TreeAge Pro 2004 User's Manual


Exporting JPEGs – The File > Export dialog includes an option to save
pictures of TreeAge Pro files as JPEGs. See Chapter 4.

Clones – It is possible to select “ghost” nodes within clone copies,


in order to perform analyses at internal nodes. Trees using clones are
stored much more efficiently, so that files are smaller and open/close
more quickly. To eliminate delays while making changes to clone mas-
ters in complex models, TreeAge Pro allows clone copy updating to be
temporarily suspended and then batch updated when changes are com-
plete. See Chapter 21.

Influence diagram nodes – Double-clicking activates an appropriate


node editor. See Chapter 3.

Probability distributions – Selecting a decision node when performing


a probability distribution expected value analysis will generate a com-
parative, cumulative risk profile. It is no longer necessary to multi-select
the individual branches of the decision node. See Chapter 5.

Function names – DistSamp() has been shortened to Dist(),


UtilDiscount() has been shortened to Discount(). Old names will still
work. See Appendix D.

Packaged trees/tables – Trees using tables can be packaged into a


single file that can be sent to another TreeAge Pro user. See Chapter 17.

Protected trees – Using the tree packaging process, it is possible to


generate a random numeric password for a file. Only a TreeAge Pro user
with the correct password can open your package. See Appendix F.

Multi-column tables – Lookup tables (*.tbl files) can have up to 512


columns of values pasted in from a spreadsheet. See Chapter 17.

Tables Used report – This report now can be exported, including the
contents (column titles, indexes, and values) and properties of all tables
referenced in the tree. See Chapter 17.

Values dialog changes & improvements – For example: The Define


Values has been renamed and improved. The new Variables and Tables
dialog has resizable columns, options for filtering variables or tables,
and links to the variables and tables text reports.

Appendix A: Changes from Earlier Versions 355


Changes from DATA 4.0 and DATA Professional to Treeage Pro 2004
Changes from DATA 4.0 Below is a list of the notable differences between DATA 4.0/DATA
Professional and TreeAge Pro 2004, not including features found only
and DATA Professional to in TreeAge Pro modules. The first few features listed were in DATA
TreeAge Pro 2004 Pro, but are new to DATA 4.0 users. This list does not include feature
changes in the TreeAge Pro Excel add-in, or features in the Healthcare
module (i.e., Markov and cost-effectiveness modeling/analysis). Refer
to the modules’ documentation for a list of additional changes.

Tree Explorer window – The tree window now includes a compact tree
view side by side with the regular tree view. The Explorer view makes it
easy to navigate in very large models, and includes cut/copy/paste sub-
tree functionality. See Chapter 21. (In DATA Professional)

Sampling distribution frequency – In addition to sampling once per


2nd-order iteration, distributions can be set to sample once per 1st-order
trial. See Chapter 16. (In DATA Professional)

Monte Carlo simulation output – The simulation output window itself


can be saved and reopened or shared with other users. See Chapter 16.
(In DATA Professional)

Monte Carlo simulation using multiple processors – To support


complex, lengthy Monte Carlo simulations, TreeAge Pro can use up to
8 processors on a single computer. See Chapter 16. (In DATA Profes-
sional)

Monte Carlo simulation duration – The estimated time remaining in a


simulation is reported.

Multi-level Monte Carlo simulation – TreeAge Pro includes options


for two-level sampling simulations, for value of information analysis.
See Chapter 16.

Dynamic linking to Excel – The Edit menu now includes a Links sub-
menu, with a new Dynamic Links command. Dynamic links and the
Bilink() function are designed to replace both bi-directional and DDE
links, and are the default format for new links. Dynamic links are more
reliable, faster, and easier to setup and maintain than old DDE and
bi-directional links. (The optional Excel module allows you to create
dynamic links without leaving the spreadsheet.) See Chapter 20.

“Skeleton” tree display – It is possible to display a “skeleton” view of


a tree by turning on a tree preference. This will display subtrees as float-
ing slightly to the right of the parent node, and collapsed subtrees will

356 TreeAge Pro 2004 User's Manual


be completely hidden, creating a highly compact, abstract view of the
tree. See Chapter 21.

Wrap long variable definitions – A display preference allows long


variable definitions to be wrapped to a fixed multiple of the minimum
standard branch width (8/10”). See Appendix C.

Enter up to 9 sets of payoffs – Up to 9 sets of payoffs (or Markov


rewards in the Healthcare module) can be assigned at terminal nodes
(increased from 4 sets in previous versions). See Chapter 7.

Additive/multiplicative chance nodes – TreeAge Pro includes a pref-


erence to allow non-coherent probabilities (sum to greater than 1.0, or
even less than 1.0). In a regular decision tree, this can be used to have
chance nodes in which the branches are additive rather than mutually
exclusive. (In the healthcare module, this means that a Markov model
can perform calculations based on a population of individuals, and
could even be used to change the size of the cohort over time (e.g., to
handle births, population growth). See Chapter 22.

Discrete “population” behavior –With non-coherent probabilities,


the default behavior is to perform expected value calculations using the
non-coherent probabilities. However, an additional preference can be
used to randomize “individuals” at chance nodes based on probabilities,
always keeping them “whole.” See Chapter 22.

PathProb() function – This new function returns the cumulative path


probability calculated for the node being calculated (the Markov node
in a Markov subtree). See Appendix D. See Appendix D. Users of
the Healthcare module also have a new StateProb() function; see the
Healthcare module documentation for details.

MatrixMult(), Matrix(), Global() functions – MatrixMult() performs


matrix multiplication on two matrices, returning a cell from the result-
ing matrix. MatrixMult() can be used to correlate a list of distribu-
tion samples using a covariance matrix; use Matrix() to input matrices,
with a specified number of values per row. The Global() function is a
dynamic table/matrix which can be used to save custom reports during
complex analyses. See Appendix D.

New distribution functions – TreeAge Pro includes a variety of new


functions related to sampling distributions. The DistKids() function
dynamically creates (hidden) branches at a chance node, including inter-
nal chance nodes, during an analysis. The DistTrim() function truncates

Appendix A: Changes from Earlier Versions 357


distribution samples by forcing resampling until a number in the desired
range is returned. The DistProb() function returns the cumulative prob-
ability of a particular value in a selected sampling distribution. The
DistValue() function returns the value of a selected sampling distribu-
tion for a particular cumulative probability. See Appendix D.

10/50/90 fractile distributions – TreeAge Pro’s palette of distribu-


tions includes new options for creating discrete distributions based on 3
fractiles/percentiles. The available forms are: .10, .50, .90 fractiles with
30%, 40%, and 30% sampling probabilities; and .10, .50, .90 fractiles
with 25%, 50%, and 25% probabilities. See Appendix E.

Dirichlet distribution (multivariate normalized Gammas) – The


Dirichlet distribution is used to sample probabilities for all branches of
a chance node (summing to 1.0). It uses a list of parameters to gener-
ate sets of Gamma random variates that are normalized (divided by their
sum). See Appendix E.

Uniform distribution, integer form – The Uniform distribution now


includes an option to sample only integers in the range specified (each
with equal probability). See Appendix E.

Sampling distribution names – In addition to referring to distributions


using the Dist(n) syntax, distributions now have a name property, and
can be referred to in formulas by name, without having to create a vari-
able. See Chapter 16.

Exporting JPEGs – The File > Export dialog includes an option to save
pictures of TreeAge Pro files as JPEGs. See Chapter 4.

Clones – It is possible to select “ghost” nodes within clone copies, in


order to perform analyses at internal nodes. See Chapter 21.

Influence diagram nodes – Double-clicking activates an appropriate


node editor. See Chapter 3.

Probability distributions – Selecting a decision node when performing


a probability distribution expected value analysis will generate a com-
parative, cumulative risk profile. It is no longer necessary to multi-select
the individual branches of the decision node. See Chapter 5.

Function names – DistSamp() has been shortened to Dist(),


UtilDiscount() has been shortened to Discount(). Old names will still
work. See Appendix D.

358 TreeAge Pro 2004 User's Manual


Packaged trees/tables – Trees using tables can be packaged into a
single file that can be sent to another TreeAge Pro user. See Chapter 17.

Protected trees – Using the tree packaging process, it is possible to


generate a random numeric password for a file. Only a TreeAge Pro user
with the correct password can open your package. See Appendix F.

Tables Used report – This report now can be exported, including the
contents (column titles, indexes, and values) and properties of all tables
referenced in the tree. See Chapter 17.

Dialog changes & improvements – For example: The Define Values


has been renamed and improved. The new Variables and Tables dialog
has resizable columns, options for filtering variables or tables, and links
to the variables and tables text reports.

Appendix A: Changes from Earlier Versions 359


360 TreeAge Pro 2004 User's Manual
APPENDIX B
APPENDIX B: TOOL BAR AND MENU REFERENCE

TOOL BAR AND MENU REFERENCE

This appendix describes each of the major elements of the TreeAge Pro
window: the tool bar, the status bar, and the main menus.

In this appendix:

• The tool bar ............................................................................ 362

• The status bar ......................................................................... 363

• The menus.............................................................................. 364

Appendix B: Tool Bar and Menu Reference 361


The tool bar
The tool bar
Tree Window only Influence Diagram only

File > New Values > Show Variables Window create new arc
File > Open Values > Define Values create new decision node
File > Save Values > Probability Wheel create new chance node
File > Print Options > Change Node Type create new deterministic node
File > Print Preview Analysis > Probability Distribution create new value node
File > Convert Analysis > Sensitivity Analysis > One-Way
Display > Font Analysis > Sensitivity Analysis > Two-Way

Analysis > Monte Carlo Simulation >

Analysis > Roll Back

Navigation button (see below)

Navigation button
The navigation tool bar button acts as a toggle between two modes of
using the arrow keys in the tree window. When navigate mode is active
(i.e., the button is down), the arrow keys will change which node is
selected. For instance, if a single node is selected, and you press the left
arrow key, TreeAge Pro will select the parent of the selected node.

When navigate mode is not active (i.e., the button is up), the arrow keys
operate on the text insertion cursor. It is possible to use the arrow keys
to maneuver the node selection even when the navigation button is up.
This requires holding down the CONTROL key when using the arrow keys.

In all windows other than the tree window, arrow keys operate on the
text insertion cursor.

362 TreeAge Pro 2004 User's Manual


The status bar
The status bar

1. This area displays information about the currently-selected menu item


or tool bar button. On occasion, other context-specific information is
displayed in this area.

2. When the software being used is the run-time version, this area will
display “RUNTIME.” The text also displays when the full version is
being used with the “Mimic run-time” option, as set in the Options
menu.

3. This area displays the text “RISK” when the active tree is set to
calculate using a risk preference function, rather than using expected
values.

4. The current calculation method for the active tree is displayed in this
area. For example, if the tree is set to calculate cost-effectiveness, with
payoff 2 used for cost values and payoff 1 used for effectiveness values,
this area will display “C/E, 2/1.”

The status bar will also display a progress indicator when a long analy-
sis is being run. Because this is such a useful indicator, it is desirable to
leave the status bar visible at all times.

Appendix B: Tool Bar and Menu Reference 363


The menus
File menu
File menu New…
Creates a new document — either a tree or influence diagram. This
option allows you to build a new model from scratch.
Open…
Presents the Open file… dialog box for you to open an existing model
or graph.
Close
Closes the active window. If changes have been made to the document
since the last time it was saved, choosing Close will be followed by
a dialog giving you the option of saving, not saving, or canceling the
close request.
Save
Saves the document in the currently active window. If a file name has
been specified, the document is saved under that name; otherwise you
must enter the file name under which it should be saved.
Save As…
Same function as Save, but you are prompted for a file name, whether or
not one has already been specified.
Export…
Allows you to export your document as a picture (metafile or bitmap)
for use in a word processor or other program. You may also use the
Export command to save earlier version models, or a TRB file, which
is a permanently rolled-back picture of your tree, viewable only in
TreeAge Pro.
Revert to Saved
Reverts to the most recently saved version of the document in the active
window. This option should be used if you want to eliminate all changes
made to a document subsequent to the last time the document was
saved.
Convert
If an influence diagram is in the active window, this command converts
it into a tree.
Print Preview…
Displays the document in the active window, indicating the location of
page breaks and the number of pages required to print it (in accordance
with the options selected under Page Setup). Buttons available in the
preview window permit direct access to Page Setup and Print.

364 TreeAge Pro 2004 User's Manual


Page Setup…
Displays the standard Page Setup dialog box for the particular printer
you are using.
Print…
Prints the document in the active window.
Run Script…
Allows you to run a text file containing commands in the TreeAge Pro-
Script language. This is only for compatibility with scripts written for
TreeAge Pro 3.0.
(File Names)
TreeAge Pro displays a list of your most recently opened files. Select-
ing one from the list will reopen that document, so long as its name and
location have not changed since the last time it was opened.
Exit
Exits the application, after offering the option to save any changes
made to documents open when this command is given.

Edit menu
Edit menu Undo
This command permits you to reverse (undo) your most recent action
if, for example, you issued the wrong command or made a mistake in
typing or tree construction. In the case of typing or text formatting, this
command will reverse multiple, consecutive changes. See Chapter 17
for more information.
Redo
Re-executes the most recently undone action.
Cut…
Cuts the selected portion of the active window onto the clipboard. This
can result in one of several different actions, depending on the context.
For example, if a tree window is active, the Cut command will read,
depending on the context, “Cut Node” (when no branches emanate
from the selected node), “Cut Subtree,” “Cut Variables,” “Cut Note,”
or “Cut Text.” When it is not clear whether node text or a portion of the
tree is to be affected, the command will read “Cut...” and will be fol-
lowed by an appropriate dialog box. A node (together with the branch
leading to it) or a subtree is cut to the active tree clipboard (see below).

If an influence diagram window is active, you may cut one or more


nodes and the arcs connecting them. Note that clone nodes may not be
placed on the clipboard.

Appendix B: Tool Bar and Menu Reference 365


If a graph window is active, the selected text is cut to the clipboard.
There are separate clipboards for nodes and text. Therefore, cutting or
copying an item of one type does not always remove an item of another
type from the clipboard.
Copy...
Copies the selected portion of the active window onto the appropri-
ate clipboard. With limited exceptions, it has the same functionality as
the Cut command, described above. The principal difference is that the
Copy command does not delete the selected material from the active
window, but simply places a copy of it on the clipboard.
Copy Special...
Copies the selected portion of the active window onto the clipboard in
a format other than the standard TreeAge Pro format. All TreeAge Pro’s
documents (trees, influence diagrams, and graphs) will allow you to
copy the document in bitmap or metafile formats. See Chapter 4. When
a tree window is active, you may copy a value calculated at the selected
node as a DDE link. When a graph window is active, you may copy the
graph data as spreadsheet-accessible text. This functionality is also pres-
ent in the Graph > Text Report dialog. See Chapter 5. When a tree is
rolled back and custom columns are displayed at end nodes, this menu
command will copy the columns to the clipboard. The text may then be
pasted into a text document or spreadsheet. See Chapter 11.
Paste
The inverse of “Copy,” this command copies the contents of the clip-
board to the selected point in the active window. For example, if a tree
window is active and there is a subtree on the active tree clipboard, the
subtree is pasted onto the selected node(s). Tree clipboards are main-
tained separately from all other types of clipboard contents. When the
selection is unambiguous, TreeAge Pro will automatically paste the
item of the appropriate type into the active window. When it is unclear
whether text or a tree component is to be pasted, a dialog box will
appear asking the user to make the selection.
Paste Link
Allows you to paste an item, which is dynamically linked to a spread-
sheet, database or other tree, into the active tree. Paste Link is only
available when the cursor is in a value field (such as a variable defi-
nition or node probability) in a TreeAge Pro tree window. Choosing this
menu item eliminates the step of opening the Dynamic Links dialog
before pasting the link. See Chapter 20, for more information.

366 TreeAge Pro 2004 User's Manual


Clear
Deletes the selected portion of the active window altogether. It has the
same functionality as “Cut,” but the material being cleared is deleted
without being transferred to the clipboard, and any material on the clip-
board is unaffected.
Links
Manages the sharing of data between trees or from another applica-
tion to a tree, using either Dynamic or DDE Links. The Links dialog is
an alternative to the Paste Link method, described above, of creating
dynamic links in a tree.
Break Link…
Destroys the DDE server link(s) to calculated node values at the
selected node.
Create Clone…
Designates the selected subtree as a clone master, which may be rep-
licated at different points throughout the tree. Changes subsequently
made to the clone master will “ripple through” the tree, affecting all
copies of that clone. When a clone master is selected, this command
will be entitled “Destroy Clone.” See Chapter 21 for more information
on clones.

This command is also used to create (and destroy) clones in an influence


diagram window. See Chapter 27 for more information.
Attach Clone…
Attaches to the selected node a dynamically-linked copy of a clone
master, which is designated by the user from a list of all clone masters
previously created in the active tree. When a clone copy is selected, this
command will be entitled “Detach Clone.” See Chapter 21.
Clones…
Allows you to manage a list of clones in a tree. You may rename or
renumber your clones. You may also destroy clones from this dialog,
rather than from the Destroy Clone menu item.

Appendix B: Tool Bar and Menu Reference 367


Tree Clipboards 1…4
For convenience in working with large trees, there are four distinct “tree
clipboards” which can be used in cutting, copying, and pasting sub-
trees. Tree clipboards are maintained independently of other types of
clipboard contents, such as text, annotation boxes, or influence diagram
nodes.

The clipboard with the checkmark (“✓”) next to it is designated the


active clipboard; when a tree clipboard is not empty, the type of content
is designated in parenthesis. For example, when a tree is in the active
window and a subtree is selected, choosing “Cut,” “Copy,” or “Paste”
invokes the active clipboard. Thus, cutting a subtree with Tree Clip-
board #1 active puts the subtree on Tree Clipboard #1, and pasting with
Tree Clipboard #2 active pastes the contents of Tree Clipboard #2 into
the tree. By switching the active clipboard (accomplished by selecting
the menu item), you can keep up to four commonly appearing subtrees
in clipboards from which they can be pasted at will.

Switching the active clipboard does not make any immediate or auto-
matic changes to either your model or the contents of the four clip-
boards.
Show Tree Clipboard
Displays the contents of the currently active tree clipboard. No editing
may be performed in the Tree Clipboard window.
Preferences…
Displays the main Preferences dialog box. See Appendix C for more
information.
Numeric Formatting…
Allows you to change the presentation of numeric values in trees and
graph windows. See Chapter 5 for more information.

368 TreeAge Pro 2004 User's Manual


Display menu
Display menu Create Note…
Allows you to annotate a tree or an influence diagram. After choos-
ing this command, a rectangular box can be drawn in the window and
the annotation typed within it. The box containing the annotation can
be moved or resized. Notes can be cut, copied and pasted (see the Edit
menu, above). See Chapter 10.
Bind Note…
Allows you to permanently link an annotation box to a particular node
in your tree. Notes which are not bound remain floating above the tree,
and are not automatically moved when the tree is resized.
Create Arrow…
Allows you to draw an arrow in your tree, as an aid to annotation.
Redraw Window
Redraws the active window to eliminate blank areas and other problems
with screen display.
Font
Allows you to choose the font, size, and style in which any selected text
will be displayed and printed. Note that you cannot have different fonts,
sizes or styles within the same text item. In other words, a node label
must be all in one font, size, and style; likewise, an outline must be all
in one font, size, and style.
Skip Generation
Forces the selected nodes to display as if they spanned an extra gen-
eration. The text will remain at the left edge, while the node’s symbol
will move to the right so that it lines up with the symbols of the next
generation. The primary use of this feature is in asymmetrical trees
where it is desirable to have all events within a given stage or time
frame displayed in vertical alignment. A node may be made to skip as
many generations as desired. See Chapter 11.
Unskip Generation
Negates the effect of a single Skip Generation command when per-
formed on one or more skipped nodes.
Align…
Allows you to align two or more nodes in an influence diagram. See
Chapter 26.

Appendix B: Tool Bar and Menu Reference 369


Collapse Subtree…
Hides the subtree emanating from the selected node. This is useful when
working with large trees, when focusing an audience on a particular
location in your tree, or when viewing custom columns at end nodes
during roll back. See Chapter 11.
Expand Subtree Once
Expands the collapsed subtree at the selected node. Only the first gen-
eration will be displayed; the subtrees emanating from the nodes in the
first generation will remain collapsed.
Expand Entire Subtree
Reverses the effect of Collapse Subtree.
Suppress Clone Updating
Temporarily turns off the updating of clone copies. See Chapter 21.
Zoom In
Displays your document at a larger magnification.
Zoom Out
Displays your document at a smaller magnification.
Zoom…
Allows you to set the magnification factor for the active window. See
Chapter 2.
Show Tool Bar
Shows the tool bar at the top of the screen. Icons on the tool bar allow
you to issue various commands with a single mouse click. These include
opening, saving, printing, rolling back, changing node type, and chang-
ing the function of cursor keys. When the tool bar is visible, this com-
mand reads “Hide Tool Bar.” A full tool bar reference is included at the
beginning of this appendix.
Show Status Bar
Displays, at the bottom of the screen, a one-line explanation of the
selected menu or tool bar item. In addition, the status bar displays some
useful information about the active tree. When the status bar is visible,
this command reads “Hide Status Bar.”

A full status bar reference is included at the beginning of this appendix.

370 TreeAge Pro 2004 User's Manual


Values menu
Values menu Variables and Tables...
Displays a dialog box in which you can create, modify or delete vari-
ables and tables. See Chapters 13 and 17 for more information on vari-
ables and tables, respectively.
Insert Variable…
Allows you to insert a previously-created variable into the definition of
a probability or another variable.
Multi-Attribute Weights…
Allows you to set the formula used for generalized multi-attribute cal-
culations. See Chapter 20.
Change Payoff…
Allows you to change the payoff (variable, expression, or value) associ-
ated with the selected terminal node(s).
Markov Termination… (Healthcare module only)
Allows you to specify the condition(s) upon which a given Markov pro-
cess will cease to cycle.
Markov State Information… (Healthcare module only)
Accepts values for the initial, incremental, and final rewards associated
with a given state of a Markov process. You may also indicate that the
selected state should be an automatic tunnel state.
Markov Transition Rewards… (Healthcare module only)
Assigns a reward to a non-state node in a Markov process.
Open Calculator/Evaluator
Displays the Calculator/Evaluator dialog box, which allows you to
enter an expression whose value you wish to calculate at the selected
node. Calculations are performed based on the values of the variables
in effect at the selected node. See Chapter 14.
Create Slider…
Allows you to edit manually the value of a variable at a given node.
After choosing a variable and specifying a range, drag the sliding
“thumb” to change temporarily the value of the variable. The changed
value will remain in effect until the slider is closed, or until a sensitivity
analysis is run on the chosen variable. See Chapter 14.

Appendix B: Tool Bar and Menu Reference 371


Show Variable Definitions Window…
Displays the list of variables which have been defined at a selected
node. Node selection can be changed by using the arrow buttons in
the window. Double-clicking on a variable in the window brings up a
Define Variable window for editing the definition at the selected node.
When the Variable Definitions window is displayed (whether or not it
is the active window), the menu command will read “Hide Variables
Window.” See Chapter 14.
Distributions…
Allows you to assign parameters to an analytic distribution for use in a
payoff formula or probability. Distributions are used primarily for sam-
pling during Monte Carlo simulation. See Chapter 16.
Probability Wheel…
Displays the probability wheel at the selected chance node. The wheel is
used to assign subjective probabilities. See Chapter 12.

Options menu
Options menu Select Subtree
If the currently selected node has branches, this option causes the entire
subtree rooted at this node to be selected. This is useful in cutting or
copying a subtree, which requires selection of the entire subtree. It can
also be used to select the tree (i.e., the subtree emanating from the root
node), prior to copying the tree to the clipboard, either in TreeAge Pro
format or for export in bitmap/metafile format.
Select If…
Allows you to select nodes using a rule. For instance, you may select
all terminal nodes, or all nodes at which a particular variable is defined.
See Chapter 8.
Find…
Searches for (and replaces, if desired) specified text in the tree window.
See Chapter 12.
Node Comment…
Allows you to assign an annotation to the branches of the selected node.
This feature is often used to record the reasons underlying probability
assignments. See Chapter 10.

372 TreeAge Pro 2004 User's Manual


Add Branch(es)
Adds two branches to the currently selected node. (You may change the
default number of branches in the Preferences dialog.) If the selected
node already has branches, this command will be entitled “Add Branch”
and will add one additional branch to the selected node. A chance node
is automatically added at the end of each new branch; you may later
change the node type.
Insert Branch…
Inserts a new node to the left, to the right, above, or below the selected
node. See Chapter 5 for more information.
Delete Branch…
Deletes the selected branch from the tree, and attaches any branches
emanating from the deleted branch to its parent. See Chapter 5.
Reorder Branches…
Allows you to change the top-to-bottom ordering of the branches ema-
nating from a node. See Chapter 5.
Markov Bindings… (Healthcare module only)
At the selected node within a Markov subtree (including the Markov
node), allows you to associate a state name variable with a Markov
state. These Markov bindings can be used in place of a Markov state
name when assigning the transition for a Markov transition node (see
below). Markov state bindings are useful when cloning within Markov
subtrees. Refer to the Healthcare module documentation for details.
Markov Transition Node… (Healthcare module only)
For the selected Markov transition node, allows you to choose from a
list of existing Markov states (within the same Markov process) and
Markov state bindings. Refer to the Healthcare module documentation
for details.
Change Node Type…
Presents a dialog box which allows you to change the type of the
selected node(s). In the influence diagram window, the Change Node
Type command is found under the Diagram menu; see below.
Change Optimal Path…
When one or more decision nodes are selected, allows you to change
the optimal path for the selected decision node(s) to be the opposite of
the default for the rest of the tree. See Chapter 12 for more information.

Appendix B: Tool Bar and Menu Reference 373


Force Path
This option allows you to indicate the occurrence (or inevitability) of a
particular event at a chance node, or of a commitment to a specific alter-
native at a decision node. TreeAge Pro will change the selected node to
a logic node and set the logical expression of the specific event or alter-
native to 1 and the logical expressions of the other branch(es) to 0.
Enter Risk Preferences…
Accepts information about the risk aversion of the decision maker for
application of a risk preference curve to the decision at hand. See Chap-
ter 24.
Distribute Children…
Approximates a continuous distribution of values by creating a specified
number of branches and assigning a particular value to a variable at
each of those branches, according to a distribution which you chose and
parameterize. See Chapter 22.
Bayes’ Revision…
Uses Bayes’ theorem to revise probabilities in a subtree to reflect knowl-
edge gained from an imperfect predictor of an uncertainty. The a priori
and likelihood probabilities are automatically converted to the probabil-
ities needed to make a decision based on the outcome of the imperfect
test. All values can be preserved as variables for purposes of sensitivity
and threshold analysis. See Chapter 23.
Show Custom Interface…
Displays the window associated with the Basic Custom Interface, as
described in Chapter 25. When the Custom Interface is shown, this
command will read “Hide Custom Interface.”
Design Custom Interface…
Allows you to design a basic or extended Custom Interface. The Custom
Interface is useful for sharing models with less sophisticated users. See
Chapter 25.
Mimic Run-Time
Causes TreeAge Pro to emulate the Run-time TreeAge Pro software in
certain respects. This will affect menu items and preference settings,
many of which are not available to run-time users. Use this command to
test an Extended Custom Interface tree.

374 TreeAge Pro 2004 User's Manual


Analysis menu
Analysis menu Roll Back
This option does all the basic calculations on the active tree and causes
the results to be displayed in the tree window. See Chapters 1, 2, and 5
for more information on roll back and changing what the tree calcu-
lates, respectively. Choosing the Roll Back option again returns the tree
to its normal display, and the information described above disappears.
Sensitivity Analysis
Tests the sensitivity of a recommended decision to changes in the value
of one or more variables across a range (or ranges) specified by you.
One-way sensitivity analysis and tornado diagrams are also avail-
able when a chance node is selected. Depending on the circumstances,
calculations may be done on the basis of expected value and marginal
value. See Chapters 13 and 15 for more information.
Monte Carlo Simulation
Performs a Monte Carlo simulation at the subtree rooted at the selected
node. See Chapter 16 for information on different types of simulation.
Probability Distribution / Comparative Distributions
Draws a bar graph that displays the distribution of payoffs in terms of
their probability of occurrence. If a decision node (or multiple nodes) is
selected, this option reads Comparative Distributions. See Chapter 5 for
more information on these analyses.
Rankings…
Displays expected value of the alternatives associated with a decision
node, ranked in order of optimality. See Chapter 5.
Markov Cohort Analysis… (Healthcare module only)
Allows you to graph, for a given Markov process, many of the quan-
tities which vary over the course of the process. You may also view a
full “trace” of the process, with all values displayed in a table. Refer the
Healthcare module documenation for details.
Cost-Effectiveness… (Healthcare module only)
For a selected decision node in a cost-effectiveness tree, displays each
alternative in a graph with increasing cost to the right and increas-
ing effectiveness toward the top of the graph. This analysis will also
show dominance and extended dominance, and all marginal values are
available via the Graph > Text Report command. Refer the Healthcare
module documenation for details.

Appendix B: Tool Bar and Menu Reference 375


Graph Risk Preference Function
Graphs the currently active risk preference function as a line graph; see
Chapter 24.
Threshold Analysis…
Searches more thoroughly and accurately for threshold information in
connection with a single variable than does a one-way sensitivity analy-
sis. The result of this analysis is a detailed, textual description of how
the optimal strategy is affected by changing the value of a single vari-
able across a designated range. See Chapter 15.
Over/Under…
Allows you to specify a target value at a selected node, and then calcu-
lates the probability of an outcome having a value over the target, and
the probability of an outcome at or under the target. See Chapter 5.
Expected Value
Displays the expected value of the subtree rooted at the selected node;
see Chapters 1 and 2. If multiple nodes are selected, TreeAge Pro will
calculate and display the sum of the expected values at these nodes.
Expected Value of Perfect Information
Calculates the maximum value of a perfect test to determine the out-
come of an uncertainty. See Chapter 5.
Path Probability
Displays the probability of reaching the selected node, that is, the prob-
ability that the scenario represented by the path between the selected
node and the root node will occur. If multiple nodes are selected,
TreeAge Pro will calculate and display the sum of the path probabilities.
Payoff Range
Determines the unweighted highest and lowest potential payoffs in the
subtree rooted at the selected node. See Chapter 5.
Standard Deviation
Calculates the standard deviation of the potential outcomes at a selected
chance node. The standard deviation is weighted by the probabilities of
the branches. It indicates the extent of dispersal, around the expected
value at the selected node, of the values in the branches departing from
that node. This gives an indication of the risk involved in the subtree
rooted at the selected chance node. For information on exporting the
standard deviation, see Chapter 5.

376 TreeAge Pro 2004 User's Manual


Show Optimal Path
Specifies the branch emanating from the selected decision node which
represents the best choice that can be made. This information is also dis-
played when you select Analysis > Expected Value at a decision node.
Verify Probabilities
This command is used to check every chance node in the active tree to
determine whether all sets of probabilities sum to 1.0. An appropriate
message specifying the location of any error, or indicating a successful
verification, appears at the end of the verification process.
Storage…
Enables you to store the parameters of an analysis that you just ran,
recall and rerun a stored analysis, or delete or rename a stored analysis.
See Chapter 18.

Diagram menu (influence diagram window)


Diagram menu (influence Description…
diagram window) Allows you to annotate a node in an influence diagram.
Variable…
Makes it possible to rename the variable which holds the value for a
node in an influence diagram. The variable may then be used in a payoff
formula at a value node. See Chapter 26.
Outcomes / Alternatives…
This command is used to enter a set of outcomes (for a chance node) or
alternatives (for a decision node) in an influence diagram. Its name will
change depending on the type of node selected. See Chapter 3.
Probabilities…
Enables you to assign the conditional probability distribution(s) associ-
ated with the outcomes of a chance node in an influence diagram. See
Chapter 3.
Values…
Makes it possible to assign the conditional value distribution(s) to a
chance or decision node in an influence diagram for use in a payoff for-
mula. This menu item can also be used to enumerate payoff values for a
value node. See Chapter 3.

Appendix B: Tool Bar and Menu Reference 377


Straighten Arc
If an arc in an influence diagram has been curved (by dragging the black
selection handle), this command can be used to straighten it. See Chap-
ter 26.
Flip Arc
Changes the direction of the selected arc in an influence diagram. This
operation is particularly useful for performing EVPI calculations, as
described in Chapter 26.
Change Node Type…
Enables you to change the type of a node in an influence diagram. There
are four types of representative nodes: decision nodes (squares), which
indicate a decision to be made; chance nodes (circles), which indicate
an event over which the decision maker lacks complete control; value
nodes (diamonds), which must be used for the model’s final outcome
and may be used to create an intermediate formula; and determin-
istic nodes (circle with double outline), which are used to specify a
parameter having a fixed value and, optionally, a value range for pur-
poses of sensitivity analysis.
Bayes’ Revision…
Identifies, in a text report, any nodes at which Bayes’ revision will be
performed when the influence diagram is converted into a tree. See
Chapter 27.

Graph menu
Graph menu Text Report…
Displays the numerical data which underlie the graph in the active
window. These data may then be exported for further analysis or graph-
ing in a spreadsheet, statistics, or database program. See Chapter 6.
New Label…
Adds a new, custom label to the active graph.
Show/Hide…
Allows you to hide certain pieces of information from the selected
graph. You may hide lines in a line graph or bars in a tornado diagram.
Distribution Statistics…
Displays the basic statistical values associated with a distribution graph.
Line to Table…
Converts a line in an active line graph into a table.

378 TreeAge Pro 2004 User's Manual


Strategy Graph
Graphs the optimal frontier of a one-way sensitivity analysis graph.
Create Template…
Stores the layout of the active graph window for later use in other
graphs. See Chapter 6.
Apply Template…
Applies an existing graph template to the active graph window.
Maintain Templates…
Allows you to edit the information stored in specific graph templates.
Options…
Opens a dialog which allows you to change the contents and appearance
of the graph. Many options are specific to certain graph types and are
explained in the appropriate analysis chapter or in Chapter 6.

Table menu
Table menu Add Entry…
Adds a new entry to the open table. See Chapter 17.
Edit Entry…
Edits the index/value associated with the selected entry in the open
table. See Chapter 17.
Delete Entry
Deletes the selected entry in the open table. See Chapter 17.
Graph Table
Displays the contents of the open table as a line graph.
Properties
Edits the properties (name, file name, lookup method) for the open
table. See Chapter 17.

Appendix B: Tool Bar and Menu Reference 379


380 TreeAge Pro 2004 User's Manual
APPENDIX C
APPENDIX C: PREFERENCES

PREFERENCES

This appendix describes TreeAge Pro’s Preferences dialog.

In this chapter:

• The Preferences dialog.............................................................. 382

• Tree preferences ...................................................................... 383

• Global preferences ................................................................... 388

• Influence diagram preferences ................................................... 389


The Preferences dialog
The Preferences dialog The Preferences dialog, which controls many settings and options in
both the tree and influence diagram windows, can be found under the
Edit menu (or by pressing the F11 key). It is a dynamic dialog: choose
a category from the list at the left, and the appropriate options appear in
the right-hand frame.

In the tree window, the list of available categories is divided into three
parts: Calculation Preferences, Display Preferences, and Other Pref-
erences. In the influence diagram window, two headings are shown
– Influence Diagram and Other Preferences.

The category headings cannot themselves be selected; you must select


an individual category under one of the headings, either using the mouse
or typing the first letter in the category name.

Changes to the settings apply automatically to the then active tree (or
influence diagram). You also have the option of having the current pref-
erences, including any changes, saved as the default settings. This will
automatically apply to all new tree or influence diagram documents, but
not to previously created documents. If you want to establish the new
settings as a default, click the check box at the lower right of the dialog
box.

Note that the Save settings as default checkbox relates to all prefer-
ences, not merely those in view in the then open Preferences dialog cat-
egory.

In this appendix, pages in the Preferences dialog box are presented in


their order of appearance in the categories list. Following the Global
Preferences page are all preferences pages associated with an influence
diagram.

382 TreeAge Pro 2004 User's Manual


Calculation method preferences
Option Description
Method This drop-down list box specifies the calculation methods available in TreeAge Pro:
Simple, Benefit-Cost, and Multi-Attribute. (Cost-Effectiveness is available with the
Healthcare module.)

If you select Simple, calculations performed on the active tree will be based on a
single payoff. The other three calculation methods involve multi-attribute modeling,
in which multiple criteria will be involved in the calculations.

See Chapters 7 for more information on multi-attribute modeling.

Use payoff TreeAge Pro allows you to assign up to nine payoffs at each terminal node. This is
where you specify which payoff or payoffs are to be used in calculating the then
active tree. The options available will depend on the calculation method chosen
above.

If the Simple calculation method is active, this option will permit you to select a
single payoff. If Benefit-Cost is active, you must specify two active payoffs, one for
benefit and the other for cost.

Set weightings… If the Multi-Attribute calculation method is active, you will have to set weightings
for each of the attributes, up to four, that you want TreeAge Pro to use in its cal-
culations. As a result, the Use payoff drop-down list box will be replaced by a Set
weightings… button.

Optimal path is There are two option buttons: High and Low. You should select High when your
tree is to be calculated on the basis of profits, income, cash flow, or other criterion
that should be maximized. Select Low where less is better, such as when the payoff
is based on costs, or any other quantity which should be minimized.

Keep in mind that separate settings of this flag are maintained for the multi-attribute
calculation method and, for the Simple calculation method, each of four possible
payoff/attribute sets and each of the three multi-attribute methods, has its own set-
ting for this flag.

Enable payoffs… TreeAge Pro allows you to activate fewer than all nine payoffs, in order to simplify/
clarify the Enter Payoff dialog and the multi-attribute Weightings dialog.

Numeric format The Numeric Format… button is used to set the format used to display calculated
values. As with the Optimal Path setting, there are individual numeric formatting
options for each Simple payoff, and each multi-attribute method. See Chapter 5 for
more information on numeric formatting.

Appendix C: Preferences Dialog


Roll back preferences
Option Description
Display probabilities This option relates primarily to probabilities which have been entered as vari-
as numeric equivs ables. If the option is turned on (the default setting), the calcualted value of each
of the probabilities will be displayed using numeric formatting preferences during
roll back. Turning off roll back will show the original, uncalculated probability
expression.
Display EV at ter- If this option is turned on, roll back boxes will displayed only at terminal nodes,
minal and decision decision nodes, and branches of a decision node.
nodes & options only

Fast roll back Normally, a progress indicator will display in the status bar while a tree is rolling
back. Selection of the Fast roll back option will suppress this display, resulting in
speed increases of up to 100%, depending on the size and complexity of the tree.
With either option, you may cancel calculations by pressing ESC.
Roll back calculates The four roll back calculation options are described in Chapter 11.

Risk preferences
Option Description
Use risk preference When this box is checked, TreeAge Pro’s calculations will be based on a risk
function function rather than expected value. If this option is dimmed, a risk preference func-
tion has not previously been entered for the active tree. See Chapter 24.

Constant risk aversion When this option is selected, calculations will be based on a constant risk aversion
function, rather than expected values.

Non-constant risk When this option is selected, calculations will be based on a non-constant risk aver-
sion function, rather than expected values.

Enter… There are two Enter buttons, one for a constant risk aversion function and the other
for entering a non-constant risk aversion function. These two functions and their dif-
ferences are described in Chapter 24.

384 TreeAge Pro 2004 User's Manual


Other calculation preferences
Option Description
Custom regional Use this option when you want the calculation preferences specified in your
numeric settings tree to override the regional numeric settings in Windows. Selecting this option and
clicking the Set button opens the Custom International Settings dialog, where you
can specify which characters a particular tree should use for decimal and thousands
separators. See Chapter 5.

Terminate Markov By setting this option, you indicate that the termination conditions should be
Monte Carlo ignored during Monte Carlo simulations of a Markov process. See the Healthcare
simulations on entry module documentation for more information.
into absorbing state

Allow probabilities When this option is checked, calculations will not stop with errors when a chance
to not sum to 1.0 node’s branches do not sum to 1.0. See Chapter 22 for important information on
this settings, and its sub-options.

Calculate comple- When this option is checked, TreeAge Pro will fill in the last probability in a set of
mentary probabilities branches emanating from a chance node, so long as all the other probabilities
automatically on branches emanating from that node are wholly numeric (i.e., no variables are
used).

Allow terminal node It is possible to have TreeAge Pro treat the branch description at a terminal node as
name to act as that node’s numeric payoff value.
numeric payoff using this feature.

Appendix C: Preferences Dialog


Terminal node display preferences
Option Description
Always display When this option is on, each terminal node will display the name of its then active
payoff names payoff. This can be helpful for identifying terminal nodes where a payoff has not
been assigned. In the case of trees having multiple payoffs, this feature makes it
possible to see at a glance which payoff is active.

Boxed If you have chosen to always display payoff names, this option lets you choose
whether the payoff names should be enclosed in a box. This option relates only to
tree display prior to roll back; during roll back, calculated values are always boxed.

Automatic node If this option is on, terminal nodes will display the custom text entered in the field.
numbering Use the ^ (caret) symbol in the text to represent the scenario number.

Show terminal TreeAge Pro can show terminal nodes using any of the three methods shown.
nodes as Triangles are the default (and standard) method. Diamonds are used to
indicate the parallelism between terminal nodes in a tree and value nodes in an
influence diagram. Lines are for those applications when you do not want any
symbol displayed to the right of a final outcome.

Show columns Selecting this option will allow you to display custom columns of values to the right
of the rolled-back tree. Clicking the Set… button opens the Terminal Node Columns
dialog, where you can choose the calculated values (including expected and mar-
ginal values, as well as custom calculations) and formats you want. See Chapter 11.

Variables display preferences


Option Description
Hide definitions, This setting will not show nodes’ variable definitions (with optional marking of
Use striped branch… branch lines).

Show definitions, When this setting is selected, long definitions will be clipped to the natural
Expand node to fit…, length of the node. Options are: to force node lengths to expand to fit the
Wrap at: N x branch…, definitions or wrap definitions at a fixed width; and to show Markov quantities
Show Markov… — termination conditions, rewards, and Markov bindings — in the tree.

386 TreeAge Pro 2004 User's Manual


Tree layout preferences
Option Description
Default branches This option sets the number of branches which are added to a node when you select
per node Add Branches from the Options menu. The default number applies only the first
time that branches are added at a given node. Once a node has branches, additional
branches are added one at a time.

Add branches at… This option enables you to control whether additional branches are to be added
above or below existing branches. The Insert Branch command under the Options
menu provides additional flexibility in this area. See Chapter 14 for more infor-
mation.

Minimize empty space Use of this option produces a “compressed” version of your tree. No vertical space
is wasted. Because each node no longer has its own horizontal “slice” of the tree
display, this option may not be used with Align endnodes. See Chapter 11.

Align endnodes Forces all terminal nodes to line up at the rightmost edge of the tree.

Branch lines at Normally, branch lines are drawn at whatever angle is needed to provide the most
right angles direct connection from one node to the next. When this option is on, all branch lines
are drawn vertically, then horizontally, rather than obliquely.

Hide clone-copy Suppresses the display of clone-copy subtrees; display of clone masters is not
subtrees affected. When this option is selected, only the name of the clone is displayed to the
right of the copy node. Use of this option can dramatically reduce the physical size
of your tree. See Chapter 21.

“Skeleton” tree… This setting allows an abstract view of the tree to be displayed or printed, with
space inserted between generations, and collapsed subtrees being completely
hidden. Used in combination with the Minimize empty space and Hide clone-copy
settings, this creates a highly compact view of the tree. See Chapter 11.

Appendix C: Preferences Dialog


Tree font preferences
Option Description
Node Font This option enables you to select the default font used for naming nodes (branch
descriptions). The font selected in this manner will apply to any new nodes created
in the active tree and to any existing nodes, except for any nodes where the font has
been set individually.

Prob Font This option enables you to select the font used in the probability fields of the active
tree, in both the rolled-back and unrolled-back state. This allows you to clearly dis-
tinguish between probability variable names and adjacent node descriptions.

EV Font This option enables you to select the font used in the expected value boxes gen-
erated during roll back. It also applies to other information which is not user-edit-
able and is displayed next to a node, such as clone names when clones are hidden,
or payoff names when Always show payoff names is selected.

Variables Font This option enables you to select the font used to display the definition of variables
when that option is selected in the Variables Display page of the Preferences dialog.

Notes & arrows preferences


Option Description
Annotation Box This option enables you to specify the type of border which surrounds annotation
Borders boxes in the active tree. The options are a border drawn with either a solid line or a
dashed line or, alternatively, no border. Your selection will apply to every annotation
box in the active tree, bound or unbound.

Arrowhead Size When your tree contains one or more arrows, this option enables you to choose
whether they should be drawn with large, medium or small arrowheads. Your selec-
tion will apply to every arrowhead in the active tree.

Arrow Line Style When your tree contains one or more arrows, this option enables you to choose
whether they should be drawn with solid, dashed or dotted lines. Your selection will
apply to every arrow in the active tree.

388 TreeAge Pro 2004 User's Manual


Node display preferences
Option Description
Mark nodes If this option is on, nodes at which you have entered a Node Comment (see Chapter
with comments 12) will be displayed with a small flag above the symbol. This flag does not print or
export.

Hide node texts When this option is on, the display of all textual information in the tree window is
suppressed. Use this flag to get a picture of the structure of your tree.

Hide probabilities only When the Hide node texts option is off, this option is available. The display of prob-
abilities is suppressed in the tree window, while all other textual information is vis-
ible. Use this flag to temporarily simplify the display of complex trees with many
uncertainties.

Printing preferences (tree)


Option Description
Show page breaks If this option is on, the screen display will include dotted lines to indicate
in tree window where a new printed page will begin. This is likely to be more accurate than page
break information shown in the print preview window.

Show page headers If this option is on, the screen display of the tree will include any page header or
in tree window footer that will be included in a printout of the tree.

Center in page This is one of two ways in which it is possible to determine the location of docu-
ments in printouts. This option will apply only to documents which are sized to fit
on a single page. When selected, the printout of the one-page document will be cen-
tered on the page. If more than one page is required for the printout, selecting this
option will have no effect. The alternative method of positioning the tree or graph in
a printout is described in Chapter 9.

Printing zoom factor This option enables you to store a percent reduction/enlargement factor with each
document. This scaling factor is document-specific. Note also that it is indepen-
dent of any scaling specified under Page Setup. Thus, if your printer driver allows
scaling via the Page Setup command, you run the risk of applying one percentage
against another.

The printing zoom factor is also independent of the screen-display zoom factor, set
in the Display > Zoom commands.

Page Header After clicking this button, you will be able to set the page header and footer infor-
mation for the active tree.

Appendix C: Preferences Dialog


Global preferences
Option Description
Export bitmap/metafile Use this option if your exported documents will eventually be printed on a black
in black & white and white printer.

Allow TrueType If this option is on, font-selection dialogs will allow you to select only TrueType
fonts only fonts, which print and display identically. This selection will not affect fonts you
have already selected.

Use printer for sizing Whenever the tree must be resized (such as after you add nodes or change a branch
description), TreeAge Pro must calculate the width and height of each body of text.
However, the screen and printer do not always agree on the exact amount of space
needed. Selecting this option may improve the quality of either the printed output,
or the screen display, eliminating problems such as a branch description overlapping
the node symbol.

If you have a slow printer driver, you may find that selecting this option causes an
slowdown in screen redraw. If this happens, you may want to turn on this option
only when ready to print.

390 TreeAge Pro 2004 User's Manual


Tree conversion preferences (influence diagram)
Option Description
Time flow The complete algorithm used for converting influence diagrams into trees is dis-
cussed in Chapter 26. If, at any point during conversion, the ordering of two nodes
is ambiguous, their locations in the window are used as a final determination.

Select Left to right, if you would like nodes on the left of the influence diagram
converted before nodes on the right; or select Top to bottom if you would like nodes
toward the top of the influence diagram converted before nodes toward the bottom.
These options apply only after all other rules have failed to determine the proper
node ordering.

Optimal path While no calculations actually occur in the influence diagram window, you may set
this flag to avoid having to reset it in the tree each time you convert the influence
diagram. See Calculation Method preferences, above, for details.

Numeric format This is also carried over to the converted tree. You may enter your numeric for-
matting preferences to avoid reentering it each time you convert to a tree.

Node size preferences (influence diagram)


Option Description
Fixed node size Some influence diagram users prefer to have each node sized identically, rather than
having TreeAge Pro determine the node’s size individually. If you do not select
this option, TreeAge Pro will size each node based on the amount of text entered to
name the node.

If you opt for a fixed node size, you may indicate the size of the text area in the
lower area of the dialog. Drag the corner handle to the appropriate size allocated to
the text of a node; TreeAge Pro will add extra space for the node’s border.

Appendix C: Preferences Dialog


Arc preferences (influence diagram)
Option Description
All three options in this dialog apply to structure-only arcs. A structure-only arc
contains no probabilistic or value influence, and is used only to indicate asymmetry
or timing.

Show in window Deselect this option to suppress screen display of structure-only arcs altogether. You
will not be able to select these arcs for editing until you reselect this option.

Print If this option is selected, structure-only arcs will print with the rest of the influence
diagram.

Dotted Select this option to force structure-only arcs to display or print as dotted lines,
rather than as straight lines.

Influence diagram font preferences


Option Description
Default font If you change the default font, this will affect all new nodes in the influence
diagram, as well as all other nodes at which you did not set the font individually.

Arc font This font is used for the comments of all arcs in the influence diagram. You may not
set the font for a single arc comment individually.

392 TreeAge Pro 2004 User's Manual


APPENDIX D
APPENDIX D: FUNCTIONS AND OPERATORS

FUNCTIONS AND OPERATORS

This chapter provides a detailed listing of the operators and functions available
in TreeAge Pro 2004.

Functions that take one or more arguments are sensitive to user errors. See
Chapter 14 for information on using the Function Helper to set up functions
correctly, and the Calculator/Evaluator to test expressions that use functions.

In this appendix:

• Operators ............................................................................... 394

• Mathematical, statistical, and other functions............................... 397

Appendix D: Functions and Operators 393


Operators
Operators Mathematical expressions used in TreeAge Pro necessarily contain
operators (such as addition or multiplication signs) and may also con-
tain functions (such as logarithm or net present value). Described below
are the operators and functions available in creating expressions.

Arithmetic operators
These operators perform arithmetic on the values that surround them.
TreeAge Pro uses the traditional syntax for expressions, known as infix
notation. For example, an expression that adds three and seven would be
written 3 + 7, rather than 3, 7 +.
Symbol Example Explanation
+ x+y Addition. Returns the sum of x and y.
- x-y Subtraction. Returns the difference between x and y. (Also used
for negation, i.e., to denote negative numbers.)
* x*y Multiplication. Returns the product of x and y.
/ x/y Division. Returns the quotient of x and y.
^ x^y Exponentiation. Returns x to the yth power.
() x*(y+z) Grouping. Returns the product of x and the sum of y and z. In
any expression, there must be an equal number of left and right
parentheses.

Relational operators
These operators return a true or false value, depending on the veracity
of the expression in which they appear. A true value is represented by a
numeric 1, a false value receives a numeric value of 0.

Relational operators are useful in many settings: in If() and Choose()


functions, in expressions evaluated at logic nodes, and in a Markov
termination condition.
Symbol Example Explanation
< x<y Less than. Returns true if x is less than y, and false if x is greater
than or equal to y.
<= x <= y Less than or equal to. Returns true if x is less than or equal to y,
and false if x is greater than y.
> x>y Greater than. Returns true if x is greater than y, and false if x is
less than or equal to y.
>= x >= y Greater than or equal to. Returns true if x is greater than or
equal to y, and false if x is less than y.

394 TreeAge Pro 2004 User's Manual


= x=y Equals. Returns true if x equals y, and false if x is not equal to y.
<> x <> y Not equal to. Returns true if x is not equal to y, and false if x
equals y.
It is also possible, using the appropriate relational expression syntax, to
test one value in terms of two others. There are a number of acceptable
forms, with the two basic ones being:
y<x<z Returns true if x is both (a) greater than y and (b) less than z.
y>x>z Returns true if x is both (a) less than y and (b) greater than z.

Other valid forms of this syntax can be created by substituting “>=” for
“>” or “<=” for “<” (for example, expressions of the form “y <= x <
z” and “y >= x >= z” are valid). These are the only valid substitutions,
though (for example, expressions of the form “y < x > z” are not valid).
Failure to follow these rules when creating relational expressions of
this kind will likely result in unintended calculation results.

Logical operators
Three logical operators are also available: logical AND, logical (inclu-
sive) OR, and logical NOT. AND is represented by the ampersand (&),
OR by the vertical bar (|), and NOT by the exclamation mark (!).

Like the relational operators (which return 1 if a comparison is true and


0 if not), these logical operators are zero-centric. That is, any operand
that is non-zero is treated as true, and only a zero operand is treated as
false. The returned value is 1 if the evaluation is true, and 0 if false.

Operator precedence
In most situations, you will not need to know the details of which
operators bind most tightly. However, when formulas do not appear to
calculate correctly, you should check this section to see if precedence is
a factor.

Operator precedence is how TreeAge Pro decides where you intended


to put parentheses. Consider the following example:

A + B * C + D
A quick check of the precedence list on the next page indicates that
multiplication has higher precedence (binds more tightly) than addition.
TreeAge Pro will therefore interpret your expression as:

A + (B * C) + D

Appendix D: Functions and Operators 395


This process is continued until all uncertain bindings are resolved.

The table below lists the operators available in TreeAge Pro in order of
precedence. Operators with higher precedence will bind more tightly.
Adjacent operators having the same precedence value will be applied
from left to right.
Operator Character Precedence Value
Unary minus (e.g., “-30,000”) - 8
Logical “Not” ! 8
Exponentiation ^ 7
Multiplication * 6
Division / 6
Addition + 5
Subtraction - 5
Comparators <, <=, >=, >, =, <> 4
Logical “And” & 3
Logical “Or” | 2
Parentheses () 1
Brackets [] 1
Function argument separator ; 1

Notice that parentheses are at the bottom of the list. This simply means
that the operators inside the parentheses will bind tightly to stay within
the parentheses. They are your most useful tool for indicating your par-
ticular precedence requirements.

396 TreeAge Pro 2004 User's Manual


Mathematical, statistical, and other functions
Mathematical, statistical TreeAge Pro’s built-in functions are case-insensitive, with the name fol-
and other functions lowed by parentheses, and in most cases take arguments in the parenthe-
ses. Functions that have multiple arguments must use semicolon (“;”)
separators.

In the tree window, use the Function Helper (see Chapter 14) for help in
assigning the correct parameters in the proper order.

In most cases, any valid expression can be used as a function’s argu-


ment. Functions which here indicate an argument named “LIST” take a
flexible number of arguments. For example, “Average” returns the arith-
metic mean of all of the arguments that follow it. “Average(1;4;8;13)”
would return 6.5.

Arithmetic functions
In the arithmetic functions listed below, “e” represents the base of the
natural logarithm, or approximately 2.718.
Function Explanation
Abs(x) absolute value of x
Average(LIST) arithmetic mean of a list
Ceiling(x) smallest integer larger than x
Exp(x) “e” to the xth power
Floor(x) greatest integer smaller than x
GammaFn(x) (n-1)! for small positive integers; approximation otherwise
Int(x) integer component of x
Ln(x) natural (base “e”) logarithm of x
Log(x) base 10 logarithm of x
Max(LIST) maximum, or highest value, of a list
Min(LIST) minimum, or lowest value, of a list
Modulo(x; y) remainder of x divided by y
Prod(LIST) product of a list
Root(x; y) yth root of x
Round(x) x rounded to the nearest integer
Sqrt(x) square root of x
Stdev(LIST) standard deviation of a list of numbers.
Sum(LIST) sum of a list

Appendix D: Functions and Operators 397


Financial/Discounting functions
In functions, a “rate” argument can be entered as either a percent or a
decimal. For example, eight percent can be represented as either “8%”
or “.08,” but not simply as “8.”
Function Explanation
Annuity(rate; #periods) To calculate the net present value of a series of
equal future payments, multiply this function times
the amount of a single payment.
Formula: (1-(1+rate)-periods)/rate
Compound(rate; #periods) Returns the compound interest rate (effective
yield) at a fixed rate over a fixed number of
periods. If used as a multiplier, this function can be
used to calculate future value; if used as a divisor,
it can be used to calculate discounted, present
value.
Formula: (1+rate)periods
Discount(util; rate; time) Discounts a specified value (cost or utility) at the
specified discount rate over the specified period.
Formula: util / ((1 + rate)time)
FV(pmt; pv; rate; #payments) Returns the future value of a series of equal,
periodic payments. The “pv” parameter represents
an initial payment.
Formula: [pmt*((1+rate)payments-1)]/rate +
pv*(1+rate)payments
NPV(rate; LIST of flows) Returns the net present value of periodic cash
flows, discounted.
Formula: ∑(fi / (1+rate)i)
PMT(principal; rate; term) Returns the size of equal, periodic payments
required to pay off a loan, given the principal,
interest rate, and term of the loan.
Formula: principal*(rate/(1-(1+rate)-term))
PV(pmt; fv; rate; #payments) Returns the present value of equal, periodic pay-
ments at a fixed interest rate. The “fv” parameter
represents a final payment.
Formula: [pmt*(1-(1+rate)-payments)]/rate +
fv/((1+rate)payments)
UtilDiscount() Use the preferred name, Discount(), described
above.

398 TreeAge Pro 2004 User's Manual


Miscellaneous functions
Function Explanation
If(condition; trueval; falseval) Evaluates a condition and returns “trueval” if the
condition is true or “falseval” if the condition is false. For
example, “IF(x<0;50;75)” would return 50 if x were
negative and 75 if x were non-negative.
Choose(index;LIST of values) Returns a value based on its location in the
LIST, as specified by the index. For example,
“Choose(2;100;200;300)” returns 200, because the
index is 2, and 200 is the second value in the list. The
index must be a positive integer; an error is reported for
fractional or out-of-range values.

Tip:
Performing a sensitivity analysis on a variable used as the index of the
Choose() function, from 1 to the number of list items, can show the impact
on calculations of the different values specified in the list.

Sub(index) Obsolete. See Bilink() and Link(), below.


Bilink(index) Returns the value associated with a dynamic link. See
Chapter 20.
Link(index) Returns the value associated with a DDE link. See
Chapter 20.
Pi() Returns π, or approximately 3.1416.
Inf() Returns infinity (∞). Although no arguments are
accepted, you must type the left and right parentheses.
PathProb() Returns the cumulative path probability for the node
using the PathProb() function, or of the Markov node if
used in a Markov calculation.
Node(attribute; calc; LIST) Returns the expected value, or average of a number of
trials, from a node whose path is defined by LIST. For
attribute: use 0 to skip the calculation and return 0; use
any positive number to perform a regular calculation of
the node; in Cost-Effectiveness models, use -1 to perform
C/E calculations and return cost; then, use -2 to return
the stored effectiveness calculation. For calc: use 0 to
calculate the EV; use a non-zero number to average that
many simulation trials. For LIST, use a series of branch
numbers to select a node (e.g., ";1;2" selects node X in
the tree shown at left). See Chapter 21.
StateProb() See the TreeAge Pro Healthcare module documentation
for details on this Markov modeling function.

Appendix D: Functions and Operators 399


Matrix/List functions
These advanced functions can be very powerful tools for accomplishing
complex calculations and reporting tasks. It is recommended that you
test them initially in simple models to confirm that the arguments have
been set up properly.
Function Explanation
List(LIST) Used to contain a parameter list for a multivariate
distribution (e.g., Dirichlet).
Matrix(cols; LIST) Stores a list of parameters into a matrix with a specified
number of columns; for use as one of the parameters of
the MatrixMult() function.
MatrixMult(i; j; m1; m2) Performs matrix multiplication on two matrices (cor-
relating a 1xN matrix of random numbers using an NxN
covariance matrix, for example). Returns a cell from row
i, column j, of the resulting matrix:
m3(i, j) = sum(m1(i,:)*m2(:,j)
The two input matrices, m1 and m2, must conform to
required shapes for the matrix multiplication to work: the
number of columns in matrix 1 must equal the number
of rows in matrix 2:
(# columns in m1)
= (# values in m2 divided by # columns in m2)
Note that the first argument in the Matrix() function is
the number of columns (i.e., number of items per row):
The resulting matrix has the same number of rows as
m1, and the same number of columns as m2.
To correlate a list of n values in matrix 1 using a second,
n x n covariance matrix, specify n columns for matrix 1
and matrix 2. The resulting matrix of correlated values
will have 1 row and n columns.
Global(i; j; value) Calculates value and dynamically sets a "cell" in a global
matrix/table to that value (can be a variable or expres-
sion). The function also returns that value. The first cell
in the global matrix is at row=1, column=1.
Anywhere value is used in an expression, it can instead
be "wrapped" in the Global function, in order to save the
calculated value (for example, for reporting purposes).

400 TreeAge Pro 2004 User's Manual


A value saved to the global matrix can be referenced
using the second form of the Global() function (see
below). The entire contents of the global matrix can be
dynamically saved to a text file using the third form of
the Global() function.
The matrix size is dynamically increased if either i or j are
larger than any previously specified values of i and/or j),
up to a maximum of one million cells (e.g., 100x10000
or 500x2000).
If i = 0 and j = 0, the calculated value is applied to the
entire existing matrix, allowing it to be dynamically reset
during calculations, if necessary.
If any argument (not just value) is an expression, it is
evaluated at the node that is using the Global() function
in a calculation, just as if the expression were not inside
the Global() function.
The global matrix is not saved with the tree. It is not
emptied automatically before or after an analysis (use
the last form of the function, with no arguments, to
empty the matrix). During simulation, different trials or
samples may have different matrices.
Global(i; j) Retrieves the value stored at row i, column j, in the
global matrix/table, for use in a tree calculation. The first
cell in the global matrix is at row=1, column=1.
Global(value) If value evaluates to a non-zero number, the current
global matrix/table is silently saved to a text file. If
value evaluates to zero, a text file is not created. The
function always returns a value of 1.
If a text file is saved, it is saved in the same directory
as the tree (or, if the tree has not been saved, in the
root directory of the hard drive). The text file will use
the name of the tree followed by the word "globals", an
underscore, and the number that value evaluates to. For
example, a calculation in "c:\trees\mytree.tre" that uses
the function "Global(21)" would save the current matrix
to a text file called:
"c:\trees\mytree_globals_21.txt"

Global() The global matrix is emptied (size is 0).

Appendix D: Functions and Operators 401


Distribution functions
The following functions employ the argument index to reference a dis-
tribution defined for the tree in the Distributions dialog. With the excep-
tion of DistKids(), they are intended primarily for use during Monte
Carlo simulation.
DistSamp(index) Obsolete. See Dist(), below.
Dist(index) Returns the value associated with an analytic distribution
in your tree. During expected value calculations, this func-
tion returns the distribution’s mean or median. During
Monte Carlo simulations, this function returns a randomly
sampled value taken from the distribution.
Also takes an optional second argument after the
index for: forced sampling during EV calculations (=1);
referencing a DistKids() function’s sample value for a
dynamic branch (=2); referecing one of a multivariate
distribution’s n sample values (=1 to n).
See Chapters 16, 17, and 22.
DistKids(index; samples) A probability function which dynamically creates invis-
ible branches (number = samples) at a chance node
during any calculation. Used in combination with the
Dist(index; 2) syntax described above.
DistTrim(index; min; max) Same as the Dist() function, except it will resample (up
to a maximum of 10 times) until a sample is returned
that falls between the specified minimum and maximum
values.
DistProb(index; val) For the specified distribution, returns the approximate
cumulative probability of the specified value.
DistValue(index; prob) For the specified distribution, returns the approximate
value at the specified cumulative probability.

402 TreeAge Pro 2004 User's Manual


Probability functions
The following four functions employ the arguments rate (or prob) and
time. In each case, it is essential that the values for these parameters be
based on the same scale. For example, if a rate being converted is in
terms of years (such as yearly mortality), the time parameter must also
be in years.
Function Explanation
RateToProb(rate; time) Converts a rate, such as deaths per year, into a
probability, such as the probability of any single
patient dying in any given year.
Formula: 1 - e- rate*time
ProbToRate(prob; time) Converts a probability, such as the probability of
any single patient dying in any given year, into a
rate, such as deaths per year.
Formula: - ln(1 - prob) / time
DEALE(rate; time) DEALE is an acronym for “declining exponential
approximation of life expectancy.”
Formula: (1 - e- rate*time) / rate
OddsToProb(odds) Converts odds into a probability.
Formula: odds / (1 + odds)
ProbToOdds(prob) Converts a probability into odds.
Formula: prob/ (1 - prob)
ProbFactor(prob; fac) First converts the probability to odds, then multi-
plies it by the given factor, then converts it back to
a probability. See the two functions, above.

These functions are particularly sensitive to user errors. You are urged
to exercise great care when using them in your models. It is recom-
mended that you use the Calculator/Evaluator feature, located under
TreeAge Pro's Values menu, to test expressions using these functions;
see Chapter 14.

RateToProb(), as the name suggests, is used to convert a rate into a


probability, either for the same time period (time=1) or a different time
period. For example, if a disease being modeled has a yearly mortal-
ity rate of .05, you could convert this to a probability using the formula
RateToProb(.05; 1). ProbToRate() provides the reverse function to Rate-
ToProb(), ultimately enabling a probability to be converted to a rate,
proportionally increased or decreased using the additive property of
rates, and then converted back to a probability.

Appendix D: Functions and Operators 403


In both RateToProb() and ProbToRate(), the second, time parameter will
allow you to convert between a rate for an interval of one length and a
probability for a interval of a different length.

The DEALE() function is cumulative, so the time parameter means


“over the course of this amount of time.”

404 TreeAge Pro 2004 User's Manual


APPENDIX E
APPENDIX E: SAMPLING DISTRIBUTION TYPES

SAMPLING DISTRIBUTION TYPES

This appendix provides infromation about each of the built-in sampling


distribution types available in Treeage Pro.

Derivations and detailed explanations of the distribution formulae provided


here may be found on many math/statistics web sites, and in most texts on
probability theory. See, for example, Christensen, Ronald; Data Distributions:
A Statistical Handbook (2nd Ed.); Lincoln, Massachusetts: Entropy Limited,
1989.

See Chapters 16, 17, and 22 for information on using distributions in trees.

In this appendix:

• Commonly-used distributions ..................................................... 406

• More continuous distributions .................................................... 407

• More discrete distributions......................................................... 411

Appendix E: Disrtibution Types 405


Commonly-used distributions
Commonly-used Normal distribution
1 x − ∝ 2
distributions 1
e
− 
2 σ 
Formula: f (x) =
2≠σ 2

Domain: -∞<x<∞
Parameters: Mean - ∞ < µ < ∞ , standard deviation σ > 0

Uniform distribution (real number form)



 0 x < LowX or x >HighX
Formula: 
f (x) = 
 1
LowX
LowX ≤″ xx≤″ HighX
HighX
 HighX − LowX

Domain: LowX < x < HighX


Parameters: Low X, High X

Uniform distribution (integer form)



 0 x < LowX or x >HighX
Formula:  or x not an integer
f (x) = 
 1
LowX
LowX ≤″ xx≤″ HighX
HighX
HighX-LowX+1
HighX − LowX
Domain: LowX ≤ x ≤ HighX
Parameters: Low X = real integer
High X = real integer > Low X

Triangular distribution
Formula:
 0 x < LowX or x >HighX

 x − LowX
 2 * ( HighX − LowX ) * LowX
LowX ≤″ xx ≤
″ Mode
Mode
f (x) =  Mode − LowX

  x − Mode 
2 * ( HighX − LowX ) * 1 −  Mode << xx ″≤ HighX
HighX
  HighX − Mode 

Domain: LowX ≤ x ≤ HighX


Parameters: Low X, Mode (likeliest), High X

406 TreeAge Pro 2004 User's Manual


Fractile distributions (10/50/90 et al)

Formula: Equal probability for Low X and High X (e.g., .30


or .25), remainder for Median, 0 for other values.

Domain: Low X, Median X, High X


Parameters: Low X, Median X, High X
More continuous distributions
More continuous Beta distribution (integer form)
distributions (n − 1)! n − r −1
Formula: f (x) = x r −1 (1 − x )
(r − 1)!(n − r − 1)!
Domain: 0<x<1
Parameters: r > 0, n > r
Details: Mean = r/n; r = occurences; n = population size

Beta distribution (real number form)


Γ ( a + b)
Formula: f (x) = x ( a −1) (1 − x )( b −1)
Γ ( a )Γ ( b )
Domain: 0<x<1
Parameters: a > 0, b > 0
Details: mean = a/(a+b)
a and b can be approximated from a mean and stan-
dard deviation as:
a = mean^2*(1-mean)/(se^2)
b = mean*(1-mean)/(se^2)-a

Dirichlet distribution (multivariate, normalized Beta)


xj
Formula: pj = where x j ~ gamma(α j , β )
Σ k
x
i =1 i

Domain: 0 ≤ pj ≤ 1 where Σ k
p
i =1 i
= 1.0
Parameters: α 1 , α 2 ,...α k , β = 1
Details: See Chapter 22.

Appendix E: Disrtibution Types 407


n
Chi distribution n 2
2   − nx 2 
 2 
2θ 

Formula: f (x) = x n −1e 
n
θ Γ 
 2

Domain: x>0
Parameters: n > 0, θ > 0

Chi-Squared distribution
 n −1 x

2 
x e 2θ
Formula: f (x) = n n
(2θ ) Γ  
2
2
Domain: x>0
Parameters: n > 0, θ > 0

Erlang distribution

Formula: f (x) =
(kλ )k x k −1 e − kλx
(k − 1)!
Domain: x>0
Parameters: k > 0, λ > 0

Exponential distribution

Formula: f (x) = λe − λx
Domain: x>0
Parameters: λ>0

408 TreeAge Pro 2004 User's Manual


Gamma distribution
β α x (α −1) − βx
Formula: f (x) = e
Γ(α )
Domain: x>0
Parameters: α > 0, β > 0

Hyper-exponential distribution
2
Formula: f (x) = 2 λ p 2 e −2 λ p x + 2 λ (1 − p) e −2 λ (1− p ) x
Domain: x>0
Parameters: λ > 0; 0 < p < 1

Laplace distribution
x−a
1 −
Formula: f (x) = e b
2b

Domain: -∞<x<∞
Parameters: b > 0, - ∞ < a < ∞

Logistic distribution
ae − ( ax + b )
Formula: f (x) = 2
(1 + e ( ) )
− ax + b

Domain: -∞<x<∞
Parameters: a > 0, - ∞ < b < ∞

Appendix E: Disrtibution Types 409


Lognormal distribution
 − (ln ( x ) − ∝) 2 
1 
 2σ 2


Formula: f (x) = e
xσ 2≠
Domain: x>0
Parameters: σ > 0, - ∞ < µ < ∞

Details: The parameters µ and σ are the mean and standard


deviation, respectively, from the distribution of the
natural log of x.

Maxwell distribution
x2
4x2 −α 2
Formula: f (x) = e
α3 ≠
Domain: -∞<x<∞
Parameters: α>0

Rayleigh distribution
 −x2 

Formula: f (x) =
x  2α 2 
e
a2
Domain: x>0
Parameters: α>0

Weibull distribution

Formula: f (x) = λkx k −1e − λx


k

Domain: x>0
Parameters: λ > 0, k > 0

410 TreeAge Pro 2004 User's Manual


More discrete distributions
More discrete Binomial distribution
distributions  n x n− x
Formula: P (x) =   p (1 − p)
 x

Domain: x = 0, 1, 2, …, n

Parameters: 0 < p < 1, n = 1, 2, 3, ...

Poisson distribution
λi
e−λ
Formula: P (x=i) = i!
Domain: i = 0, 1 , 2, …

Parameters: λ>0

Appendix E: Disrtibution Types 411


412 TreeAge Pro 2004 User's Manual
APPENDIX F
APPENDIX F: TECHNICAL NOTES

TECHNICAL NOTES

In this appendix:

• Changing the storage location for tables...................................... 414

• Using TreeAge Pro’s command line ............................................. 414

Appendix F: Technical Notes 413


Changing the storage location for tables
Changing the storage It is possible to change the directory in which tables are stored. This is
location for table files particularly useful for network installations where the software is stored
on a network drive on which users do not have write-permission. To
change the directory, you must create a “pointer” file which specifies the
name of the directory or folder to be used for table storage.

Create a plain text file called “TABLE.DIR” in the root application


directory (e.g., “C:\Program Files\TreeAge\TreeAge Pro\”). On the first
line of the file, type the name of the directory which will be used for
table storage. For example, your TABLE.DIR text file might contain the
text “C:\Med\Info\Tables” to cause TreeAge Pro to look in that directory
for tables. On a network installation of TreeAge Pro, this could be used
to give each computer a private tables directory.

If the specified tables directory does not exist when TreeAge Pro is
opened, TreeAge Pro will ask if you want to create the directory.

Any changes you make to the TABLE.DIR file will only be recognized
by TreeAge Pro the next time you start the program.

See Chapter 17 for more on working with table files.

Using TreeAge Pro's command line


Using TreeAge Pro's A number of parameters can be used on the command line used to start
up TreeAge Pro.
command line
Using custom start-up flags
You can employ one or more start-up flags to alter certain functionality:

-mN Specifies the number of threads to execute during Monte


Carlo simulation; this overrides TreeAge Pro’s default
behavior, which is to use one thread for each available pro-
cessor (up to 8) on the computer.

-i Tells TreeAge Pro that you usually prefer to input models


as influence diagrams rather than trees. The default listing
under the File > Open dialog will be influence diagrams
rather than trees; and the File > New dialog will assume
you want a new influence diagram.

-t Suppresses the display of a new, empty tree.

414 Appendices
These flags are invoked on the command line of the executable. To set
the command line, create a shortcut to TreeAge Pro – on the Windows
Desktop, for example. Then, open the shortcut’s Properties dialog, edit
the Target field (this shortcut can be renamed to reflect a tree being
opened).

Multi-processor computer options


On a multi-processor computer, specifying a command line of:

"c;|program files\treeage\treeage pro\treeagepro.exe" -m1

will cause only a single processor to be used during simulation, enabling


other programs to run normally on the computer while TreeAge Pro per-
forms a long simulation.

This is also useful in situations where running calculations in sepa-


rate threads is not desirable; for example, if a single Global( ) matrix
is needed for reporting on the simulation (rather than having separate
matrices for each thread).

See Chapter 16 for more information on Monte Carlo simulation, and


Appendix D for more on the Global matrix.

Startup files
It is possible to designate the names of files to be opened at startup. The
names of these files are specified on the command line, in which case
the “-t” flag is automatically applied. If the file name, or any directory in
its path, contains spaces or punctuation, you must enclose the file name
in quotation marks.

Defining variables
You may automatically define variables in the specified tree upon
startup. For example, the target field of a shortcut icon in Windows
might read:

“C:\Program Files\TreeAge Pro\TreeAge


Pro.EXE” -i c:\MyTree.tre?v1=3?v2=v1^2;v3=
x
TreeAge Pro will open MyTree and define three variables at the root
node:

Appendix F: Technical Notes 415


v1 = 3
v2 = v1 ^ 2
v3 = x
There must not be any whitespace in the formulas. The question mark is
the delimiter.

Startup size
If you are invoking TreeAge Pro from another program, such as Visual
Basic, you may pass the SW_MINIMIZE flag to the WinExec function.
TreeAge Pro will operate as a minimized icon, and will not display its
splash screen.

Influence diagrams
Here is an example of a command line with flags set to open TreeAge
Pro with influence diagrams as the default model type, with the startup
file MyInf.ind:
“C:\Program Files\TreeAge Pro\TreeAge
Pro.EXE” -i “c:\files\MyInf.ind”

416 Appendices
INDEX

saving last analysis 232 branches. See decision tree:

Index tornado diagram 190 branches


using graph templates 94, 234
with run-time models 240 C
arcs 9, 15 calculation. See decision tree: calcu-
annotating 337
Symbols curving 337
lation preferences
calculations. See calculation method
! operator 395 editing 337 preferences. See calculation
# (complementary probability) 160 flipping 337, 345 method
& operator 395 fonts 392 calculation method
.TRB file 364 grayed out 330, 392 attributes 98
? operator 317 influence 15 benefit-cost 102
| operator 395 probabilistic 15 multi-attribute, generalized
on clipboard 337 setting weightings 101
A structure-only 392 optimal path
timing 328, 341, 343 high or low 383
ActiveX 310
arrows 388 status bar indicator 96
align
aligning 127 certainty equivalents 10
influence diagram nodes 336
creating 127 clipboard 114
tree branches 131
arrow keys 362 clones
analyses
asymmetry 41, 329–330 influence diagram 346
Over/Under 75
default variable values 331–337 clones (tree) 270
Probability Distribution 62
elim 329 Clones dialog 273
Rankings 60
force 329 clone copies
Verify Probabilities 76
skip 330 attaching 272
analysis sequences 235
skip all 330 detaching singly 273
adding stored analyses 236
symm 329 hiding 275
adding variable definitions 236
evaluate at root node 237 B root node type 272
evaluate immediately 237 storage to disk 276
non-numeric 237 batched analysis 235 clone master 271
numeric 237 Bayes’ revision creating 271
creating 236 binary hypothesis 294 destroying 273
Monte Carlo simulation 218 dichotomous test 294 modifying properties 273
removing sequence items 237 example 292, 294 naming 272
running 238 influence diagrams 340 hiding 387
sequence stored analyses 236 introduction 292–293 introduction 271
uses 235–236 multiple tests 326, 344–345 modeling strategies 277
variables definitions performing 294 nesting 274
resetting pre-sequence values preparing the subtree 294 suppressing clone updating 276
239 sequential tests 292 analysis 277
analysis storage structural requirements 294 closing files 277
analysis description 232 tree window 292 reenabling clones 276
available analyses 232 using the dialog 294 using variables 274
deleting stored analyses 233 bi-directional links 265. Also vs. pasted subtrees 270
maintaining stored analyses 233 see dynamic links Clones list dialog 273
rename stored analyses 233 bitmap 390 Command line 414, 415
running stored analyses 233
comments building 20–24 Discounting 398
node 389 calculation method 383 discrete-sized “population” 283
complementary probability 160 calculation preferences 27 display 144–150
Cost-effectiveness chance nodes 12 DistKids function 286
influence diagrams 327 branches 12 distribute children
cost-effectiveness. See Healthcare expected value 14 manual correction 290
Module: cost-effectiveness change node type 24–25 Distribute Children command 286
Custom interface 312 change payoff 26 distributions 222–230, 406–411
basic mode 313 dealing with large models 268 advanced properties 209, 219–220
calculation method 315 decision nodes 12 Sample once per Markov stage
risk preferences 315 branches 12 per trial 210
testing 318 expected value 14 as parameters 219
change values 313, 320 design 11 correlating 219
extended mode 313, 318 display custom
ready for ECI 319 customizing 139 sampling in Excel 228
run analyses manually 318 preferences 139 table, data set 227
usersÕ view 320 Explorer view. See Explorer view DistSamp() function 209
protecting intellectual property label node 122 formulas
321 label nodes beta 407
stored analyses 314, 318 uses 122 chi 407
custom interface large models chi-squared 408
stored analyses 235 speeding up work 268 Erlang 408
linking 277–280 exponential 408
D logic nodes 150 gamma 409
DATA 3.5 minimize empty space 387 hyper-exponential 409
changes from 352–355 moving around. See decision tree: Laplace 409
DATA 4.0 navigating log-normal 410
changes from 356–359 moving around in 23 logistic 409
DATA Interactive navigating 21, 23 Maxwell 410
compared to Run-time DATA 312 nodes normal 406
demos 311 calculating expected value 57 Rayleigh 410
technical specifications 311 deleting 112 triangular 406
DATA Pro deleting end nodes 113 uniform (linear) 406, 407
changes from 356–359 node comments 122 numeric indexes 207
DEALE 403 numeric formatting 59 palette 208
decision probabilities 292 path probabilities 58 parameterizing 207
decision tree payoffs 24–26, 25 defining parameters at root node
adding branches probabilities, entering 27 219
default number 387 reducing complexity 268 using non-numeric parameters
alternatives 12 reducing size 268 219
basics 11 root node 20 properties
basic calculations 14 terminal nodes 12 comment 209
branches payoffs 12 index 209
adding 22, 110 uncertainties 12 Properties dialog 209
changing order 113 default settings 382 resampling per Markov stage
deleting 22, 112 Delphi 311 219–220
reordering 113 deterministic sensitivity analysis 10 uses 207
Dirichlet distribution 284 Drug development and testing 311
Drug marketing 311 subtrees 49 Global() 285
dynamic links matrix
calculations 259 F Global() 356
spreadsheet recalculations 259 Find 145–147 medical
trigger link (DDE) 255, 256, 257, formula text 144 DEALE 403
258 node text 144 OddsToProb 403
Dynamic treatment protocols 311 variable definition text 144 ProbToRate 403
folding back 14 RateToProb 403
E UtilDiscount 398
fonts 80, 141
error messages 76 arcs 392 miscellaneous 399–404
European/regional numeric setting default for nodes 388 Choose 399
27 graph labels 80 dist 402
examples graph template 92 If 399
faulty machine 340 influence diagram 392 Inf 399
example trees node 141 Pi 399
airline problem 188 node comment 123 Stdev 399
investment decision 11 note boxes 124 syntax 397
sensitivity analysis 164 subtree 141 using in formulas 183
oil drilling 74 TrueType 390 G
prostate cancer 329 functions 182, 394–404
rich uncle 302 argument separator (;) 183 Global function. See functions:
rock climber treatment 191, 200 arithmetic 397–404 Global()
Excel module 87 Abs 397 graphs
optional modules 1–2 Average 397 customizing 78
Excel spreadsheet links 254 Ceiling 397 custom labels 82
expected utilities 10 Exp 397 graph template 92
expected value 14 Floor 397 custom lines 85
calculation 14 Int 397 graph template 92
single node 57 Ln 397 labels 78
expected value of perfect informa- Log 397 editing text 80
tion (EVPI) 71–76, 326, 337 Max 397 fonts 80
defined 71 Min 397 line colors
in influence diagrams 345 Modulo 397 changing 90
using Monte Carlo simulation 205 Prod 397 markers
Explorer view 269 Root 397 changing 89, 90
export 390 Round 397 numeric formatting 85
exporting images Sqrt 397 Options dialog 82
formats Sum 397 templates. See graph templates
.TRB files 52 financial 403–404 contents 92
bitmap 50, 51 Annuity 398 creating 92
JPEG 51 Compound 398 modifying 94
metafile 50, 51 FV 398 text reports. See text reports
saving graphics files 48 NPV 398 types
screen capture programs 52 PMT 398 bar 88
to graphics files 49 PV 398
to PowerPoint 51 Function Helper 183, 397
via the clipboard 49
line 89 payoff formula 332 broken links 263
region 91 redraw problems. See Redraw cell formatting 263
scatter plot 92 Window cell ranges 259
graph templates 92. See also analy- value nodes Sub() function 261, 262
sis storage assigning a formula 332 in nested trees 280
analysis storage 94 enumerating 333 to spreadsheet
payoffs, entering 40 named cells 263
H when to use 17, 326–327 worksheet order 263
Healthcare module influence diagrams linking (server-side) 261, 265
optional modules 1–2 Bayes’ revision 340 Copy Special 265
hiding node text 139 Bayes’ revision drawbacks 266
hiding node texts 389 decision node required 342 lottery 9
hiding probabilities 138, 389 multiple tests 344
clones 346 M
I create 346 Markov models/nodes
destroy 346 See Healthcare module
imperfect information 74 collapsing 346
influence diagram 15 Maximin roll back 100
EVPI 345 calculations 100
advantages 15 hiding nodes 346
analyzing 16 display 100
sub-models 346 optimal path 100
arcs influence diagram window 32
adding 34 roll back boxes 100
Introduction 1 use 100
deleting 36 investments 10
gray 42 Menus 364–379
selecting 34 L Analysis 375
chance nodes Diagram 377
probabilities, entering 39 label node 122 Display 369
converting to a tree 43, 391 likelihood probabilities 292, 294 Edit 365
algorithm 327–328 limitations File 364
decision node maximums Graph 378
alternatives, add 37 graph axis intervals 84 Options 372
alternatives, delete 38 linking 254–266 Table 379
alternatives, reorder 38 linking dynamically 261, 261–265, Values 371
deterministic nodes 333 278 metafile 390
fixed node size 391 capturing server data 261 mini-tree
graphical position of nodes 337, cell ranges 259 modeling
391 copying links 264 decision trees 11
introduction 9 invoking bi-directional link 265 design
limitations Links dialog using variables 155
cost-effectiveness 327 invokes bi-link 263 sensitivity analysis 154
Markov processes 327 link OK 263 Monte Carlo simulation 10,
multi-attribute 327 link properties 262 204–220
Markov processes 327 assign index 263 at decision nodes 217
mini-tree 333 path 264 decision nodes 217–218
multi-attribute 327 replace path 264 downstream decisions 217
nodes 15 Link Properties dialog 260–261 first-order 206
creating 33 requirements 262 identifying values
selecting 33 spreadsheet adding 218
removing 218 O node display
output window boxed payoffs 137
saving as .MCS file 218 Operators 394–404 notes & arrows 388–392
second-order 206 arithmetic 394–404 borders 127
setup dialog 211 logical 395–404 numeric formatting 168
two-, three-dimensional 352 precedence 395–396 graph axis 85
vs. roll back 204 relational 394–404 graph template 92
Multi-attribute calculations 101 Optimal path 149 influence diagrams 391
benefit-cost 102 force at node 150 setting 383
cost-effectiveness 102 maximize 97 units 56, 57
generalized multi-attribute 102 minimize 97 other calculation 385–387
preferences showing in tree 150 printing 48, 389–392, 390
calculation method 101 switching between low and high regional numeric settings
Multi-attribute calculatios 150 currency symbol 146
weighting function 103 optimization 9 decimal separator 145
multi-processor calculations overriding Windows settings
local network 204
P 146
single computer 204 Page Headers & Footers dialog specifying 146, 147
decision tree 47 thousands separator 145
N payoffs 12, 13 risk 306, 384
Navigation button 362 calculating over/under probabili- roll back 99, 138, 384–387
nested trees ties 75 calculate payoffs only 137
calculating payoffs 279 calculating range 75 terminal node columns 99
calculating probabilities 278 displaying 386 save settings as default 382
limitations 279 entering multi-attribute payoffs 99 setting defaults 142
master tree 278 entering multiple payoff sets 99 terminal node display 385–387
sensitivity analysis Enter Payoff window 102 tree display 387
limitations 279 node name as 385 align end nodes 139, 387
workaround 279 numeric vs. formula 155 minimize empty space 140
subsidiary tree 278 perfect predictor 71 tree font 388
when to use 278 Pharmaceutical sales tools 311 variables display 386–387
nodes. See decision tree: nodes; See Points of care 311 Preferences dialog 382–392
also influence diagram: nodes Portfolio analysis 311 printing 46–48
selecting 106–107 preferences 27 alignment 46
multiple, unrelated 106 calculation method 96, 383 center in page 389
node comments multi-attribute 101 headers & footers 389
red flag 124 default 142 page breaks 389
note boxes 125 fonts 142 page setup 46
arrows 127 default for nodes 142 preview
drawing 127 default for probabilities 142 headers & footers 47
moving 127 roll back boxes (EV) 142 image offsetting 46
only in trees 127 variable definitions 142 image resizing 46
binding 126 global 390–392 show headers 389
deleting 125 influence diagram 391–392 use printer for sizing 390
drawing 124 arcs 392 zoom 47, 389
fonts 124 fonts 392 probabilistic sensitivity analysis 10
preferences 388 node size 391–392 probabilities 13, 292
complement 160
complementary 385 roll back 14, 28, 58 169
display 384 algorithm 14 thresholds, reducing error 169
error checking (coherence) 76 boxes 307 Threshold Values legend 167,
hiding 389 contents 99 168
numeric vs. formula 155 fonts 388 2-way 191
path 58. See also functions: Path- hiding 132 indifference, regions of 193
Prob( ) moving 59 isocontours 195
remainder 160 calculations region graph 191
verifying/testing 76 changing displayed value 99 requirements 191
probability distribution 62–76, 286 expected value 99 thresholds 193
bars maximin 99 thresholds, vs. 1-way 193
calculating height 63 path probability 99 threshold distortion 193
comparative 65–76 display 3-way 195–196
intervals, x-axis 63 terminal node columns 99 animation of 2-way graphs 195
Probability Distribution command. preferences 99 third axis 195
See probability distribution turning off 59 correlated variables 200
Probability wheel 317, 320 roll back columns excluding correlates 200
using # 149 incremental values 133 interpreting graphs 201
using variables 149 setting up 134, 136 deterministic nodes 333
probability wheel terminal node numbers 137 influence diagram 333
in influence diagram 335 turning on 99 introduction 164
visual endnodes 133 limitations 204
Q Roll Back command 58. See methods 164–169
R also roll back on probabilities 164
root node. See decision tree: root on risk preference coefficient 306
R&D portfolio analysis 311 node options 200
rankings 60 Run-time DATA correlated variables 186
redo 119. See also undo building custom interfaces 312 probability coherence 202
Redraw Window 369 Run-time version 312, 320, 321 parameter uncertainty 154
Replace 145 payoff variables 161
all occurrences 144 S precautions
formula text 144 multiple definitions 186
node text 144 scientific notation 57
screen redraw problems. See Redraw non-numeric definitions 186
variable definition text 144 requirements 155
where 144 Window
printer driver 390 threshold analysis 196
Return on investment 311 explanation 196
revert to saved 119 scripting 365
selecting nodes. See nodes: selecting interpreting results 199
risk preferences non-linearity 197
certainty equivalents 302–307 Select If command 107
sensitivity analysis 10 tolerance 197
coefficient 303, 304 tips 186
constant risk-aversion 303 1-way 154, 167–169
graph marker legend 167 tornado diagram 91–92, 188–191
assigning 304 correlated variables 191
non-constant risk-aversion 305 interpreting the graph 167–169
threshold, caveats on 169 cumulative risk % 191
assigning 305 hiding bars 190
turning on 384 thresholds 168–169
thresholds, hiding 168 interpreting 189–190
ROI 311 risk % 191
thresholds, linear interpolation
spread 191
spread, squared 191
storing analysis 190, 193, 194 importing data tree window 20
text report 190 copying from spreadsheet 224
thresholds 190 requirements 224 U
viewing 1-way line graphs 189 lookup method uncertainty 10
uses 154 index-specific 229 undo 119
Simulation using samples 206 interpolation 229 last ten actions 119
details 212 truncation 229 limitations 119
distributions 207 moving to another computer 228 utility function 10
disabling 215 options
Sample Some 215 index off edge is error 229 V
performing probabilistic sensitivity package with tree 228
analysis 207 reporting 229 value of information 10, 71, 205
probabilistic sensitivity analysis sharing files 228 variables
using trials vs. cohort/EV calcu- storage location box
lations 216–218 changing 228 custom interface 320
Simulation using trials 206 tips correlations 181
skeleton tree 137 column indexes 230 removing 182
Skip generation Tables Used report 229 creating 179
unskip 131 Table menu 224 Define Values dialog 179
Spreadsheet 224 tab key 157 deleting variables 180
Start-up 414, 415 technical notes 414–415 modifying definitions 179
Status bar 96, 307 terminal node display 386 Define Variable window 182
calculation method 99 terminal node numbers 138 modifying a definition 180
status bar 363, 370 tests 292 defining 179, 181
graph windows 90 text reports 86–88 at multiple nodes 249
progress indicator 384 Notes section 87 at selected node(s) 247
reference 363 numeric formatting tip 86 default numeric value 181
sub-models 346 printing 87 multiple 179
subtree Text Report command 86 definitions
defined 106 threshold analysis. See sensitivity displaying below branches 179
Subtrees analysis: threshold analysis deleting 180
collapsing visible 130, 130–132 Tips Evaluator 173
expanding hidden 130 custom interface 314 Insert Variable dialog 175
pasted vs. cloned copies 270 Tool bar in influence diagram
selecting probability wheel 148 defining in mini-tree 334
for clone master 271 tool bar 33, 362, 370 deterministic nodes 333
subtrees reference 362 hiding 330
pasting 117 tornado diagram. See sensitivity nodes 330–337, 331
analysis: tornado diagram node-specific definitions 247
T tracker variables 182 properties 180–182
tree. See decision tree basic 181
tables comment 181
Add Entry dialog 223 redraw problems. See Redraw
Window name 181
create from line graph 90 short description 181
entering values 222 TreeAge Pro Interactive 235
tree clipboard 114, 117 show in tree 181
exporting 229 recursive definitions 249
file format 228 switching between 117
importing 228 viewing 114, 117
complex forms 251 X
how DATA evaluates 249 Y
references to deleted variables
180
Z
finding 180
renaming 180
Sliders 174–183
tips 249
variables 155–164
basic introduction 155
correlations 186–190
positive vs. negative 201
definitions 155
displaying in tree 386
formula definitions 155
in sensitivity analysis 164
numeric definitions 155
search algorithm
payoffs and rewards 187
probabilities 187
substituting for numeric values
155
tips 186
uses 155
using in payoffs 161
advantages 161
variables (tree)
definitions box
font 388
Variables and Tables dialog 163
Variables Report 172
contents 172
exporting 172
Variables window 183
changing node selection 177
copying and pasting definitions
178–179
cutting definitions 178
navigation buttons 177
opening a Define Variable window
176
show inherited definitions 177

W
weights 371. See also decision tree:
calculation preferences

You might also like