adds missing classes and iTau
Showing 9 of 16 files from the diff.
R/0_wrappers.R
changed.
R/tawnT1Copula.R
changed.
R/tawnT2Copula.R
changed.
R/joeBiCopula.R
changed.
R/surClaytonCopula.R
changed.
R/BB8copula.R
changed.
R/BB7copula.R
changed.
R/BB6copula.R
changed.
R/surGumbelCopula.R
changed.
Other files ignored by Codecov
DESCRIPTION
has changed.
man/tawnT1Copula.Rd
has changed.
man/tawnT1Copula-class.Rd
has changed.
NAMESPACE
has changed.
R/tawnCopula.R
was deleted.
tests/testthat/test-bivariate-models.R
has changed.
README.md
has changed.
@@ -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 | + | }) |
@@ -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) |
@@ -34,6 +34,8 @@
Loading
34 | 34 | #' persp(r90GumbelCopula(-5), dCopula, zlim = c(0, 10)) |
|
35 | 35 | #' persp(r270GumbelCopula(-5), dCopula, zlim = c(0, 10)) |
|
36 | 36 | NULL |
|
37 | + | ||
38 | + | #' @exportClass surGumbelCopula r90GumbelCopula r270GumbelCopula |
|
37 | 39 | generateClass("surGumbelCopula") |
|
38 | 40 | generateClass("r90GumbelCopula") |
|
39 | 41 | generateClass("r270GumbelCopula") |
@@ -96,3 +98,9 @@
Loading
96 | 98 | fullname = "270 deg rotated Gumbel copula family. Number 34 in VineCopula." |
|
97 | 99 | ) |
|
98 | 100 | } |
|
101 | + | ||
102 | + | # iTau |
|
103 | + | setMethod("iTau", signature = c("r90GumbelCopula", "ANY"), BCiTau) |
|
104 | + | setMethod("iTau", signature = c("surGumbelCopula", "ANY"), BCiTau) |
|
105 | + | setMethod("iTau", signature = c("r270GumbelCopula", "ANY"), BCiTau) |
|
106 | + |
Files | Coverage |
---|---|
R | 94.51% |
Project Totals (11 files) | 94.51% |
run5
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.