drqssbc                 package:cobs                 R Documentation

_R_e_g_r_e_s_s_i_o_n _Q_u_a_n_t_i_l_e _S_m_o_o_t_h_i_n_g _S_p_l_i_n_e _w_i_t_h _C_o_n_s_t_r_a_i_n_t_s

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

     Estimate the B-spline coefficients for a regression quantile
     _smoothing_ spline with optional constraints, using Ng(1996)'s
     algorithm.

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

     drqssbc(x, y, w= rep(1,n), pw, knots, degree, Tlambda, constraint,
             n.sub = n1000cut(nrq),
             equal, smaller, greater, gradient, coef, maxiter = 20 * n,
             trace = 1,
             n.equal = nrow(equal), n.smaller = nrow(smaller),
             n.greater = nrow(greater), n.gradient = nrow(gradient),
             nrq = length(x), nl1, neqc, niqc, nvar, nj0,
             tau = 0.5, lam, tmin, kmax, lstart, factor,
             eps = .Machine$double.eps, print.warn)

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

       x: numeric vector, sorted increasingly, the abscissa values

       y: numeric, same length as 'x', the observations.

       w: numeric vector of weights, same length as 'x', as in 'cobs'.

      pw: penalty weights vector passed to 'l1.design' or 'loo.design'.

   knots: ~~Describe 'knots' here~~ 

  degree: integer, must be 1 or 2.

 Tlambda: ~~Describe 'Tlambda' here~~ 

constraint: see 'cobs' (but cannot be abbreviated here).

   n.sub: integer, not larger than sample size 'n'; the default has
          'n.sub == n' as long as 'n' is less than 1000.

equal,smaller, greater: 3-column matrices specifying the respective
          constraints.  The has 0 zeros if there no constraints of the
          corresponding kind.

gradient: 3-column matrix for gradient constraints.

    coef: numeric vector, the initial guess for the B-spline
          coefficients.

 maxiter: upper bound of the number of iteration; default to 20*n.

   trace: ~~Describe 'trace' here~~ 

n.equal,n.smaller,n.greater,n.gradient: ~~Describe 'n.gradient' here~~ 

     nrq: ~~Describe 'nrq' here~~ 

     nl1: ~~Describe 'nl1' here~~ 

    neqc: integer giving the number of equations.

    niqc: integer giving the number of *i*ne*q*uality *c*onstraints.

    nvar: integer giving the number of equations _and_ constraints.

     nj0: ~~Describe 'nj0' here~~ 

     tau: desired quantile level; defaults to 0.5 (median).

     lam: ~~Describe 'lam' here~~ 

    tmin: ~~Describe 'tmin' here~~ 

    kmax: ~~Describe 'kmax' here~~ 

  lstart: number, see 'cobs.'

  factor: number in [1,4], see 'cobs'.

     eps: tolerance used in the fortran code in many different
          contexts.

print.warn: logical indicating if warnings should be printed, when the
          algorithm seems to have behaved somewhat unexpectedly.

_D_e_t_a_i_l_s:

     This is an auxiliary function for 'cobs', possibly interesting on
     its own.  This documentation is currently sparse; read the source
     code!

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

     a list with components 

  comp1 : Description of `comp1'

  comp2 : Description of `comp2'

     ...

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

     Pin Ng; this help page: Martin Maechler.

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

     Ng, P. (1996) An Algorithm for Quantile Smoothing Splines,
     _Computational Statistics & Data Analysis_ *22*, 99-118.

_S_e_e _A_l_s_o:

     the main function 'cobs' and its auxiliary 'qbsks' which calls
     'drqssbc()' repeatedly.

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

     set.seed(1243)
     x  <- 1:32
     fx <- (x-5)*(x-15)^2*(x-21)
     y  <- fx + round(rnorm(x,s = 0.25),2)
     ## FAILS  drqssbc(x,y,nrq=32,lam=1,degree=1,knots=c(1,5,15,32))

