dpoly {quantreg.nonpar} | R Documentation |
Compute Derivative of Orthogonal Polynomials
Description
Returns or evaluates the first derivatives of orthogonal polynomials of degree 1 to degree
over the specified set of points x
: the polynomials are all orthogonal to the constant polynomial of degree 0. Alternatively, evaluates the first derivatives of raw polynomials.
Usage
dpoly(x, ..., degree = 1, coefs = NULL, raw = FALSE)
Arguments
x |
a numeric vector at which to evaluate the polynomial. |
... |
further vectors. |
degree |
the degree of the polynomial. Must be less than the number of unique points if |
coefs |
for prediction, coefficients from a previous fit. |
raw |
if true, use raw and not orthogonal polynomials. |
Value
A matrix with rows corresponding to points in x
and columns corresponding to the degree, with attributes "degree"
specifying the degrees of the columns (prior to taking the derivative) and (unless raw = TRUE
) "coefs"
which contains the centering and normalization constants used in constructing the orthogonal polynomials. The matrix has been given class c("poly","matrix")
.
Note
Both the code and the description of dpoly
borrow heavily from the poly
command in the stats
package.
Author(s)
Michael Lipsitz, Alexandre Belloni, Victor Chernozhukov, Ivan Fernandez-Val
References
Chambers, J.M. and Hastie, T.J. (1992) Statistical Models in S. Wadsworth & Brooks/Cole. Kennedy, W.J. Jr and Gentle, J.E. (1980) Statistical Computing. Marcel Dekker.