Environmental Engineering Reference
In-Depth Information
else
a = c;
fa = fc;
end
end
y = 0.5*(a + b);
return
%
% Definition of Plackett copula's dependence parameter estimation
% function, theta_estimationPlackett_Kendall
function y = theta_estimationPlackett_Kendall(tau)
a = 1e-6;
b = 1e4;
eps = 1e-6;
fx = @(theta,tau)4*dblquad(@(u,v)(1 + (theta-1).*(u + v)-sqrt((1 + (theta-
1).*(u + v)).^2-4.*u.*v.*theta.*(theta-1)))./2./(theta-1).*((1 + (theta-
1).*(u + v)).^2-4.*u.*v.*theta.*(theta-1)).^(-3/2).*theta.*(1 + (theta-
1).*(u + v-2.*u.*v)),0,1,0,1)-1-tau;
fa = fx(a,tau);
fb = fx(b,tau);
if fa*fb > 0
disp('error:[a b] interval no solution, please re-enter a and b');
return
end
while b-a > eps
c = 0.5*(a + b);
fc = fx(c,tau);
if(fc*fa < 0)
b = c;
fb = fc;
else
a = c;
fa = fc;
end
end
y = 0.5*(a + b);
return
%
% Definition of No.16 copula's U2 solving function, U2_solve16
function y = U2_solve16(U1,V2,theta)
a = 1e-6;
b = 0.999999;
eps = 1e-6;
fa = V2-0.5*(1 + theta/U1^2)*(1 + ((U1 + a-1-theta*(1/U1 + 1/a-
1))^2 + 4*theta)^(-0.5)*(U1 + a-1-theta*(1/U1 + 1/a-1)));
fb = V2-0.5*(1 + theta/U1^2)*(1 + ((U1 + b-1-theta*(1/U1 + 1/b-
1))^2 + 4*theta)^(-0.5)*(U1 + b-1-theta*(1/U1 + 1/b-1)));
if fa*fb > 0
disp('error:[a b] interval no solution, please re-enter a and b');
return
end
while b-a > eps
c = 0.5*(a + b);
fc = V2-0.5*(1 + theta/U1^2)*(1 + ((U1 + c-1-theta*(1/U1 + 1/c-
1))^2 + 4*theta)^(-0.5)*(U1 + c-1-theta*(1/U1 + 1/c-1)));
Search WWH ::




Custom Search