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.
|
| corrtest(R)
|
function corrtest(R)
%CORRTEST tests if R is correlation matrix.
%
% 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
[n m] = size(R);
if (m ~= n || n < 2)
error('corrtest:BadCorrelation',...
'The correlation matrix must be square');
end
if any(any(R ~= R'))
error('corrtest:BadCorrelation','The correlation matrix must be symmetrical');
end
s = diag(R);
if (any(s~=1))
error('corrtest:BadCorrelation','The correlation matrix must have ones on the main diagonal');
end
p = eig(R);
if any(p <= 0)
error('stats:mvnrnd:BadCorrelation',...
'The correlation matrix must be positive definite.');
end
|
|
Contact us at files@mathworks.com