Learn R Programming

pencopula (version 0.3.5.1)

bernstein: Calculating a bernstein polynomial.

Description

Calculating a bernstein polynomial, transformed to be a density. 'int.bernstein' calculates the integral of the bernstein density polynomial.

Usage

bernstein(v,x,n)
int.bernstein(x,n)

Arguments

v

number of the current basis element, e.g. v is in the interval [0,2^K]

x

data points for constructing of the bernstein polynomial basis.

n

number of polynomials in the bernstein polynomial basis, e.g n = 2^K

Value

The bernstein polynomial density basis is created using the function 'apply' for some data 'x'.

K <- 3 index.b <- matrix(0:2^K) ## Bernstein polynomial B <- apply(index.b,1,bernstein,x,n=2^K)

The integral of the Basis B of degree n is: B <- int.bernstein(x,n=2^K)

References

Flexible Copula Density Estimation with Penalized Hierarchical B-Splines, Kauermann G., Schellhase C. and Ruppert, D. (2013), Scandinavian Journal of Statistics 40(4), 685-705.