Description Usage Arguments Details Value References Examples
Simulate data from the model proposed in Fine and Gray (1999) for two causes. Cause 1 is assumed to be of primary importance.
1 2 | simulateTwoCauseFineGrayModel(nobs, beta1, beta2, X = NULL, u.min = 0,
u.max, p = 0.5, returnX = FALSE)
|
nobs |
Integer: Number of observations in simulated dataset. |
beta1 |
A vector of effect sizes for cause 1 of length ncovs |
beta2 |
A vector of effect sizes for cause 2 of length ncovs |
X |
A matrix of fixed covariates (nobs x ncovs). If |
u.min |
Numeric: controls lower bound of censoring distribution where C ~ U(u.min, u.max) |
u.max |
Numeric: controls upper bound of censoring distribution where C ~ U(u.min, u.max) |
p |
Numeric: value between 0 and 1 which controls the mixture probability. |
returnX |
Logical: Whether to return |
The function simulates data according to the setup by Fine and Gray (1999). See their paper for more information.
Returns a list with ftime
, fstatus
, X
.
Fine J. and Gray R. (1999) A proportional hazards model for the subdistribution of a competing risk. JASA 94:496-509.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.