mono.con                package:mgcv                R Documentation

_M_o_n_o_t_o_n_i_c_i_t_y _c_o_n_s_t_r_a_i_n_t_s _f_o_r _a _c_u_b_i_c _r_e_g_r_e_s_s_i_o_n _s_p_l_i_n_e

_D_e_s_c_r_i_p_t_i_o_n:

     Finds linear constraints sufficient for monotonicity (and
     optionally upper and/or lower boundedness) of a cubic regression
     spline. The basis representation assumed is that given by the
     'gam', '"cr"' basis: that is the spline has a set of knots, which
     have fixed x values, but the y values of which constitute the
     parameters of the spline.

_U_s_a_g_e:

     mono.con(x,up=TRUE,lower=NA,upper=NA)

_A_r_g_u_m_e_n_t_s:

       x: The array of knot locations.

      up: If 'TRUE' then the constraints imply increase, if 'FALSE'
          then decrease. 

   lower: This specifies the lower bound on the spline unless it is
          'NA' in which case no lower bound is imposed.

   upper: This specifies the upper bound on the spline unless it is
          'NA' in which case no upper bound is imposed.

_D_e_t_a_i_l_s:

     Consider the natural cubic spline passing through the points:
     (x_i,p_i), i=1..n. Then it is possible to find a relatively small
     set of linear constraints on p sufficient to ensure monotonicity
     (and bounds if required): Ap>=b. Details are given in Wood (1994).
     This function returns a list containing 'A' and 'b'.

_V_a_l_u_e:

     The function returns a list containing constraint matrix 'A' and
     constraint vector 'b'.

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

     Gill, P.E., Murray, W. and Wright, M.H. (1981) Practical
     Optimization. Academic Press, London. 

     Wood, S.N. (1994) Monotonic smoothing splines fitted by cross
     validation SIAM Journal on Scientific Computing 15(5):1126-1133

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

_S_e_e _A_l_s_o:

     'mgcv ' 'pcls'

_E_x_a_m_p_l_e_s:

     ## see ?pcls

