ps                 package:DPpackage                 R Documentation

_S_p_e_c_i_f_y _a _s_m_o_o_t_h_i_n_g _s_p_l_i_n_e _f_i_t _i_n _a _P_S_g_a_m _f_o_r_m_u_l_a

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

     A symbolic wrapper to indicate a smooth term in a formula argument
     to PSgam

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

     ps(..., k=50,degree=3,pord=1)

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

     ...: the predictors.

       k: an integer giving the number of intervals for B-splines.

  degree: an integer giving the degree of the B-splines.

    pord: an integer giving the order of difference penalty.

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

     'ps' returns the vectors of predictors, endowed with a number of
     attributes. The vector itself is used in the construction of the
     model matrix.

     Note that 'ps' does not do the smoothing; it simply sets things up
     for 'PSgam'.

_A_u_t_h_o_r(_s):

     Alejandro Jara <Alejandro.JaraVallejos@med.kuleuven.be>

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

     Eilers, P.H.C. and Marx, B.D. (1996) Flexible Smoothing with
     B-splines and  penalties. Statistical Science, 11(2): 89-121.

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

        # fit Start using a smoothing spline with 4 df.
          y ~ Age + s(Start, degree=4)
        # fit log(Start) using a smoothing spline with 5 df.
          y ~ Age + s(log(Start), degree=5)

