[Vinecopula-commits] r39 - in pkg: R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mo Nov 11 12:40:22 CET 2013


Author: etobi
Date: 2013-11-11 12:40:21 +0100 (Mon, 11 Nov 2013)
New Revision: 39

Modified:
   pkg/R/BiCopPar2Tau.r
   pkg/inst/ChangeLog
Log:


Modified: pkg/R/BiCopPar2Tau.r
===================================================================
--- pkg/R/BiCopPar2Tau.r	2013-11-06 11:08:59 UTC (rev 38)
+++ pkg/R/BiCopPar2Tau.r	2013-11-11 11:40:21 UTC (rev 39)
@@ -95,8 +95,8 @@
 	}
 	else if(family==9 || family==19)
 	{
-		theta=par
-		delta=par2
+		#theta=par
+		#delta=par2
 		#tau=1-2/(delta*(2-theta))+4/(theta^2*delta)*gamma(delta+2)*gamma((2-2*theta)/(theta)+1)/gamma(delta+3+(2-2*theta)/(theta))
 		kt<-function(t) {( (1-(1-t)^par)^-par2-1 )/( -par*par2*(1-t)^(par-1)*(1-(1-t)^par)^(-par2-1) )}
 		tau=1+4*integrate(kt,0,1)$value
@@ -151,7 +151,7 @@
 		theta=-par
 		delta=-par2
 		#tau=1-2/(delta*(2-theta))+4/(theta^2*delta)*gamma(delta+2)*gamma((2-2*theta)/(theta)+1)/gamma(delta+3+(2-2*theta)/(theta))
-		kt<-function(t) {( (1-(1-t)^par)^(-par2)-1 )/( -par*par2*(1-t)^(par-1)*(1-(1-t)^par)^(par2-1) )}
+		kt<-function(t) {( (1-(1-t)^theta)^(-delta)-1 )/( -theta*delta*(1-t)^(theta-1)*(1-(1-t)^theta)^(-delta-1) )}
 		tau=1+4*integrate(kt,0,1)$value
 		tau=-tau
 	}

Modified: pkg/inst/ChangeLog
===================================================================
--- pkg/inst/ChangeLog	2013-11-06 11:08:59 UTC (rev 38)
+++ pkg/inst/ChangeLog	2013-11-11 11:40:21 UTC (rev 39)
@@ -20,6 +20,7 @@
 The families 204,214,224,234 denote the Tawn copula and their rotated versions in the case of right skewness (Tawn type 2).
   
 - Bug fix:
+  * BiCopPar2Tau: corrected calculation of Kendall's tau of rotated BB7 (Reported by Giampiero Marra. Thanks!)
   * RVineStructureSelect: Corrected code for the igraph package
   * RVineTreePlot: Now a 3-dimensional R-vine can be plotted too.
   * Corrected upper tail dependence coefficient for the survival BB1 copula (BiCopPar2TailDep)



Mehr Informationen über die Mailingliste Vinecopula-commits