Simulate Survival Data
Simulation Setup for Survival Data.
rsurv(N, model=c("A", "B", "C", "D", "tree"), gamma=NULL, fact=1, pnon=10, gethaz=FALSE)
N |
number of observations. |
model |
type of model. |
gamma |
simulate censoring time as runif(N, 0, gamma). Defaults to
|
fact |
scale parameter for |
pnon |
number of additional non-informative variables for the tree model. |
gethaz |
logical, indicating wheather the hazard rate for each observation should be returned. |
Simulation setup similar to configurations used in LeBlanc and Crowley (1992) or Keles and Segal (2002) as well as a tree model used in Hothorn et al. (2004). See Hothorn et al. (2004) for the details.
A data frame with elements time
, cens
, X1
...
X5
. If pnon
> 0, additional noninformative covariables are
added. If gethaz=TRUE
, the hazard
attribute returns the hazard
rates.
M. LeBlanc and J. Crowley (1992), Relative Risk Trees for Censored Survival Data. Biometrics 48, 411–425.
S. Keles and M. R. Segal (2002), Residual-based tree-structured survival analysis. Statistics in Medicine, 21, 313–326.
Torsten Hothorn, Berthold Lausen, Axel Benner and Martin Radespiel-Troeger (2004), Bagging Survival Trees. Statistics in Medicine, 23(1), 77–91.
library("survival") # 3*X1 + X2 simdat <- rsurv(500, model="C") coxph(Surv(time, cens) ~ ., data=simdat)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.