readmission_prep: Prepare the colorectal cancer readmission data for wnpmle...

View source: R/readmission_prep.R

readmission_prepR Documentation

Prepare the colorectal cancer readmission data for wnpmle analysis

Description

Reads the hospital readmission data of 403 colorectal cancer patients (Gonzalez et al., 2005), shipped with wnpmle as a copy of the readmission data from the frailtypack package, and converts them to the format used by wnpmle_fit: one row per readmission (status 1), plus a final row for death (status 2) or censoring (status 0) unless the follow-up of a surviving patient ends with a readmission.

Usage

readmission_prep(tau = NULL)

Arguments

tau

Optional end of follow-up (days). If given, readmissions after tau are removed and patients still under observation at tau (including deaths after tau) are censored at tau. Default NULL: full follow-up.

Details

The data contain 403 patients with 458 readmissions and 109 deaths. All covariates are taken at baseline (the first record of each patient), as required by the marginal rate model with external covariates; the Charlson index recorded later in follow-up is not used. This is the data set analysed in Bellach and Kosorok (2026).

Value

A data frame with columns:

id

Patient identifier.

time

Days since surgery of the readmission, death or censoring.

status

0 = censored, 1 = readmission (recurrent event), 2 = death (terminal event).

chemo

Chemotherapy: factor with levels "NonTreated", "Treated".

sex

Factor with levels "Male", "Female".

dukes

Dukes' tumour stage: factor with levels "A-B", "C", "D".

charlson

Charlson comorbidity index at baseline: factor with levels "0", "1-2", "3".

Source

Copy of the readmission data from the frailtypack package (Rondeau et al.; GPL (>= 2)).

References

Gonzalez, J.R., Fernandez, E., Moreno, V., Ribes, J., Peris, M., Navarro, M., Cambray, M. and Borras, J.M. (2005). Sex differences in hospital readmission among colorectal cancer patients. Journal of Epidemiology and Community Health, 59(6), 506-511. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1136/jech.2004.028902")}

Examples

rdata <- readmission_prep()
head(rdata)
table(rdata$status)
table(readmission_prep(tau = 1460)$status)


wnpmle documentation built on Dec. 1, 2026, 9:06 a.m.