Skip to contents

Generates event times for multiple competing risks under a discrete-time hazard specification.

Usage

prob_n(x, betat, betav, N, p, Tmax, nCause, unif = TRUE)

Arguments

x

Covariate matrix (\(N \times p\)).

betat

Time-related parameters.

betav

Covariate-related parameters.

N

Number of individuals.

p

Number of covariates.

Tmax

Maximum number of discrete time points.

nCause

Number of competing risks.

unif

Logical; if TRUE, the last column is sampled uniformly, otherwise from a logistic model.

Value

A numeric matrix of dimension \(N \times (nCause+1)\) where each entry is the simulated event time (or censoring time) for a given individual and risk.