drqssbc2 | R Documentation |
Estimate the B-spline coefficients for a regression quantile smoothing spline with optional constraints, using Ng(1996)'s algorithm.
drqssbc2(x, y, w = rep.int(1,n), pw, knots, degree, Tlambda,
constraint, ptConstr, maxiter = 100, trace = 0,
nrq = length(x), nl1, neqc, niqc, nvar,
tau = 0.5, select.lambda, give.pseudo.x = FALSE,
rq.tol = 1e-8 * sc.y, tol.0res = 1e-6,
print.warn = TRUE, rq.print.warn = FALSE)
x |
numeric vector, sorted increasingly, the abscissa values |
y |
numeric, same length as |
w |
numeric vector of weights, same length as |
pw |
penalty weights vector passed to |
knots |
numeric vector of knots for the splines. |
degree |
integer, must be 1 or 2. |
Tlambda |
vector of smoothing parameter values |
constraint |
see |
ptConstr |
|
maxiter |
maximal number of iterations; defaults to 100. |
trace |
integer or logical indicating the tracing level of the underlying algorithms; not much implemented (due to lack of trace in quantreg ...) |
nrq |
integer, |
nl1 |
integer, number of observations in the l1 norm that correspond to roughness measure (may be zero). |
neqc |
integer giving the number of equations. |
niqc |
integer giving the number of inequality
constraints; of the same length as |
nvar |
integer giving the number of equations and constraints. |
tau |
desired quantile level; defaults to 0.5 (median). |
select.lambda |
logical indicating if an optimal lambda should be
selected from the vector of |
give.pseudo.x |
logical indicating if the pseudo design matrix
|
rq.tol |
numeric convergence tolerance for the interior point
algorithm called from |
tol.0res |
tolerance used to check for zero residuals, i.e.,
|
print.warn |
logical indicating if warnings should be printed, when the algorithm seems to have behaved somewhat unexpectedly. |
rq.print.warn |
logical indicating if warnings should be printed
from inside the |
This is an auxiliary function for cobs
, possibly
interesting on its own. Depending on degree
, either
l1.design2
or loo.design2
are
called for construction of the sparse design matrix.
Subsequently, either rq.fit.sfnc
or
rq.fit.sfn
is called as the main “work horse”.
This documentation is currently sparse; read the source code!
a list with components
comp1 |
Description of ‘comp1’ |
comp2 |
Description of ‘comp2’ |
...
Pin Ng; this help page: Martin Maechler.
Ng, P. (1996) An Algorithm for Quantile Smoothing Splines, Computational Statistics & Data Analysis 22, 99–118.
The main function cobs
and its auxiliary
qbsks2
which calls drqssbc2()
repeatedly.
l1.design2
and loo.design2
;
further rq.fit.sfnc
and
rq.fit.sfn
from package quantreg.
set.seed(1243)
x <- 1:32
fx <- (x-5)*(x-15)^2*(x-21)
y <- fx + round(rnorm(x,s = 0.25),2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.