This function evaluates the derivative of a given parametric bivariate copula density with respect to its parameter(s) or one of its arguments.
BiCopDeriv(
u1,
u2,
family,
par,
par2 = 0,
deriv = "par",
log = FALSE,
obj = NULL,
check.pars = TRUE
)numeric vectors of equal length with values in \([0,1]\).
integer; single number or vector of size length(u1);
defines the bivariate copula family: 0 = independence copula 1 = Gaussian copula 2 = Student t copula (t-copula) 3 = Clayton copula 4 = Gumbel copula 5 = Frank copula 6 = Joe copula 13 = rotated Clayton copula (180 degrees; survival Clayton'') \cr `14` = rotated Gumbel copula (180 degrees; survival Gumbel'') 16 = rotated Joe copula (180 degrees; ``survival Joe'') 23 = rotated Clayton copula (90 degrees)
`24` = rotated Gumbel copula (90 degrees)
`26` = rotated Joe copula (90 degrees)
`33` = rotated Clayton copula (270 degrees)
`34` = rotated Gumbel copula (270 degrees)
`36` = rotated Joe copula (270 degrees)
numeric; single number or vector of size length(u1);
copula parameter.
integer; single number or vector of size length(u1);
second parameter for the t-Copula; default is par2 = 0, should be an
positive integer for the Students's t copula family = 2.
Derivative argument "par" = derivative with respect to the first parameter (default)"par2" = derivative with respect to the second parameter
(only available for the t-copula) "u1" = derivative with respect to the first argument u1 "u2" = derivative with respect to the second argument u2
Logical; if TRUE than the derivative of the log-likelihood
is returned (default: log = FALSE; only available for the derivatives
with respect to the parameter(s) (deriv = "par" or deriv = "par2")).
BiCop object containing the family and parameter
specification.
logical; default is TRUE; if FALSE, checks
for family/parameter-consistency are omitted (should only be used with
care).
A numeric vector of the bivariate copula derivative
of the copula family
with parameter(s) par, par2
with respect to deriv,
evaluated at u1 and u2.
If the family and parameter specification is stored in a BiCop()
object obj, the alternative version
BiCopDeriv(u1, u2, obj, deriv = "par", log = FALSE)can be used.
Schepsmeier, U. and J. Stoeber (2014). Derivatives and Fisher
information of bivariate copulas. Statistical Papers, 55 (2), 525-542.
https://link.springer.com/article/10.1007/s00362-013-0498-x.
## simulate from a bivariate Student-t copula
set.seed(123)
cop <- BiCop(family = 2, par = -0.7, par2 = 4)
simdata <- BiCopSim(100, cop)
## derivative of the bivariate t-copula with respect to the first parameter
u1 <- simdata[,1]
u2 <- simdata[,2]
BiCopDeriv(u1, u2, cop, deriv = "par")
#> [1] -1.9491194 0.4287700 -2.1243812 0.9894915 -2.2047080 -6.8875898
#> [7] -1.7649804 -3.9093168 1.3918512 1.3725159 0.2610399 1.0257608
#> [13] -0.5194076 -1.8585951 1.1101953 1.4226641 0.5365931 -5.3960728
#> [19] -2.6089908 0.2241644 -1.4657837 -1.4961593 1.4470699 -2.1020266
#> [25] -1.1124191 -2.5897270 -1.5904825 -0.6383240 -5.7165568 -5.6223032
#> [31] 0.4260070 -0.5006696 -3.1947709 1.0966700 -3.1221788 -1.0528469
#> [37] 1.0715588 -0.3303013 -2.3240436 1.2326288 -3.2262827 -0.8370149
#> [43] -1.8759344 1.5173806 -5.7398194 -5.1544035 -2.4041889 0.6624840
#> [49] -0.5309243 -2.1865130 -2.0200902 1.4910194 0.8285610 -1.0259934
#> [55] 0.7598523 -9.7957033 -3.0055312 -0.9632466 1.4953758 -2.2232271
#> [61] -2.2474680 0.3882322 1.6554248 1.4807135 -5.1011095 1.1948755
#> [67] -0.1451278 -1.5037080 0.9329069 -12.6765803 -1.5942166 2.7522270
#> [73] -4.5559148 1.4717988 -2.9951774 -2.8088077 -0.2201730 -1.0321698
#> [79] -0.8301523 -0.1610222 -1.6934311 -2.4458507 -2.3632248 -2.4039404
#> [85] -0.5327412 -0.8140025 0.7503848 -1.3836944 -2.3199687 -1.5293709
#> [91] -4.6053130 -2.4260304 -2.2459406 -2.7919755 1.4777421 -0.5824266
#> [97] -0.7432825 -5.0724114 -2.0257408 -3.7867954
## estimate a Student-t copula for the simulated data
cop <- BiCopEst(u1, u2, family = 2)
## and evaluate its derivative w.r.t. the second argument u2
BiCopDeriv(u1, u2, cop, deriv = "u2")
#> [1] -2.572532e+00 -4.713478e+00 7.764411e+01 -3.893079e+00 -7.353974e-03
#> [6] -4.110736e+01 -2.684368e+00 -1.267933e+01 1.685358e+00 -8.459042e+00
#> [11] -6.926049e+00 -1.906637e+00 -3.246016e+00 -1.497334e+00 3.179740e+00
#> [16] -1.710293e+00 -3.452148e+00 7.169778e+01 1.938487e+00 3.468987e+00
#> [21] 7.040024e+00 2.231633e+00 2.839713e+00 3.959213e+00 -5.047145e+00
#> [26] 2.727019e+01 6.875954e+00 3.205492e+00 4.514724e+00 -1.164073e+01
#> [31] 6.172279e+00 3.107522e+00 -4.920490e+00 -3.555590e+00 -4.025224e+00
#> [36] -4.033415e+00 2.305999e+01 3.179083e+00 -1.390712e-01 3.184211e+00
#> [41] 1.159594e+00 -3.091015e+00 1.035754e+01 -2.430187e+00 -6.185534e-01
#> [46] 7.499612e+00 -3.649171e-01 3.402683e+00 8.991486e+00 1.994543e-01
#> [51] 1.129617e+00 -4.501232e+00 -4.211597e+00 -1.132991e+01 3.504455e+00
#> [56] -2.589459e+01 -6.284932e+01 4.967663e+00 -3.640092e+00 2.873912e-01
#> [61] 8.523196e-01 3.485461e+00 -8.261592e+00 1.980008e+00 5.480990e+00
#> [66] -3.326240e+00 -3.415811e+00 -2.004110e+00 -3.941866e+00 -1.337753e+02
#> [71] 2.949049e+00 1.545911e+01 -1.267314e+00 2.197841e+00 -4.088047e-01
#> [76] -6.860913e+00 3.223230e+00 8.691908e+00 3.035431e+00 3.243113e+00
#> [81] 1.674844e+00 -4.167429e-02 1.192042e+00 2.017697e+00 3.029543e+00
#> [86] 3.543877e+00 -5.031280e+00 -2.895037e+00 1.023711e+00 -8.116307e+00
#> [91] -4.105862e+00 1.220534e+00 -7.622173e-01 2.320207e+00 -1.836715e+00
#> [96] 3.725500e+00 -8.778278e+01 -2.352367e+01 -1.078140e+00 6.589028e+00