Learn R Programming

cobs (version 0.9-5)

qbsks: Quantile B-Spline with Fixed Knots

Description

Compute B-spline coefficients for regression quantile B-spline with stepwise knots selection and quantile B-spline with fixed knots regression spline, using Ng (1996)'s algorithm.

Usage

qbsks(x,y,w,pw, knots,nknots, degree,Tlambda, constraint,
      n.sub = n1000cut(n), equal,smaller, greater,gradient, coef,maxiter,
      trace, n.equal,n.smaller,n.greater,n.gradient,
      nrq,nl1, neqc, nj0, tau,lam,tmin,kmax,lstart,
      ks,mk.flag, knots.add, ic, print.mesg,
      factor, tol.kn = 1e-6, eps = .Machine$double.eps, print.warn)

Arguments

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 ... ...
knots
~~Describe knots here~~
nknots
~~Describe nknots here~~
degree
integer specifying polynomial degree; must be 1 or 2.
Tlambda
~~Describe Tlambda here~~
constraint
~~Describe constraint 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
~~Describe equal here~~
smaller
~~Describe smaller here~~
greater
~~Describe greater here~~
gradient
~~Describe gradient here~~
coef
~~Describe coef here~~
maxiter
~~Describe maxiter here~~
trace
~~Describe trace here~~
n.equal
~~Describe n.equal here~~
n.smaller
~~Describe n.smaller here~~
n.greater
~~Describe n.greater here~~
n.gradient
~~Describe n.gradient here~~
nrq
~~Describe nrq here~~
nl1
~~Describe nl1 here~~
neqc
~~Describe neqc here~~
nj0
~~Describe nj0 here~~
tau
~~Describe tau here~~
lam
~~Describe lam here~~
tmin
~~Describe tmin here~~
kmax
~~Describe kmax here~~
lstart
~~Describe lstart here~~
ks
~~Describe ks here~~
mk.flag
~~Describe mk.flag here~~
knots.add
~~Describe knots.add here~~
ic
~~Describe ic here~~
print.mesg
~~Describe print.mesg here~~
factor
~~Describe factor here~~
tol.kn
``tolerance'' for shifting the outer knots.
eps
tolerance passed to drqssbc.
print.warn
flag indicating if and how much warnings and information is to be printed; currently just passed to drqssbc.

Value

  • a list with components
  • coef..
  • fidel..
  • kdimensionality of model fit.
  • iflinteger ``flag''; the return code.
  • icycinteger of length 2, see cobs.
  • knotsthe vector of inner knots.
  • nknotsthe number of inner knots.
  • nvarthe number of ``variables'', i.e. unknowns including constraints.
  • lambdathe penalty factor, chosen or given.
  • pseudo.xthe pseudo design matrix $X$, as returned from drqssbc.

Details

This is an auxiliary function for cobs(*, lambda = 0), possibly interesting on its own. This documentation is currently sparse; read the source code!

References

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

See Also

the main function cobs; further drqssbc which is called from qbsks().