

pspline(survival5)                           R Documentation

_P_e_n_a_l_i_s_e_d _s_m_o_o_t_h_i_n_g _s_p_l_i_n_e_s

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

     Specifies a penalised spline basis for the predictor.
     This is done by fitting a comparatively small set of
     splines and penalising the integrated second deriva-
     tive. Results are similar to smoothing splines with a
     knot at each data point but computationally simpler.

_U_s_a_g_e_:

     pspline(x, df=4, theta, nterm=2.5 * df, degree=3, eps=0.1, ...)

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

       x: predictor

      df: approximate degrees of freedom. `df=0' means use
          AIC

   theta: roughness penalty

   nterm: number of splines in the basis

  degree: degree of splines

     eps: accuracy for `df'

     ...: I don't know what this does

_V_a_l_u_e_:

     Object of class `coxph.penalty' containing the spline
     basis with attributes specifying control functions.

_S_e_e _A_l_s_o_:

     `coxph',`survreg',`ridge',`frailty'

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

     data(cancer)
     lfit6 <- survreg(Surv(time, status)~pspline(age, df=2), cancer)
     plot(cancer$age, predict(lfit6), xlab='Age', ylab="Spline prediction")
     title("Cancer Data")
     fit0 <- coxph(Surv(time, status) ~ ph.ecog + age, cancer)
     fit1 <- coxph(Surv(time, status) ~ ph.ecog + pspline(age,3), cancer)
     fit3 <- coxph(Surv(time, status) ~ ph.ecog + pspline(age,8), cancer)
     fit0
     fit1
     fit3

