bernstein2DderivativeX: Partial derivative of the Bernstein-Bezier polynomial with...

Description Usage Arguments Details Value Examples

View source: R/bernstein2DderivativeX.R

Description

Computes the partial derivative of the Bernstein-Bezier polynomial with respect to x. For copula theory, it is required for the conditional distribution method simulation algorithm in the book 'Nelsen, 2006. An introduction to copulas'.

Usage

1
bernstein2DderivativeX(v, u, diffEC)

Arguments

u, v

numeric vector of values (pseudo-observartions) in the unit square [0,1]x[0,1]. For copulas, u=F(x), v=G(y).

diffEC

Forward difference integer matrix resulting from the empirical copula matrix. Maybe computed with forwardDifference of empiricalCDF2Dcounts.

Details

Equation 2.9.1 of Nelsen, 2006. Notice that this partial derivative is a function of v, with u being treated as constant or an extra parameter.

Value

Numeric value, the partial derivative.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(empiricalDistribution)
exy <- cbind(1:5, c(2, 4, 3, 6, 7)); print(exy)
set.seed(1); exy <- exy[sample(1:5), ]
empCopulaCountsmatrix <- empiricalCDF2Dcounts(exy)
eu <- 0.5; ev <- 0.7
bernstein2DderivativeX(v = ev, u = eu,
                      diffEC = forwardDifference(empCopulaCountsmatrix))

# Example 2:
library(copBasic)
n <- 100
exy <- PLACKETTsim(n, para=20.3) # simulate strong positive Plackett
plotProbs(exy)
empCopulaCountsmatrix <- empiricalCDF2Dcounts(exy)
eu <- 0.5; ev <- 0.7
bernstein2DderivativeX(v = ev, u = eu,
                      diffEC = forwardDifference(empCopulaCountsmatrix))

mathphysmx/bernstein documentation built on Sept. 3, 2019, 12:57 p.m.