**4. Time-to-response bias as a counting process mult state model**

#### **4.1 Mathematical formulation**

In this section we analyse the WPB violation data and investigate the times to the third violation given times to second violation for both poor trackers and good trackers where tracking status is defined by WPB diagnostics. The process can be thought to have three states. State 1 corresponds to less than two violations, state 2 means two violations and if a patient is in state 3 then three violations have occurred. This is a sequential three state process shown schematically in **Figure 17**. Events of interest are a transition from state 2 to state 3, i.e. the occurrence of a third violation.

Time one is the patient's entry time into state 2 and time two is the patients exit time from state 2 (i.e., entry time to state 3, so-called 'death'state). Time one is the patient's entry time into state 2 and time two is the patient's exit time from state 2 (i.e., entry time to state 3, so-called 'death'state).

In the case of multiple events of interest, the process can be treated as a Markov chain. Let Nij (t) be the process counting the number of observed transitions from state i to state j in the interval [0, t]. The transition intensity from state i to state j at time t is then λij (t) and gives the instantaneous risk of transition from state i to j.

Nij (t) has intensity process of the form λij(t)Ni(t) where Yi(t) is the number of individuals in state i just before time t. This is the setup of Simon and Makuch [37] who considered 4 states and two transitions of interest.

*Modelling Agitation-Sedation (A-S) in ICU: An Empirical Transition and Time to Event… DOI: http://dx.doi.org/10.5772/intechopen.105480*

#### **Figure 13.**

*Probability of being in each state as time progresses given start state 0. Top is good trackers; bottom is poor trackers according to Chase et al. [14].*

The concept of time in our ICU application represents time on-study (i.e. time at ICU) rather than calendar time. In the case of our 3 state process (**Figure 8**) the hazard functions of the two transitions of interest are λ13(t) and λ23(t) and the number of individuals in the states just before t are N1(t) and N2 (t), respectively. A chi squared test is conducted to test for independence between response and nonresponse as in the development formulated in [37].

This same test can be conducted to assess the association between strata and hazard rate. If λ23(0)(t) is the hazard rate (from state 2 to 3) for the good trackers and λ23(1) is the hazard rate (from state 2 to 3) for the poor tackers. Since the focus here is to test the effect of response (prior 2nd violation) on the hazard function, the null hypothesis of interest is H0: λ23(0) (t) = λ23(1). The hypothesis is tested via a log-rank type test following [37] which tests for the time-to-response bias. Now the equivalent of **Table 2** in Simon and Makuch [37] can be constructed for both the good trackers and the poor trackers. Let N1(t) be the number of patients in state 1 at time t, and let N2 (t) denote the number of patients in state 2 at time t in **Table 13**.

**Table 13** presents the WPB data as state-specific patient counts for each event time t. *Events are a transition from state 2 to state 3,* i.e. the occurrence of the event of interest i.e. a third violation. Time represents time to third violation (so-called end-state/death in terms of a counting process). Note that dij (t) are the so-called end-state "deaths" i.e., third violations. The hazard function for transfers between states i and j at time t is denoted by λi j (t) and here time represents time on study at ICU. Also Tij denotes

#### **Figure 14.**

*Probability of being in each state as time progresses given start state 0. Top is good trackers; bottom is poor trackers according to Rudge et al. [11].*

#### **Figure 15.**

*Transition probability profiles for patients with ICU time* ≤ *64. Top panel are the WPB good trackers, and bottom panel the poor trackers.*

*Modelling Agitation-Sedation (A-S) in ICU: An Empirical Transition and Time to Event… DOI: http://dx.doi.org/10.5772/intechopen.105480*

#### **Figure 16.**

*Transition probability profiles for patients with ICU time > 64. Top panel are the WPB good trackers, and bottom panel the poor trackers.*

the set of times at which a transition from state i to state j occurs and Ni(t) is the number of patients in state i just before time t, or in other words, Ni(t) is the number of patients at risk of a transfer out of state i at time t. (Note our Ni (t) is equivalent to Yi(t) in the Aalen's notation). The symbol λij (t) denotes the intensity, or hazard function, for a transfer from state i to state j at time t.

Mathematically the cumulative hazard function is conventionally estimated instead of the hazard function λ(t), as the latter is difficult to estimate. The cumulative hazard function and survival function is then given as,

$$\hat{A}\_{\vec{\eta}}(\mathbf{x},t) = \sum -\log\left(\mathbf{1} - d\_{\vec{\eta}}(\mathbf{u})/N\_i(\mathbf{u})\right)$$

$$\hat{S}\_{\vec{\eta}}(\mathbf{x},t) = \prod \left(\mathbf{1} - d\_{\vec{\eta}}(\mathbf{u})/N\_i(\mathbf{u})\right)$$

$$= \exp\left(-\hat{A}\_{\vec{\eta}}(\mathbf{x},t)\right)$$

Note that dij(u) above are the so-called end-state "deaths" i.e., third violations, the number of transitions from state i to state j in time interval [x, t]. The estimated survival and cumulative hazard curves are shown as in **Figure 18.**

Survival curves and cumulative hazard functions were calculated according to Simon and Makuch's method [37]. In essence, this counting process formulation keeps track of the number of patients in state 1 and 2 and event times (i.e., transitions into state 3). The survival package is used for estimation, where two times are used. Time

#### **Figure 17.**

*States of a patient's agitation (violations) defined by certain levels of violations or jumps outside of the patient's WPB bands - a 3 state process.*


**Table 13.** *Simon and Makuch's [37] represeantation and formulation of the WPB data.* *Modelling Agitation-Sedation (A-S) in ICU: An Empirical Transition and Time to Event… DOI: http://dx.doi.org/10.5772/intechopen.105480*

**Figure 18.**

*Survival function of time to 3rd violation given the 2nd violation for good tracker and poor (non-)trackers (LHS) and cumulative hazard functions (RHS).*

one is the patients entry time into state 2 and time two is the patients exit time from state 2 (i.e. entry time to state 3, 'death').

The log rank test for H0: λ23(0) (t) = λ23(1), based on the counting process which utilises the number of individuals in the states just before t, these are, N1(t) and N2 (t), was performed. Accordingly, it is shown that the good tracker and poor tracker hazard rates/ (survival curves) time to the 3rd violation, given a 2nd violation has occurred, are statistically significantly different (p-value = 0.044), see left hand side of **Figure 18**. Notably, the hazard rate for the poor trackers is 2.1 times that of good trackers, 95% confidence interval (CI) [1.01, 4.38].

Further interpretation of the hazard function can be made by assessing the slope of the cumulative hazard function. **Figure 18** (RHS), shows that the cumulative hazard increases faster for the poor trackers than the good trackers indicated by a much steeper slope. This suggests it takes less time for the poor trackers to reach their third violation than for the good trackers, this is also confirmed by the 95% confidence bands for the survival curves shown in **Figure 19** for the good tracker and poor trackers. Note that the interpretation of Kaplan–Meier curves here is not as straight-forward as for conventional survival analysis. In our ICU A-S process formulation the curves do not correspond to fixed cohorts, as patients can contribute to different states/curves at different times (**Table 13**). Thereby the curves may be

**Figure 19.** *Survival curves (95% CIs) for good (left) and poor (right) (non-)trackers.*

considered to represent hypothetical cohorts whose values remain constant after follow-up [38, 39].

A Cox proportional hazards model (CPHM) was then fitted with tracking status and a patient's number of violations as covariates. The general CPHM hazard function is,

$$\lambda(\mathbf{t}|X) = \lambda\_0 \exp\left(\beta\_1 X\_1 + \dots + \beta\_p X\_p\right) \tag{13}$$

In our application we model two covariates: X1 (0 for a good tracker, 1 for a poor tracker), and X2 being the patient's total number of violations in the CPHM. The log rank test associated with the CPHM confirmed that the good tracker and poor tracker hazard rates, and the survival curves were significantly different (p-value = 0.0496), with the hazard rate for the poor trackers being 2.1 times that of good trackers, with a 95% confidence interval of [1.01, 4.38]. The associated hazard rate for poor trackers is shown to be 1.87 times that of good trackers, with a 95% confidence interval [0.75, 4.70]. By inclusion of the total number of second time violations the effect of tracking status has only reduced slightly, and it remains significant (1.87 versus 2.1).

## **4.2 Asseement of times to different violation counts and patient's last jump**

Log-rank tests were likewise conducted to assess times to different violation counts. Let VX denote the violation times for the Xth violation and the DX's the associated event indicators (0 censored, 1 event of interest). Log rank tests for the two WPB tracking strata for selected violation times (X = 5, 10, 15, 20, 25, 30) showed significant differences between good and poor WPB trackers regarding the time to the patient's time to 10th violation (p = 0.027), their 15th (p = 0.025) and their 25th violation (p = 0.011). Likewise, significance at the 10% level was demonstrated for times to the patient's 5th, 20th and 30th violation (non-violatory lifetimes). All survival curves (not shown here) are significantly different or are close to being significant at the 5% level of significance. This confirms that the difference in time to violations between the good and poor trackers are consistently different, for these varying number of violations (VX, for X = 5, 10, 15, 20, 25, 30).

The time to a patient's last violation event was also investigated using log-rank tests and Kaplan–Meier curves. We examined nine levels of the effect of the following covariate, which categorises the counts the patient levels of violations as follows: 0–5 violations, 5–10, 10–15, 15–20, 20–25, 25–30, 30–40, 40–50 and >50 violations. A histogram of the time to a patient's last violation with boxplots of the times for each of these nine levels of categorisation shown is given in **Figure 20** (the number above the boxplots gives the number of patients in each of the nine categories).

Using the patient's time to their final violation/jump, as the event of interest, and implementing log-rank based tests using this covariate adjustment, the log rank test demonstrated a statistically significant difference between the survival curves of time to last violation (p-value <0.000001) across the above nine different total number of violation levels, {0–5, 5–10, 10–15, 15–20, 20–25, 25–30, 30–40, 40–50, >50 violations}.

Notably, the levels that most contribute to the difference between trackers and non-trackers are those patients who have a total number of violations between 10 and 15, between 20 and 25 and >50, in that order. A log rank test on time to last violation (time of last jump outside the WPB bands) as the outcome of interest by tracking

*Modelling Agitation-Sedation (A-S) in ICU: An Empirical Transition and Time to Event… DOI: http://dx.doi.org/10.5772/intechopen.105480*

#### **Figure 20.**

*Histogram and boxplots of time to last violation. The numbers above the boxplot (RHS) specify the number of patients in each violation level.*

#### **Figure 21.**

*Estimated survival curves for time to last violation by tracking status.*

status, also establishes that there is a difference between the two survival curves (p-value = 0.045) (**Figure 21**). Clearly the WPB-based poor trackers tend to take longer to reach their last violation than good trackers. Corresponding Kaplan–Meier estimated curves are given in **Figure 21**. We note that up to ICU time 64 (≤64), 40% of the good versus 70% of the poor trackers are still violating, whereas after time point, 130, the corresponding percentages violating are 15% versus 40%, of the good versus poor trackers (**Figure 21**).
