pwe_data: Piece-wise Exponentail Example Data

pwe_dataR Documentation

Piece-wise Exponentail Example Data

Description

This is a simulated clinical data with piece-wise exponential distributed endpoint.

Usage

pwe_data
       data(pwe_data, package="PwePred")

Format

ID: id
randT: the randomization time for each subject
eventT: the event time
dropT: the drop-out time
censor_reason: If a subject is censored, censor_reason shows the type of censoring (i.e., drop_out, death)
event: indicates whether the primary event occurred at the end of follow-up with $0$ for censoring and $1$ for occurrence of event
followT: the follow-up time, which is the minimum value of eventT, dropT. In real-world datasets, this is the observation time
followT_abs: the sum of randT and followT

Note

Here we utilize the simdata function to create a simple example dataset with the following characteristics:

  • randomization rate is defined as 20 subjects per month (rand_rate = 20), and total sample size is 1000 (total_sample = 1000);

  • the primary endpoint (event) follows a PWE distribution with monthly hazard rates of 0.1 for t < 5 months, 0.01 for 5 <= t < 14 months, 0.2 for t >= 14 months (defined by myevent_dist function);

  • the drop-out follows an exponential distribution with a drop-out probability of 3%/month (drop_rate = 0.03) (equivalently, a monthly drop-out hazard rate is -log(1-0.03)=0.0304);

  • the add_column argument requests additional variables to be included in the dataset.

set.seed(1818)

myevent_dist <- function(n)rpwexpm(n, rate = c(0.1, 0.01, 0.2), breakpoint = c(5,14))

pwe_data <- simdata(rand_rate = 20, total_sample = 1000, drop_rate = 0.03, advanced_dist = list(event_dist = myevent_dist), add_column = c('censor_reason', 'event', 'followT', 'followT_abs'))


PwePred documentation built on March 24, 2026, 9:08 a.m.