ddpoly: Compute Second Derivative of Orthogonal Polynomials

Description Usage Arguments Value Note Author(s) References See Also

Description

Returns or evaluates the second 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 second derivatives of raw polynomials.

Usage

1
ddpoly(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 derivatives) 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 ddpoly 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.

See Also

poly, dpoly


quantreg.nonpar documentation built on May 2, 2019, 5:40 a.m.