GenCRData: Generate Competing Risks Data

View source: R/gen_data.R

GenCRDataR Documentation

Generate Competing Risks Data

Description

Generate Competing Risks Data

Usage

GenCRData(
  base_death_rate = 0.25,
  beta_death = NULL,
  base_event_rate = 1,
  beta_event = NULL,
  censoring_rate = 0.25,
  covariates = NULL,
  frailty_variance = 0,
  min_death_rate = 0,
  min_event_rate = 0.05,
  n = 100,
  simple = TRUE,
  tau = 4
)

Arguments

base_death_rate

Baseline arrival for for death (the competing risk).

beta_death

Numeric vector of log rate ratios for the death rate.

base_event_rate

Baseline arrival rate for events.

beta_event

Numeric vector of log rate ratios for the event rate.

censoring_rate

Arrival rate for the censoring time.

covariates

Numeric design matrix.

frailty_variance

Variance of the gamma frailty.

min_death_rate

Minimum subject-specific event rate. Must be non-negative.

min_event_rate

Minimum subject-specific event rate. Must be positive.

n

Number of subjects. Overwritten by nrow(covariates) if covariates are provided.

simple

Return only the index, time, and status? If FALSE, returns additional data.

tau

Truncation time.

Value

Data.frame.


zrmacc/SurvUtils documentation built on Sept. 28, 2024, 8:43 a.m.