qbsks: Quantile B-Spline with Fixed Knots In cobs99: Constrained B-splines -- outdated 1999 version

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

 1 2 3 4 5 6 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 numeric vector of knots of which nknots will be used. nknots number of knots to be used.
 degree integer specifying polynomial degree; must be 1 or 2. Tlambda (vector of) smoothing parameter(s) λ, see drqssbc. constraint string (or empty) specifying the global constraints; see cobs. 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,gradient optional constraint specifications; simply passed to drqssbc. coef,maxiter,trace simply passed to drqssbc. n.equal, n.smaller, n.greater, n.gradient simply passed to drqssbc. nrq,nl1,neqc integers specifying dimensionalities, directly passed to drqssbc, see there. nj0 passed to drqssbc, see there. tau desired quantile level (in interval (0,1)). lam,tmin,kmax,lstart passed to drqssbc, see there. ks (seems unused) mk.flag logical; if true, perform first step knots selection. knots.add logical, see cobs. ic information criterion to use, see cobs. print.mesg an integer indicating how qbsks2() should print message about its current stages. factor passed to drqssbc, see there. 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.

Details

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

Value

a list with components

 coef .. fidel .. k dimensionality of model fit. ifl integer “flag”; the return code. icyc integer of length 2, see cobs. knots the vector of inner knots. nknots the number of inner knots. nvar the number of “variables”, i.e. unknowns including constraints. lambda the penalty factor, chosen or given. pseudo.x the pseudo design matrix X, as returned from drqssbc.

Author(s)

Pin Ng; this help page: Martin Maechler.

References

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

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

cobs99 documentation built on May 31, 2017, 4:39 a.m.