Environmental Engineering Reference
In-Depth Information
AIC_X2 = [AIC_TruncNormal_X2 AIC_Lognormal_X2 AIC_TruncGumbel_X2 AIC_
Weibull_X2];
display(AIC_X2);
[AIC_min_X2 Index_X2] = min(AIC_X2,[],2);
if Index_X2 = = 1
display('The best-fit margin for X2 using AIC is TruncNormal
distribution');
elseif Index_X2 = = 2
display('The best-fit margin for X2 using AIC is Lognormal
distribution');
elseif Index_X2 = = 3
display('The best-fit margin for X2 using AIC is TruncGumbel
distribution');
elseif Index_X2 = = 4
display('The best-fit margin for X2 using AIC is Weibull
distribution');
end
%
BIC_X2 = [BIC_TruncNormal_X2 BIC_Lognormal_X2 BIC_TruncGumbel_X2 BIC_
Weibull_X2];
display(BIC_X2);
[BIC_min_X2 Index_X2] = min(BIC_X2,[],2);
if Index_X2 = = 1
display('The best-fit margin for X2 using BIC is TruncNormal
distribution');
elseif Index_X2 = = 2
display('The best-fit margin for X2 using BIC is Lognormal
distribution');
elseif Index_X2 = = 3
display('The best-fit margin for X2 using BIC is TruncGumbel
distribution');
elseif Index_X2 = = 4
display('The best-fit margin for X2 using BIC is Weibull
distribution');
end
%
% Select best-fit copula among Gaussian,Plackett,Frank and No.16 copulas
% Empirical distributions of data, U
[datasort,dataindex] = sort(data);
Ranks_data = data;
for m = 1:cols
Ranks_data(dataindex(:,m),m) = 1:rows;
end
U = Ranks_data/(rows + 1);
%
% Kendall's tau of data, Kendall_data
Kendall_data = corr(data,'type','Kendall');
%
% Estimation of copula parameters
rho_Gaussian = sin(pi/2*Kendall_data);
theta_Plackett = theta_estimationPlackett_Kendall(Kendall_data(1,2));
theta_Frank = copulaparam('Frank',Kendall_data(1,2),'type','Kendall');
theta_16 = theta_estimation16_Kendall(Kendall_data(1,2));
Copula_parameter = [rho_Gaussian(1,2) theta_Plackett theta_Frank
theta_16];
Search WWH ::




Custom Search