| gen_competing_risks | R Documentation |
Generate Data for Competing Risks Analysis
gen_competing_risks(
pdf1,
cdf1,
pdf2,
cdf2,
lower = 0,
upper = Inf,
n,
censoring_type = c("type1_hybrid", "type2_hybrid", "prog_hybrid"),
r = NULL,
T_star = NULL,
R_plan = NULL,
seed = NULL
)
pdf1 |
Density function for Cause 1. |
cdf1 |
Cumulative distribution function for Cause 1. |
pdf2 |
Density function for Cause 2. |
cdf2 |
Cumulative distribution function for Cause 2. |
lower |
Lower bound of support. |
upper |
Upper bound of support. |
n |
Total sample size. |
censoring_type |
Type of censoring ("type1_hybrid", "type2_hybrid", "prog_hybrid"). |
r |
Number of failures required. |
T_star |
Time limit. |
R_plan |
Progressive plan (if applicable). |
seed |
Optional random seed. |
A list containing observed failure times, causes of failure (1 or 2), and censoring flags.
gen_competing_risks(
pdf1 = function(x) dexp(x, rate = 1),
cdf1 = function(x) pexp(x, rate = 1),
pdf2 = function(x) dexp(x, rate = 1.5),
cdf2 = function(x) pexp(x, rate = 1.5),
lower = 0, upper = 10, n = 25,
censoring_type = "type1_hybrid",
r = 15, T_star = 1.0, seed = 123
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.