place.knots               package:mgcv               R Documentation

_A_u_t_o_m_a_t_i_c_a_l_l_y _p_l_a_c_e _a _s_e_t _o_f _k_n_o_t_s _e_v_e_n_l_y _t_h_r_o_u_g_h _c_o_v_a_r_i_a_t_e _v_a_l_u_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Given a univariate array of covariate values, places a set of
     knots for a regression spline evenly through the  covariate
     values.

_U_s_a_g_e:

      place.knots(x,nk)

_A_r_g_u_m_e_n_t_s:

       x: array of covariate values (need not be sorted).

      nk: integer indicating the required number of knots.

_D_e_t_a_i_l_s:

     Places knots evenly throughout a set of covariates. For example,
     if you had 11 covariate values and wanted 6 knots  then a knot
     would be placed at the first (sorted) covariate value and every
     second (sorted) value thereafter. With  less convenient numbers of
     data and knots the knots are placed within intervals between data
     in order to achieve  even coverage, where even means having
     approximately the same number of data between each pair of knots.

_V_a_l_u_e:

     An array of knot locations.

_A_u_t_h_o_r(_s):

     Simon N. Wood simon.wood@r-project.org

_R_e_f_e_r_e_n_c_e_s:

     <URL: http://www.maths.bath.ac.uk/~sw283/>

_S_e_e _A_l_s_o:

     'smooth.construct.cc.smooth.spec'

_E_x_a_m_p_l_e_s:

     x<-runif(30)
     place.knots(x,7)
     rm(x)

