Learn R Programming

mets (version 1.3.11)

rchazl: Multiple Cause Piecewise Constant Hazard Simulation

Description

Simulates data from multiple piecewise constant baseline hazards for competing risks. Takes the minimum of all cause-specific event times and assigns the corresponding cause.

Usage

rchazl(cumhaz, rr, causes = NULL, ...)

Value

A data frame with event times and status indicating the cause of the first event.

Arguments

cumhaz

List of cumulative hazard matrices, one for each cause.

rr

Matrix of relative risks (rows = subjects, columns = causes).

causes

Vector of cause codes to assign (default NULL, uses 1,2,...).

...

Additional arguments passed to rchaz.

Author

Thomas Scheike

See Also

rchaz