Calculating a bernstein polynomial, transformed to be a density. 'int.bernstein' calculates the integral of the bernstein density polynomial.
bernstein(v,x,n)
int.bernstein(x,n)
number of the current basis element, e.g. v is in the interval [0,2^K]
data points for constructing of the bernstein polynomial basis.
number of polynomials in the bernstein polynomial basis, e.g n = 2^K
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)
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.