Repeated measurements of log(bilirubin) for the 12 patients in the cirrhosis study, in long format (Collett, 2023, Example 8.4).
Format
A data frame with 42 rows and 3 variables:
- patient
Patient number (1-12).
- time
Time of the measurement, in days from the start of treatment.
- lbr
Logarithm of the bilirubin level (in micromol/l) measured at
time.
Source
Collett, D. (2023) Modelling Survival Data in Medical Research, 4th ed. Chapman & Hall/CRC, Example 8.4 (Table 8.5).
Details
Patients return to the clinic three, six and twelve months after the start of treatment and yearly thereafter. Values for a given patient form a step function that is constant between two adjacent visits, with the new value taking effect immediately after the reading. This file is the input to the counting process version of the data, cirrhosis_cp; the baseline values are in cirrhosis.
Aliases
Used in Example 8.4, but the alias d8.4 is the baseline cirrhosis; this
long-format form has no alias of its own. See dataset_by_exercise for the
complete index.
Examples
# Collett (2023), Chapter 17 style -----------------------------------
# Example 8.4: the repeated log(bilirubin) measurements in long format
head(cirrhosis_lbr)
#> patient time lbr
#> 1 1 47 3.8
#> 2 1 184 4.9
#> 3 1 251 5.0
#> 4 2 94 2.9
#> 5 2 187 3.1
#> 6 2 321 3.2
# These are the measurements from which the time-dependent covariate lbrt
# in cirrhosis_cp is built: the value at each visit applies until the next.
merge(
cirrhosis[c("patient", "time", "status")],
cirrhosis_lbr,
by = "patient", suffixes = c("_surv", "_visit")
) |> head()
#> patient time_surv status time_visit lbr
#> 1 1 281 1 47 3.8
#> 2 1 281 1 184 4.9
#> 3 1 281 1 251 5.0
#> 4 2 604 0 94 2.9
#> 5 2 604 0 187 3.1
#> 6 2 604 0 321 3.2