bladder_prep: Prepare bladder cancer data for wnpmle analysis

View source: R/bladder_prep.R

bladder_prepR Documentation

Prepare bladder cancer data for wnpmle analysis

Description

Prepares the bladder1 dataset from the survival package for use with wnpmle_fit. Subjects randomised to pyridoxine are excluded (only placebo and thiotepa arms are retained). Status codes are recoded to 0 (censored), 1 (recurrent tumour), 2 (terminal/dropout), and event times beyond tau are truncated to tau.

Usage

bladder_prep(tau = 59)

Arguments

tau

Follow-up truncation time (default: 59 months). Event times beyond tau are set to tau.

Details

The bladder cancer trial (Veterans Administration Cooperative Urological Research Group) randomised patients to placebo, pyridoxine, or thiotepa. Only the placebo and thiotepa arms are used here (pyridoxine arm excluded). Subjects with event times equal to tau and status 0 have their times truncated to tau, consistent with administrative censoring.

Value

A data frame with columns:

id

Subject identifier (integer).

status

Event status: 0 = censored, 1 = recurrent event, 2 = terminal event.

status0

Indicator: 1 if censored.

status1

Indicator: 1 if recurrent event.

status2

Indicator: 1 if terminal event.

time

Event time (months).

treat

Treatment indicator: 1 = thiotepa, 0 = placebo.

num

Initial number of tumours.

size

Initial tumour size (cm).

References

Byar, D.P. (1980). The Veterans Administration study of chemoprophylaxis for recurrent stage I bladder tumors. In Bladder Tumors and Other Topics in Urological Oncology, 363-370. Plenum, New York.

Examples

bdata <- bladder_prep(tau = 59)
head(bdata)
table(bdata$status)


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