pspline               package:survival               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 derivative. 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, method, ...)

_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' 

  method: Method for automatic choice of 'theta'

     ...: 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:

     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

