Code covered by the BSD License
-
[p mlv]=cmlstat(family,x)
CMLSTAT Estimates copula parameter(s), given sample X.
-
bernsteincop(x,g)
BERNSTEINCOP Bernstrein Empirical copula based on sample X.
-
claytoncml(alpha,u,v)
FRANKCML Maximum Likelihood Function for Clayton copula.
-
copulaparam(type,tau)
COPULAPARAM Copula parameter, given Kendall's rank correlation.
-
corrtest(R)
CORRTEST tests if R is correlation matrix.
-
debye1(x)
DEBYE1 First order Debye function.
-
ecopula(x)
ECOPULA Empirical copula based on sample X.
-
frankcml(alpha,u,v)
FRANKCML Maximum Likelihood Function for Frank copula.
-
gausscml(alpha,u,v)
GAUSSCML Maximum Likelihood Function for Gauss copula.
-
gumbelcml(alpha,u,v)
FRANKCML Maximum Likelihood Function for Gumbel copula.
-
kfun(family,x,alpha)
KFUN Goodness-of-fit test for Archimedean copulas.
-
mvcoprnd(family,theta,m,n,nu)
MVCOPRND Random numbers from multivariate copula.
-
tcml(theta,u,v)
TCML Maximum Likelihood Function for t copula.
-
View all files
from
Copula generation and estimation
by Robert Kopocinski
Copula functions written for Master Thesis.
|
| ecopula(x)
|
function ecop = ecopula(x)
%ECOPULA Empirical copula based on sample X.
% ECOP = ECOPULA(X) returns bivariate empirical copula. Extension to
% n dimensional empirical copula is straightforward.
%
% Written by Robert Kopocinski, Wroclaw University of Technology,
% for Master Thesis: "Simulating dependent random variables using copulas.
% Applications to Finance and Insurance".
% Date: 2007/05/12
%
% Reference:
% [1] Durrleman, V. and Nikeghbali, A. and Roncalli, T. (2000) Copulas approximation and
% new families, Groupe de Recherche Operationnelle Credit Lyonnais
[m n] = size(x);
y = sort(x);
for i=1:m
for j=1:m
ecop(i,j) = sum( (x(:,1)<=y(i,1)).*(x(:,2)<=y(j,2)) )/m;
end
end
|
|
Contact us at files@mathworks.com