Description Usage Arguments Details Author(s) Examples
Empirical copula (distribution function) from counts (densities).
1 |
uv |
2-column table (matrix or data.frame) of pseudo-observaritions in |
d |
Densities matrix from a bivariate histogram. Maybe a result from the function pj1j2Matrix. |
This function implements the empirical copula in agreement with formula (3) "Carnicero, 2013. Non-parametric copulas ...", and reproduce the same result as the function genmat.copem when k = n, and the Definition 5.6.1 of "Nelsen, 2006. Introduction to copulas"
Francisco Mendoza-Torres (mentofran@gmail.com)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Example 1
library(squash)
xye <- cbind(1:5, c(2, 4, 3, 6, 7))
uve <- cbind(u = ecdf(xye[,1])(xye[,1]), # Empirical CDF values
v = ecdf(xye[,2])(xye[,2]))
Emp_cop_matrix <- EmpCop(uv = uve)
# Exapmle 2
xye <- cbind(1:5, c(2, 4, 3, 6, 7))
uve <- cbind(u = ecdf(xye[,1])(xye[,1]),
v = ecdf(xye[,2])(xye[,2]))
ne <- nrow(xye)
DensMatrix <- pj1j2Matrix(uv = uve, k = ne)$dens
Emp_cop_matrix <- EmpCop(d = DensMatrix)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.