leg {MCMCglmm} | R Documentation |
Evaluates orthogonal Legendre polynomials of degree 1 to degree
over the specified set of points x
leg(x, degree, normalized=TRUE)
x |
a numeric vector at which to evaluate the polynomial |
degree |
the degree of the polynomial. If negative, degree 0 is not evaluated |
normalized |
logical: shoudlthe polynomial be normalised |
Please refer to legendre.polynomials
in the package orthopolynom for more detils.
Matrix of evaluated polynomials
Jarrod Hadfield j.hadfield@ed.ac.uk
x<-rnorm(30) model.matrix(~leg(x,2)-1)