资源简介
matlab的copula相关程序,比较全的资源,用来给大家共享
代码片段和文件信息
function p = bcs(family U boundaries prior_tau)
%
% FUNCTION BCS(FAMILY U BOUNDARIES PRIOR_TAU)
%
% Bayesian Copula Selection
% Return the weight of each copula family.
%
% INPUT
% FAMILY : Subset of {‘Ind‘ ‘Gumbel‘ ‘Clayton‘ ‘Frank‘ ‘AMH‘ ‘Joe‘ ‘Arch12‘ ‘Arch14‘}
% U : Nx2 matrix of quantiles (uv).
% BOUNDARIES: Integration boundaries on Kendall‘s tau
% Default: [-.95.95])
% PRIOR_TAU : Function handle returning the parent prior for TAU.
% Default is uniform over the domain of tau covered by each copula.
%
% OUTPUT
% P : The weight of each copula family.
%
% NOTES
% A prior for the model is applied proportional to 1/Lambda
% where Lambda is the interval spanned by Kendall‘s tau. This
% interval is equal the intersection of the copula boundaries
% on tau and the boundaries specified by the user.
%
% For some data and parameters the pdf returned by copulapdf is Inf
% or 0 which ruins the integration. To avoid this problem try to
% restrict the integration domain (do not use [-11] this won‘t
% work [.-97 .97] is a better choice and even then problems may
% appear).
% Reference
% Huard D. vin G. and Favre A-C. Bayesian Copula Selection
% Journal of Computational Statistics and Data Analysis 2005 51 809-822.
% Set defaults
if nargin <= 3
prior_tau = inline(‘1‘);
end
if nargin <= 2
boundaries = [-.95 .95];
end
% Make sure U is in the unit hypercube.
if any( (U < 0) | (U > 1) )
error(‘Some quantiles are outside the unit hypercube.‘)
end
% Make sure we can iterate on family
if ~iscell(family)
family = {family}
end
% Loop on each family to compute individual weight.
for i=1:length(family)
if strcmp(lower(family(i)) ‘ind‘)
p(i) = 1;
else
% Constrain the boundaries to the domain covered by each family.
bounds_tau = constrain_tau(family{i} boundaries);
% If bounds_tau is contrained shift the boundaries away from the limit
% of the domain since many functions don‘t deal well with those.
shift = bounds_tau ~= boundaries;
correct = [1-1];
bounds_tau(shift) = bounds_tau(shift) .* (1 + correct(shift).*sign(bounds_tau(shift))*.01);
% Translate the boundaries on tau in copula parameters.
bounds_alpha = copulaparam(family{i} bounds_tau);
alpha_min = bounds_alpha(1);
alpha_max = bounds_alpha(2);
% Integrate the likelihood over the parameter range.
p(i) = quadg(‘posterior‘alpha_min alpha_max 1e-4 [0128] family{i} U prior_tau);
% Prior for the copula family
p(i) = p(i)/diff(bounds_tau);
end
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2905 2009-09-16 11:09 Matlab for Copula\bcs.m
文件 2623 2009-09-16 10:44 Matlab for Copula\check_alpha.m
文件 2693 2009-09-16 10:48 Matlab for Copula\check_tau.m
文件 137400 2009-09-18 20:18 Matlab for Copula\clayton.fig
文件 747 2009-09-16 10:52 Matlab for Copula\constrain_tau.m
文件 2332 2009-09-16 10:47 Matlab for Copula\copCondCDF.m
文件 3836 2009-09-16 10:41 Matlab for Copula\copulacdf.m
文件 2545 2009-09-16 11:17 Matlab for Copula\copulaparam.asv
文件 2544 2009-09-16 10:38 Matlab for Copula\copulaparam.m
文件 8339 2009-09-16 11:07 Matlab for Copula\copulapdf.m
文件 3936 2009-09-16 11:06 Matlab for Copula\copularnd.m
文件 1868 2009-09-16 10:49 Matlab for Copula\copulastat.m
文件 1775 2009-09-16 10:53 Matlab for Copula\dilog.m
文件 255856 2009-10-16 20:49 Matlab for Copula\frank.fig
文件 144648 2009-10-16 20:45 Matlab for Copula\gumbel.fig
文件 1057 2009-09-16 11:09 Matlab for Copula\isnear.m
文件 1243 2009-09-16 10:55 Matlab for Copula\kendall.m
文件 9167 2009-09-16 10:58 Matlab for Copula\lambdaarch.m
文件 1280 2009-10-16 22:02 Matlab for Copula\plot_uncertainty.asv
文件 1278 2009-09-18 20:07 Matlab for Copula\plot_uncertainty.m
文件 1143 2009-09-16 10:57 Matlab for Copula\posterior.m
文件 7632 2009-09-16 10:56 Matlab for Copula\quadg.m
文件 149048 2009-10-16 20:27 Matlab for Copula\tau03.fig
文件 151056 2009-10-16 20:31 Matlab for Copula\tau05.fig
文件 149008 2009-10-16 20:33 Matlab for Copula\tau08.fig
文件 1050 2009-09-16 10:56 Matlab for Copula\tauboundaries.m
文件 1864 2009-09-16 10:55 Matlab for Copula\taujacobian.m
目录 0 2011-05-08 11:17 Matlab for Copula
----------- --------- ---------- ----- ----
1048873 28
............此处省略1个文件信息
相关资源
- matlab版本的红外目标跟踪代码
- matlab中text函数在显示字符串时的使用
- jpeg压缩的matlab程序
- PIIFD描述符matlab源代码
- 自动驾驶多目标检测.7z
- 使用QQ监控Matlab程序运行
- 登月挺软着陆MATLAB仿真
- 图像分割的多种算法MATLAB代码
- matlab实现图像模板匹配
- 光伏MPPT模型
- RS编码和纠错算法 matlab
- Matlab2010b的license.txt
- 基于matlab的自动报靶系统.rar
- matlab声线图源代码
- 神经网络理论与Matlab R2007实现
-
matlab simuli
nk 离合器模型 - 多车型车辆路径问题Matlab程序
- GPS/INS组合导航Matlab仿真源码包含实验
- Delaunay三角划分的Matlab实现
- isight联合matlab仿真
- 利用MATLAB优化电力系统稳定器
- BPA转matpower格式Matlab程序
- 基于C MEX S函数的研华PCI1716驱动程序
- 最小二乘法 MATLAB
- aodv和dsr的matlab实现
- 回溯法解决资源约束下的二维动态规
- rgb2lab颜色空间转换的MATLAB代码
- polar程序MATLAB编译码
- matlab基于SAD的区域立体匹配方法
- 灰度高度图
评论
共有 条评论