rsurv                 package:ipred                 R Documentation

_S_i_m_u_l_a_t_e _S_u_r_v_i_v_a_l _D_a_t_a

_D_e_s_c_r_i_p_t_i_o_n:

     Simulation Setup for Survival Data.

_U_s_a_g_e:

     rsurv(N, model=c("A", "B", "C", "D", "tree"), gamma=NULL, fact=1, pnon=10,
           gethaz=FALSE)

_A_r_g_u_m_e_n_t_s:

       N: number of observations. 

   model: type of model. 

   gamma: simulate censoring time as runif(N, 0, gamma). Defaults to
          'NULL' (no censoring).

    fact: scale parameter for 'model=tree'.

    pnon: number of additional non-informative variables for the tree
          model.

  gethaz: logical, indicating wheather the hazard rate for each 
          observation should be returned.

_D_e_t_a_i_l_s:

     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. (2002). See Hothorn et al. (2003) for the
     details.

_V_a_l_u_e:

     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.

_R_e_f_e_r_e_n_c_e_s:

     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.

_E_x_a_m_p_l_e_s:

     # 3*X1 + X2
     simdat <- rsurv(500, model="C")
     coxph(Surv(time, cens) ~ ., data=simdat)

