10.2 Referencing Variables in a tree
You can enter quantities such as payoffs, probabilities, etc. in any tree directly as numeric values. However, TreeAge Pro allows for the flexibility of entering quantities as expressions using numbers, variables, tables, functions and distributions. As stated as the start of this section, there are significant benefits to entering numeric values as Variables, including efficiency, consistency and setting your model up for Sensitivity Analysis.
We'll start with the single variable that we created in the section before: Variable_Name_Here. We'll use two different methods to place the new variable in two probability expressions.
To use the variable "Variable_Name_Here" in a model:
-
Assuming the variable describe a probability, select below the branch (usually where there is red text: Enter prob).
-
-
With the mouse click on the function editor ("f(x)") to open the Formula Editor.
-
-
Select "variable" in the formula editor's left pane, then double-click the variable Variable_Name_Here in the right pane and click OK.
-
-
This will replace the red text (waiting for a variable or function to be entered) with the probability which should be referenced: Variable_Name_Here.
-
Complementary probabilities
When you enter probabilities into your model, you have the option of using the complement sign for one of the probabilities.
In the example above, we have enter the complement sign: #, which will be calculated as (1 - Variable_Name_Here - pLocalToDead). The benefit of using the "#" is that it recalculates if the values of pLocalToDead or Variable_Name_Here are changed.
To assign a complement (remainder) expression to a probability entry:
-
Select the red text which says "Enter prob".
-
Replace it with # (a hashmark), which will calculate as (1 - Variable_Name_Here - pLocalToDead).
To update payoff expressions in a Decision Tree:
Variables can also be used to define variables in a model, whether that is a Decision Tree or Markov Model.
To edit payoffs in a Decision Tree you can use one of two methods:
Edit payoffs via the Terminal node:
-
Double-click on the Terminal node where you want to edit the payoff.
-
The Edit Payoff dialog will open and you can replace/enter the value with the appropriate variable name for the payoff.
-
Click on the elipsis ("...") button to open the formula editor and edit if required. (Optional)
-
Click OK.
Edit payoffs using the Menu at the Terminal node:
-
Right-click on the Terminal node where you want to edit the payoff and select Edit Payoffs from the context menu.
-
The Edit Payoff dialog will open and you can replace/enter the value with the appropriate variable name for the payoff. Click OK
-
Click on the elipsis ("...") button to open the formula editor and edit if required. (Optional)
-
Click OK.
If there is any red textin the tree once you have completed editing it, you will probably need to enter variables or formula to define the missing values .
If you have a model which has other values to enter, such as a Markov, Partitioned Survival or other model type, the method for entering values will be similar. The specific sections related to these model types will show you more details about entering model specific values.