Learn R Programming

pencopula (version 0.2.1)

bernstein: Calculating a bernstein polynomial.

Description

Calculating a bernstein polynomial.

Usage

bernstein(v,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 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)