Description Usage Arguments Value References Examples
View source: R/bernstein2DderivativeY.R
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 'Mai et al., 2012. Simulating copulas'.
1 | bernstein2DderivativeY(u, v, diffEC)
|
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. |
Numeric value, the partial derivative.
Section 5.3 of book 'Mai et al., 2012. Simulating copulas' computed by the derivative in Eq. 5.23 of the Book of "Goldman, 2002, Pyrimid algorithms..." (the same as eq 7.15 of "phillips, 2003, Interpolation and Approximation...") Notice that this partial derivative is a function of u, with v being treated as constant or an extra parameter.
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
bernstein2DderivativeY(u = eu, v = ev,
diffEC = forwardDifference(empCopulaCountsmatrix, i =2))
# 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
bernstein2DderivativeY(u = eu, v = ev,
diffEC = forwardDifference(empCopulaCountsmatrix, i =2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.