leg | R Documentation |
Legendre polynomials of order 'n' are created given a vector 'x' and normalized to lay between values u and v.
leg(x,n=1,u=-1,v=1, intercept=TRUE, intercept1=FALSE)
x |
numeric vector to be used for the polynomial. |
n |
order of the Legendre polynomials. |
u |
lower bound for the polynomial. |
v |
upper bound for the polynomial. |
intercept |
a TRUE/FALSE value indicating if the intercept should be included. |
intercept1 |
a TRUE/FALSE value indicating if the intercept should have value 1 (is multiplied by sqrt(2)). |
an Legendre polynomial matrix of order n.
Giovanny Covarrubias-Pazaran
Giovanny Covarrubias-Pazaran (2024). lme4breeding: enabling genetic evaluation in the age of genomic data. To be submitted to Bioinformatics.
Douglas Bates, Martin Maechler, Ben Bolker, Steve Walker (2015). Fitting Linear Mixed-Effects Models Using lme4. Journal of Statistical Software, 67(1), 1-48.
The core function of the package lmebreed
x <- sort(rep(1:3,100))
library(orthopolynom)
leg(x, n=1)
leg(x, n=2)
## see dataset data(DT_legendre) for a random regression modeling example
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.