34.9 Cloning Markov Models and using State Bindings

A major advantage of using clones in any tree is the ability to reuse a particular structure in multiple parts of a tree. By doing this, you're still retaining the option to vary probability and other value expressions in each “copy,” but you only have to maintain the master subtree (refer to the section Cloning subtrees). In TreeAge Pro, entire Markov models can be cloned within a single tree and sections within a complex transition subtrees can be cloned.

Using Markov state bindings

Clone copies of Markov transition subtrees will, by default, employ the jump-to state settings specified in the clone master. In TreeAge Pro, Markov bindings can be used to have a transition in a clone copy use a different jump-to state than the clone master.

As described in the Cloning subtrees section, variables can be used in clone copies when numeric values such as probabilities need to be different between the clone master and clone copies. Markov state bindings function similarly; rather than assigning a numeric value to the binding name, a Markov state name is assigned instead. Like variable definitions, Markov state bindings must be defined at an appropriate node. Markov state bindings may be defined at any node on the Markov subtree, including the Markov node. Typically, they are created at the root nodes of the clone master and clone copies.

The use of Markov state bindings can be illustrated using the Health Care tutorial example tree Markov Bindings.trex, shown below unfinished.

Transitions must be assigned to the Response and No Response nodes in the clone master. The Response transition node in Drug A’s subtree should jump back to Drug A, while the same node in Drug B’s clone copy subtree should, instead, jump to Drug B. Similarly, Drug A’s No Response node should point to Drug B, while Drug B’s No Response node should point to End Therapy.

To define Markov state bindings in the Markov subtree:

  • Open the Markov Bindings.trex tree.

  • Select the Drug A node.

  • Choose Views > State Bindings from the toolbar.

  • In the State Bindings View, click the "add" toolbar icon to add a new binding.

  • Enter the Name continue and select the State Drug A.

  • Add another binding and enter the Name next line and select the State Drug B.(See below).

  • Select the Drug B node.

  • In the State Bindings View, add two bindings with the Name/State combinations continue/Drug B and next line/End Therapy.

The tool bar in the State Bindings View will allow you to copy State Bindings from one node and paste them to another. They can also be copied and pasted to/from Excel, but be careful to include all rows/columns when copying data back to TreeAge Pro.

If the display of Markov information is turned on in the tree (in the Tree Preferences dialog, under the Variables Display category), Markov bindings will be displayed below other Markov information, in the form binding name >> jump-to state name.

Bindings that you create have no effect until a binding name is referenced at a Markov transition node in a clone master.

When Markov state bindings are found in the path back to the Markov node, the list of options under Jump state in the Markov View will include Markov bindings as well as the regular state names. The binding names displayed in the list are prefixed with the equal sign (=) to distinguish them from actual states. (Thus, when naming states, you should avoid using a leading =, although this is not strictly forbidden.)

To use a Markov state binding in a clone master transition:

  • Double-click on Drug A’s Response node to open the Edit Jump State Dialog.

  • In the Edit Jump State Dialog, select the Markov Binding =continue and click OK.

  • ... OR...

  • Select Drug A’s Response node.

  • Choose Views > Markov from the toolbar.

  • In the Markov View, select the Markov Binding =continue for the Jump state.

Repeat these steps to set the jump state for the No Response Node to =next line.

The figure below is setting the jump state.

The figure below show changing the Markov binding and changing it from the Markov View.

When a binding name is used at a transition node, the search for the binding proceeds in right-to-left fashion, as with variable definitions. Since the Markov state bindings =continue and =next line are defined differently at the Drug A and Drug B nodes, the jump states will be different even though the transition subtree is cloned.

To avoid Markov structure errors due to subtle differences in state names, you should use caution when trying to clone part of one Markov process in order to attach copies in a different Markov process. (If you are determined to try, however, TreeAge Pro will allow it!) You might instead try cloning the entire Markov process, creating a clone master at the Markov node. However, there should be no problems with attaching clone copies from one state onto another state within the same Markov process.

Cloning an entire Markov process

Consider the Health Care tutorial example tree Complex Markov Cloned.trex, shown below.

Drug B’s transition subtree is a clone copy of Drug A’s subtree. On the surface, these subtrees appear to be identical, but in fact, the strategies have different termination conditions (assigned at the Markov node, outside the clone master).

State rewards utilize the variables init and incr. These variables are defined differently at the two Markov nodes resulting in different cost calculations. Similarly, different values could be used for each subtree’s probabilities simply by converting the numeric probabilities to variables in the clone master, and then uniquely defining the variables at both the Drug A and Drug B Markov nodes.