# bernstein: Calculating a bernstein polynomial. In pencopula: Flexible Copula Density Estimation with Penalized Hierarchical B-Splines

## Description

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

## Usage

 ```1 2``` ```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)

## Author(s)

Christian Schellhase <[email protected]>

## 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.

pencopula documentation built on May 30, 2017, 2:38 a.m.