# Phase-Type Survival Trees to Model a Delayed Discharge and Its Effect in a Stroke Care Unit
## 2 Materials and Methods
### PHTST Construction  
PHTST is constructed by recursively partitioning nodes into more homogeneous subgroups based on covariates representing patient characteristics such as age, gender, and disease diagnosed. A split, minimising WIC is selected to partition the node into child nodes at each branch. If no split improves WIC, the node is designated as a terminal node. Figure 2 is the schematic representation of the phase-type survival tree constructed using the WIC-based splitting criteria for the length of stay data on stroke patients from the Belfast City Hospital. Table 1 lists nodes of the tree and possible splits of these nodes. The total value of WIC for all the terminal nodes of the survival tree is 16,478.75, and the total improvement in the WIC is 368.98. For the root node, WIC is 16,847.73. Figure 2: The schematic representation of the phase-type survival tree constructed using the WIC-based splitting criteria. \begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline
**Node** & **Covariate** & **Covariate** & **Number of** & **Mean LOS** & **Standard** & **Coefficient of** & **WIC** & **Number of** & **Total WIC** & **Cain in** & **WIC** \\  & & **Value** & **Patients** & **Deviation (LOS)** & **Variation** & **WIC** & **Number of** & **Phases** & **Total WIC** & **Cain in** & **WIC** \\ \hline
**All** & **Complete dataset** & **Root node** & **1985** & **29.01** & **52.84** & **1.82** & **16.847.73** & **3** & **16.847.73** & - \\ \hline \multirow{4}{*}{1 (Root node)} & Gender & Male & 933 & 26.59 & 44.06 & 1.66 & 7736.85 & 2 & \multirow{4}{*}{16,845.79} & \multirow{4}{*}{1.94} \\ \cline{3-10}  & & Female & 1052 & 31.15 & 59.47 & 1.91 & 9108.94 & 3 & & \\ \cline{3-10}  & & Young & 624 & 19.26 & 39.15 & 2.03 & 4650.09 & 2 & \multirow{4}{*}{16,729} & \multirow{4}{*}{118,73} \\ \cline{3-10}  & & Old & 1361 & 33.48 & 57.49 & 1.72 & 12,078.9 & 3 & & \\ \cline{3-10}  & & **Hemophagic** & **154** & **33.6** & **56.45** & **1.68** & **1338.96** & 3 & \multirow{4}{*}{**16,847.73**} & \multirow{4}{*}{-} \\ \cline{3-10}  & & **Cerebral** & **655** & **36.66** & **47.68** & **1.3** & **5978.78** & 2 & & \\ \cline{3-10}  & & **TLA** & **425** & **9.31** & **19.95** & **2.14** & **2612.38** & 2 & & \\ \cline{3-10}  & & **Other** & **751** & **32.54** & **65.05** & **2** & **6636.92** & 2 & & \\ \hline \multirow{4}{*}{2 (Hemorrhagic)} & Gender & Male & 80 & 28.2 & 52.1 & 1.85 & 660.85 & 4 & \multirow{4}{*}{1332.41} & \multirow{4}{*}{6.55} \\ \cline{3-10}  & & Female & 74 & 39.45 & 60.25 & 1.53 & 671.56 & 2 & & \\ \cline{3-10}  & & **Young** & **50** & **24.56** & **55.12** & **2.24** & **370.13** & 4 & & \\ \cline{3-10}  & & **Old** & **37.95** & **56.36** & **1.49** & **594.63** & 2 & & \\ \hline \multirow{4}{*}{3 (Cerebral)} & Gender & Male & 302 & 33.71 & 49.88 & 1.48 & 2694.19 & 2 & \multirow{4}{*}{5981.96} & \multirow{4}{*}{-3.18} \\ \cline{3-10}  & & Female & 353 & 39.19 & 45.55 & 1.16 & 3287.78 & 2 & & \\ \cline{3-10}  & & **Young** & **194** & **24.07** & **42.45** & **1.76** & **1586.02** & 2 & & \\ \cline{3-10}  & & **Old** & **461** & **41.96** & **48.79** & **1.16** & **4363.16** & 2 & & \\ \hline \multirow{4}{*}{4 (TLA)} & Gender & Male & 207 & 8.7 & 22.68 & 2.61 & 1229.17 & 2 & & \\ \cline{3-10}  & & Female & 218 & 9.89 & 16.94 & 1.71 & 1390.47 & 2 & & \\ \cline{3-10}  & & **Young** & **176** & **5.84** & **11.16** & **1.91** & **924.58** & 2 & & \\ \cline{3-10}  & & **Old** & **249** & **11.77** & **24.02** & **2.04** & **1668.48** & 2 & & \\ \hline \multirow{4}{*}{5 (Other strokes)} & Gender & Male & 344 & 30.74 & 43.41 & 1.41 & 3014.02 & 2 & & \\ \cline{3-10}  & & Female & 407 & 34.07 & 78.8 & 2.31 & 3631.25 & 2 & & \\ \cline{3-10}  & & **Young** & **204** & **24.96** & **43.76** & **1.75** & **1662.38** & 2 & & \\ \cline{3-10}  & & **Old** & **547** & **35.37** & **71.17** & **2.01** & **4949.57** & 2 & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Phase-type survival tree construction using the WIC-based splitting criteria (nodes and possible splits).