leg {MCMCglmm}R Documentation

Evaluates Orthogonal Legendre Polynomials

Description

Evaluates orthogonal Legendre polynomials of degree 1 to degree over the specified set of points x

Usage

leg(x, degree, normalized=TRUE)

Arguments

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

Details

Please refer to legendre.polynomials in the package orthopolynom for more detils.

Value

Matrix of evaluated polynomials

Author(s)

Jarrod Hadfield j.hadfield@ed.ac.uk

See Also

legendre.polynomials

Examples

x<-rnorm(30)
model.matrix(~leg(x,2)-1)

[Package MCMCglmm version 2.01 Index]