Legj: Evaluation of normalized shifted Legendre polynomials

Description Usage Arguments Value Examples

View source: R/LPBkg.R

Description

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

Usage

1
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

1
2
3
4
5
6
7
8
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))

Example output

Loading required package: polynom

LPBkg documentation built on Oct. 5, 2019, 1:05 a.m.

Related to Legj in LPBkg...