資源簡介
matlab的copula相關(guān)程序,比較全的資源,用來給大家共享

代碼片段和文件信息
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‘a(chǎn)lpha_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個文件信息
評論
共有 條評論