tnagler / VC2copula

Compare 6c722f5 ... +3 ... 9572ec8

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.


@@ -135,3 +135,8 @@
Loading
135 135
  bc <- copula2BiCop(copula)
136 136
  unlist(VineCopula::BiCopPar2TailDep(bc$family, bc$par, bc$par2))
137 137
}
138 +
139 +
# metods in copula
140 +
141 +
# iTau
142 +
BCiTau <- function(copula, tau) VineCopula::BiCopTau2Par(copula@family, tau)

@@ -33,6 +33,8 @@
Loading
33 33
#'
34 34
#' showClass("tawnT1Copula")
35 35
NULL
36 +
37 +
#' @exportClass tawnT1Copula surTawnT1Copula r90TawnT1Copula r270TawnT1Copula
36 38
generateClass("tawnT1Copula")
37 39
generateClass("surTawnT1Copula")
38 40
generateClass("r90TawnT1Copula")
@@ -118,3 +120,26 @@
Loading
118 120
    fullname = "270 deg rotated Tawn type 1 copula family. Number 134 in VineCopula."
119 121
  )
120 122
}
123 +
124 +
# Pickand's A
125 +
# c-code: Tawn1(double* t, int* n, double* par, double* par2, double* par3, double* out)
126 +
setMethod("A", signature("tawnT1Copula"), function(copula, w) {
127 +
  .C("Tawn2", as.double(w), as.integer(length(w)),
128 +
     as.double(copula@parameters[1]), as.double(copula@parameters[2]),
129 +
     as.double(1), as.double(rep(0, length(w))),
130 +
     PACKAGE = "VineCopula"
131 +
  )[[6]]
132 +
})
133 +
134 +
# c-code: Tawn1(double* t, int* n, double* par, double* par2, double* par3, double* out)
135 +
setMethod("A", signature("surTawnT1Copula"), function(copula, w) {
136 +
  u <- -expm1(-1 + w)
137 +
  v <- -expm1(-w)
138 +
139 +
  surA <- .C("Tawn2", as.double(log(v) / log(u * v)), as.integer(length(w)),
140 +
             as.double(copula@parameters[1]), as.double(copula@parameters[2]),
141 +
             as.double(1), as.double(rep(0, length(w))),
142 +
             PACKAGE = "VineCopula"
143 +
  )[[6]]
144 +
  -log(1 - u + 1 - v - 1 + (u * v)^surA)
145 +
})

@@ -33,6 +33,8 @@
Loading
33 33
#'
34 34
#' showClass("tawnT2Copula")
35 35
NULL
36 +
37 +
#' @exportClass tawnT2Copula surTawnT2Copula r90TawnT2Copula r270TawnT2Copula
36 38
generateClass("tawnT2Copula")
37 39
generateClass("surTawnT2Copula")
38 40
generateClass("r90TawnT2Copula")

@@ -41,6 +41,8 @@
Loading
41 41
#'
42 42
#' showClass("surJoeBiCopula")
43 43
NULL
44 +
45 +
#' @exportClass joeBiCopula surJoeBiCopula r90JoeBiCopula r270JoeBiCopula
44 46
generateClass("joeBiCopula")
45 47
generateClass("surJoeBiCopula")
46 48
generateClass("r90JoeBiCopula")
@@ -128,3 +130,8 @@
Loading
128 130
    fullname = "270 deg rotated Joe copula family. Number 36 in VineCopula."
129 131
  )
130 132
}
133 +
134 +
setMethod("iTau", signature = c("joeBiCopula", "ANY"), BCiTau)
135 +
setMethod("iTau", signature = c("r90JoeBiCopula", "ANY"), BCiTau)
136 +
setMethod("iTau", signature = c("surJoeBiCopula", "ANY"), BCiTau)
137 +
setMethod("iTau", signature = c("r270JoeBiCopula", "ANY"), BCiTau)

@@ -33,6 +33,8 @@
Loading
33 33
#' persp(r90ClaytonCopula(-.5), dCopula, zlim = c(0, 10))
34 34
#' persp(r270ClaytonCopula(-.5), dCopula, zlim = c(0, 10))
35 35
NULL
36 +
37 +
#' @exportClass surClaytonCopula r90ClaytonCopula r270ClaytonCopula
36 38
generateClass("surClaytonCopula")
37 39
generateClass("r90ClaytonCopula")
38 40
generateClass("r270ClaytonCopula")
@@ -95,3 +97,8 @@
Loading
95 97
    fullname = "270 deg rotated Clayton copula family. Number 33 in VineCopula."
96 98
  )
97 99
}
100 +
101 +
# iTau
102 +
setMethod("iTau", signature = c("r90ClaytonCopula", "ANY"), BCiTau)
103 +
setMethod("iTau", signature = c("surClaytonCopula", "ANY"), BCiTau)
104 +
setMethod("iTau", signature = c("r270ClaytonCopula", "ANY"), BCiTau)

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
R 0.18% 94.51%
Project Totals (11 files) 94.51%
Loading