Learn R Programming

quantreg.nonpar (version 1.0)

poly.wrap: Orthogonal Polynomial Wrapper

Description

A wrapper for poly, dpoly, and ddpoly.

Usage

poly.wrap(x, degree = 1, coefs = NULL, nderivs = 1, 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.
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.
nderivs
allowable values are 0, 1, and 2. If nderivs = 0, all other arguments are passed to poly. If nderivs = 1, all other arguments are passed to dpoly. If nderivs = 2, all other arguments are passed to ddpoly.
raw
if true, use raw and not orthogonal polynomials.

Value

poly.wrap returns the value returned by poly, dpoly, or ddpoly, depending on the value of nderivs.

See Also

poly, dpoly, ddpoly