Legj {LPBkg}R Documentation

Evaluation of normalized shifted Legendre polynomials

Description

Evaluates the a basis of normalized shifted Legendre polynomials over a specified data vector.

Usage

Legj(u, m)

Arguments

u

Data vector on which the polynomials are to be evaluated.

m

The size of the basis to be considered.

Value

Numerical values of the first m normalized shifted Legendre polynomials.

Examples

x<-rnorm(1000,10,7)
xx<-x[x>=10 & x<=20]
G<-pnorm(20,5,15)-pnorm(10,5,15)
g<-function(x){dnorm(x,5,15)/G}
g<-Vectorize(g)
u<-g(xx)
Mmax=20
s<-as.matrix(Legj(u,Mmax))

[Package LPBkg version 1.2 Index]