[Vinecopula-commits] r123 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mo Aug 24 18:46:34 CEST 2015


Author: tnagler
Date: 2015-08-24 18:46:34 +0200 (Mon, 24 Aug 2015)
New Revision: 123

Modified:
   pkg/R/BiCopEst.r
Log:
* faster implementation of tau->par conversion for Joe copula 

Modified: pkg/R/BiCopEst.r
===================================================================
--- pkg/R/BiCopEst.r	2015-08-24 10:50:15 UTC (rev 122)
+++ pkg/R/BiCopEst.r	2015-08-24 16:46:34 UTC (rev 123)
@@ -372,14 +372,16 @@
 }
 
 
-
 Joe.itau.JJ <- function(tau) {
     if (tau < 0) {
         return(1.000001)
     } else {
-        tauF <- function(a) {
-            # euler=0.5772156649015328606 1+((-2+2*euler+2*log(2)+digamma(1/a)+digamma(1/2*(2+a)/a)+a)/(-2+a))
-            1 + 4/a^2 * integrate(function(x) log(x) * x * (1 - x)^(2 * (1 - a)/a), 0, 1)$value
+        tauF <- function(par) {
+            param1 <- 2/par + 1
+            tem <- digamma(2) - digamma(param1)
+            tau <- 1 + tem * 2/(2 - par)
+            tau[par == 2] <- 1 - trigamma(2)
+            tau
         }
         
         v <- uniroot(function(x) tau - tauF(x),



Mehr Informationen über die Mailingliste Vinecopula-commits