predict.bs              package:splines              R Documentation

_E_v_a_l_u_a_t_e _a _S_p_l_i_n_e _B_a_s_i_s

_D_e_s_c_r_i_p_t_i_o_n:

     Evaluate a predefined spline basis at given values.

_U_s_a_g_e:

     ## S3 method for class 'bs':
     predict(object, newx, ...)

_A_r_g_u_m_e_n_t_s:

  object: the result of a call to 'bs' or 'ns' having attributes
          describing 'knots', 'degree', etc.

    newx: the 'x' values at which evaluations are required.

     ...: Optional additional arguments.  Presently no additional
          arguments are used.

_V_a_l_u_e:

     An object just like 'object', except evaluated at the new values
     of 'x'.

     These are methods for the generic function 'predict' for objects
     inheriting from classes '"bs"' or '"ns"'.  See 'predict' for the
     general behavior of this function.

_S_e_e _A_l_s_o:

     'bs', 'ns', 'poly'.

_E_x_a_m_p_l_e_s:

     basis <- ns(women$height, df = 5)
     newX <- seq(58, 72, len = 51)
     # evaluate the basis at the new data
     predict(basis, newX)

