ABSTRACT

FIGURE 7.1: Observed longitudinal trajectories for Patients 2 and 25 from the PBC dataset.

longitudinal log serum bilirubin measurements, we assume the model

yi(t) = mi(t) + "i(t)

= (0 + bi0) + (k + bik) >B(t; 4; 4) + "i(t);

where B(t; df; q) denotes a B-spline basis matrix for q 1 degree splines with dfq+1 internal knots placed at the corresponding percentiles of the follow-up times, and k and bik denote the vectors of xed and random eects corresponding to the B-spines matrix. For the survival process we assume that the risk for the composite event (death or transplantation) depends on treatment, abnormal prothrombin time and the true level of log serum bilirubin, i.e.,

hi(t) = h0(t) expf 1D-pnci + 2ProtTimei + mi(t)g;

where ProtTime denotes a dummy variable taking the value 1 when the prothrombin time at baseline was outside the normal range of [10 sec, 13 sec]. The baseline hazard is assumed piecewise-constant. We start by tting the corresponding joint model using the same syntax:

The rst part of the code constructs the factor variable denoting whether the prothrombin time at baseline was within the normal range. Function bs() from package splines automatically constructs the required B-spline basis matrix. Its second argument corresponds to the degrees of freedom, and argument Boundary.knots is used to ensure that the boundary knots of the B-spline basis extend to the combined range of the follow-up times ftij ; i = 1; : : : ; n; j = 1; : : : ; nig and the observed event times fTi; i = 1; : : : ; ng.