资源简介
copula函数代码,介绍copula函数在MATLAB的一些应用,有详细的代码。
代码片段和文件信息
function out1 = ang_chen1(XYq)
% function out1 = ang_chen1(XYq)
%
% Computes the ‘exceedence correlations‘ discussed in
% Ang and Chen (2001): Corr[XY|X>vY>v] if v>0 and X %
% INPUTS: X a Tx1 vector of data
% Y a Tx1 vector of data
% q a kx1 vector of quantiles to estimate the correl
%
% OUTPUT: out1 a qx1 vector of the measure at each quantile
%
% Wednesday 10 October 2001
%
% Andrew Patton
%
% see also: quantiledep.m
%
T = size(X1);
k = size(q1);
out1 = nines(k+11); % there‘s an extra one because we do both above and below 0.5
counter = 1;
for jj = 1:k;
if q(jj)<0.5; % then this is a ‘lower‘ quantile dependence measure
temp = find( (X<=quantile(Xq(jj))).*(Y<=quantile(Yq(jj))) );
if size(temp1)<=1
out1(counter1) = -999.99; % not enough obs to compute the correlation
else
out1(counter1) = corrcoef12(X(temp)Y(temp));
end
counter=counter+1;
elseif q(jj)==0.5
temp = find( (X<=quantile(Xq(jj))).*(Y<=quantile(Yq(jj))) );
out1(counter1) = corrcoef12(X(temp)Y(temp));
temp = find( (X>quantile(Xq(jj))).*(Y>quantile(Yq(jj))) );
out1(counter+11) = corrcoef12(X(temp)Y(temp));
counter=counter+2;
else
temp = find( (X>quantile(Xq(jj))).*(Y>quantile(Yq(jj))) );
if size(temp1)<=1
out1(counter1) = -999.99;% not enough obs to compute the correlation
else
out1(counter1) = corrcoef12(X(temp)Y(temp));
end
counter=counter+1;
end
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 832 2002-10-12 18:12 corrcoef12.m
文件 1570 2006-06-04 13:41 bb7_rnd.m
文件 1341 2006-06-04 13:41 BB7UgivenV_inverse2.m
文件 1243 2006-06-04 13:41 BB7UgivenV_t.m
文件 2775 2000-11-15 18:22 bisect2.m
文件 1972 2006-03-08 19:55 bivarnormcdf.m
文件 462 2006-03-08 19:55 bivarnormcdf_arg.m
文件 1600 2006-03-08 19:56 bivarnormcdf2.m
文件 2172 2003-08-18 10:47 bivartcdfmc.m
文件 551 2001-05-07 08:19 bivartLL.m
文件 1065 2001-08-26 00:23 bivartpdf.m
文件 1532 2006-06-04 13:47 clayton_cdf.m
文件 1483 2006-08-22 12:34 clayton_pdf.m
文件 1573 2006-06-04 13:47 clayton_rnd.m
文件 1082 2006-06-04 13:52 claytonCL.m
文件 6937 2008-05-14 16:10 copula_example_code.m
文件 1593 2006-06-04 14:32 ang_chen1.m
文件 559 2001-04-27 16:22 cov12.m
文件 994 2006-02-27 23:24 empiricalCDF.m
文件 426 2003-03-11 15:46 frankCL.m
文件 1143 2006-06-04 13:57 gumbel_cdf.m
文件 1285 2006-06-04 13:59 gumbel_pdf.m
文件 1425 2006-06-04 13:59 Gumbel_rnd.m
文件 1095 2006-06-04 13:59 gumbelCL.m
文件 810 2006-08-22 18:59 GumbelUgivenV_inverse2.m
文件 484 2006-06-04 14:00 GumbelUgivenV_t.m
文件 440 2002-05-05 22:39 kappa2tau.m
文件 1403 2003-04-16 09:44 nines.m
文件 864 2001-10-15 05:29 NormalCopula_cdf.m
文件 446 2006-03-09 21:29 NormalCopula_CL.m
文件 730 2001-07-27 03:50 NormalCopula_pdf.m
............此处省略27个文件信息
- 上一篇:真彩色图像转 256 色图像的MATLAB实现
- 下一篇:差额加权轮询DWRR算法
评论
共有 条评论