Learn R Programming

quantreg.nonpar (version 1.0)

dpoly: 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. x can also be a matrix. Missing values are not allowed in x.
...
further vectors.
degree
the degree of the polynomial. Must be less than the number of unique points if raw = TRUE.
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").

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.

See Also

poly, ddpoly