This function evaluates the cumulative distribution function (CDF) of a given parametric bivariate copula.

BiCopCDF(u1, u2, family, par, par2 = 0, obj = NULL, check.pars = TRUE)

Arguments

u1, u2

numeric vectors of equal length with values in \([0,1]\).

family

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
7 = BB1 copula
8 = BB6 copula
9 = BB7 copula
10 = BB8 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'') \cr `17` = rotated BB1 copula (180 degrees; survival BB1'')
18 = rotated BB6 copula (180 degrees; survival BB6'')\cr `19` = rotated BB7 copula (180 degrees; survival BB7'')
20 = rotated BB8 copula (180 degrees; ``survival BB8'')
23 = rotated Clayton copula (90 degrees)
`24` = rotated Gumbel copula (90 degrees)
`26` = rotated Joe copula (90 degrees)
`27` = rotated BB1 copula (90 degrees)
`28` = rotated BB6 copula (90 degrees)
`29` = rotated BB7 copula (90 degrees)
`30` = rotated BB8 copula (90 degrees)
`33` = rotated Clayton copula (270 degrees)
`34` = rotated Gumbel copula (270 degrees)
`36` = rotated Joe copula (270 degrees)
`37` = rotated BB1 copula (270 degrees)
`38` = rotated BB6 copula (270 degrees)
`39` = rotated BB7 copula (270 degrees)
`40` = rotated BB8 copula (270 degrees)
`104` = Tawn type 1 copula
`114` = rotated Tawn type 1 copula (180 degrees)
`124` = rotated Tawn type 1 copula (90 degrees)
`134` = rotated Tawn type 1 copula (270 degrees)
`204` = Tawn type 2 copula
`214` = rotated Tawn type 2 copula (180 degrees)
`224` = rotated Tawn type 2 copula (90 degrees)
`234` = rotated Tawn type 2 copula (270 degrees)

par

numeric; single number or vector of size length(u1); copula parameter.

par2

numeric; single number or vector of size length(u1); second parameter for bivariate copulas with two parameters (BB1, BB6, BB7, BB8, Tawn type 1 and type 2; default: par2 = 0).

obj

BiCop object containing the family and parameter specification.

check.pars

logical; default is TRUE; if FALSE, checks for family/parameter-consistency are omitted (should only be used with care).

Value

A numeric vector of the bivariate copula distribution function

  • of the copula family

  • with parameter(s) par, par2

  • evaluated at u1 and u2.

Details

If the family and parameter specification is stored in a BiCop() object obj, the alternative version

BiCopCDF(u1, u2, obj)

can be used.

Note

The calculation of the cumulative distribution function (CDF) of the Student's t copula (family = 2) is only approximate. For numerical reasons, the degree of freedom parameter (par2) is rounded to an integer before calculation of the CDF.

Author

Eike Brechmann

Examples

## simulate from a bivariate Clayton copula
set.seed(123)
cop <- BiCop(family = 3, par = 3.4)
simdata <- BiCopSim(300, cop)

## evaluate the distribution function of the bivariate Clayton copula
u1 <- simdata[,1]
u2 <- simdata[,2]
BiCopCDF(u1, u2, cop)
#>   [1] 0.272443455 0.397575020 0.466088911 0.514619601 0.461444338 0.799373201
#>   [7] 0.596934319 0.100484924 0.119765543 0.324468736 0.818352006 0.639670814
#>  [13] 0.606316797 0.483351456 0.187054448 0.940783304 0.655702676 0.020810245
#>  [19] 0.535621671 0.228195797 0.116899611 0.329812119 0.097320715 0.195904623
#>  [25] 0.256862448 0.038073231 0.495198018 0.391956261 0.119579624 0.715966111
#>  [31] 0.389399721 0.286187740 0.678929140 0.772700884 0.659077453 0.679076063
#>  [37] 0.132777661 0.336966627 0.339807182 0.213521471 0.222278103 0.395655216
#>  [43] 0.085129534 0.959959230 0.596563210 0.118634633 0.312211436 0.219043218
#>  [49] 0.456629470 0.400812222 0.467256702 0.483466027 0.470322681 0.816884728
#>  [55] 0.265663195 0.712062739 0.059984160 0.462630886 0.543449020 0.476628889
#>  [61] 0.500014213 0.218073072 0.368155521 0.089445205 0.130430556 0.603285353
#>  [67] 0.627919346 0.474148021 0.778102426 0.812804433 0.254454257 0.007122939
#>  [73] 0.604120490 0.133386700 0.228913972 0.723120133 0.282153887 0.089693084
#>  [79] 0.404104343 0.314614340 0.396676918 0.520016408 0.308171688 0.525378279
#>  [85] 0.305392207 0.428689720 0.808140639 0.599048136 0.322200044 0.773359411
#>  [91] 0.644667851 0.523766185 0.503334836 0.232742295 0.892002812 0.211838534
#>  [97] 0.884166259 0.788190280 0.370073361 0.134228598 0.236653397 0.517185110
#> [103] 0.391070528 0.274427484 0.114406089 0.352709628 0.197733342 0.043964518
#> [109] 0.287175262 0.805312984 0.279992412 0.668684880 0.042792507 0.418891962
#> [115] 0.684421952 0.509999330 0.284338409 0.211473549 0.189645503 0.145467866
#> [121] 0.497946330 0.154753185 0.289848592 0.396127924 0.899695412 0.182662235
#> [127] 0.439483272 0.502684509 0.136806002 0.456658247 0.899659109 0.666399715
#> [133] 0.455683656 0.264477596 0.017127548 0.275360859 0.047792460 0.718314469
#> [139] 0.817229172 0.067419139 0.482931412 0.282551852 0.046952414 0.046301055
#> [145] 0.049881236 0.176716347 0.069853065 0.720305391 0.586666585 0.094112951
#> [151] 0.271828737 0.725151543 0.533547855 0.052595352 0.385149686 0.327306607
#> [157] 0.369418455 0.337508166 0.602925924 0.341775859 0.647353764 0.135773930
#> [163] 0.048048195 0.466115977 0.331633285 0.464510986 0.707989379 0.267552902
#> [169] 0.630435808 0.640653746 0.255860501 0.374809991 0.388083682 0.793125683
#> [175] 0.205891983 0.135517778 0.341084580 0.619906173 0.548779027 0.310382901
#> [181] 0.098933380 0.686223737 0.343748042 0.077372568 0.344651233 0.330737049
#> [187] 0.724534314 0.529316085 0.542627912 0.306753027 0.549668411 0.351131178
#> [193] 0.526799375 0.138995300 0.066640668 0.741102543 0.687257765 0.076187863
#> [199] 0.160696293 0.117678194 0.627696284 0.798728885 0.329785576 0.400733965
#> [205] 0.310919567 0.303937820 0.183638734 0.189720010 0.734636359 0.212274358
#> [211] 0.495397433 0.460859051 0.801199774 0.244293008 0.155172004 0.836660651
#> [217] 0.329293721 0.210076374 0.091861076 0.065678205 0.250418221 0.486187918
#> [223] 0.801214993 0.491872159 0.327275420 0.412579288 0.126025167 0.230439724
#> [229] 0.759873223 0.096523421 0.807192283 0.308224486 0.434667597 0.211572017
#> [235] 0.269655637 0.089825303 0.401088168 0.550919013 0.109659382 0.200644130
#> [241] 0.205330734 0.282663023 0.571376432 0.116919227 0.411657363 0.531648367
#> [247] 0.424202523 0.086800366 0.127845779 0.649947933 0.281468535 0.161697101
#> [253] 0.246877556 0.458742362 0.740199363 0.263610301 0.696682450 0.493091512
#> [259] 0.428560852 0.059805273 0.239444128 0.147871646 0.475110495 0.392422043
#> [265] 0.753945753 0.862504891 0.426904630 0.036875589 0.334191770 0.399213612
#> [271] 0.465285735 0.621468013 0.746887577 0.078603841 0.645854030 0.228502707
#> [277] 0.554224918 0.469301913 0.576257881 0.199648887 0.046922093 0.534272248
#> [283] 0.590389567 0.377014115 0.532062149 0.541044889 0.483242138 0.878203639
#> [289] 0.166616746 0.481927968 0.838254576 0.680471355 0.568998601 0.257006396
#> [295] 0.864497651 0.278649496 0.598768656 0.085849946 0.397162727 0.408953428

## select a bivariate copula for the simulated data
cop <- BiCopSelect(u1, u2)
summary(cop)
#> Family
#> ------ 
#> No:    16
#> Name:  Survival Joe
#> 
#> Parameter(s)
#> ------------
#> par:  3.81
#> 
#> Dependence measures
#> -------------------
#> Kendall's tau:    0.6 (empirical = 0.57, p value < 0.01)
#> Upper TD:         0 
#> Lower TD:         0.8 
#> 
#> Fit statistics
#> --------------
#> logLik:  165.79 
#> AIC:    -329.59 
#> BIC:    -325.89 
#> 
## and evaluate its CDF
BiCopCDF(u1, u2, cop)
#>   [1] 0.268500237 0.393482146 0.464894801 0.510456314 0.453162125 0.797323504
#>   [7] 0.588601196 0.099482787 0.118512945 0.322486687 0.814900683 0.639423910
#>  [13] 0.599058793 0.475238984 0.184087051 0.940328719 0.650089901 0.020430206
#>  [19] 0.528904332 0.224164096 0.114739937 0.323577958 0.095813856 0.192260697
#>  [25] 0.253748965 0.037373935 0.490382533 0.385460939 0.117787436 0.711378055
#>  [31] 0.384689383 0.280957323 0.672082820 0.768950536 0.651786590 0.672018208
#>  [37] 0.132639549 0.331106317 0.333744618 0.210386998 0.218524580 0.390087270
#>  [43] 0.083562417 0.959755835 0.592526788 0.116640566 0.306823436 0.215342712
#>  [49] 0.452303945 0.393405191 0.459175501 0.481287523 0.466120384 0.813647526
#>  [55] 0.261440049 0.709057397 0.059565891 0.456855421 0.541356668 0.468243373
#>  [61] 0.491857139 0.214263692 0.367249229 0.088220925 0.128309790 0.599365819
#>  [67] 0.621174701 0.466536641 0.774157218 0.811803902 0.249649921 0.007005073
#>  [73] 0.598545626 0.131654099 0.225309000 0.717245552 0.277091777 0.088040484
#>  [79] 0.397385231 0.309124431 0.389333087 0.511528682 0.302444449 0.518453232
#>  [85] 0.299842416 0.422155112 0.804545518 0.590955779 0.316200816 0.768696094
#>  [91] 0.638551645 0.516169707 0.494733268 0.228517531 0.890956227 0.207920271
#>  [97] 0.883587294 0.785326772 0.363739621 0.131843689 0.235281643 0.508567826
#> [103] 0.386962707 0.269377396 0.112533991 0.346416729 0.194429812 0.043262497
#> [109] 0.281730554 0.803591145 0.278380773 0.661849331 0.042005252 0.411355471
#> [115] 0.681672677 0.501380512 0.281113317 0.207511231 0.187187001 0.143467725
#> [121] 0.490187240 0.152096948 0.285201105 0.394537162 0.898689335 0.179481007
#> [127] 0.432015885 0.496324307 0.134272748 0.451968347 0.898589510 0.664577425
#> [133] 0.447749916 0.259512814 0.016816702 0.274800845 0.047021917 0.712741540
#> [139] 0.815875707 0.066286412 0.477457859 0.277572162 0.046088546 0.045501520
#> [145] 0.049059318 0.174202971 0.069094340 0.715817892 0.586037859 0.092815462
#> [151] 0.270849000 0.719645776 0.524842878 0.052324027 0.377958144 0.321111749
#> [157] 0.365998412 0.332792832 0.597147807 0.337683865 0.641655177 0.133597932
#> [163] 0.047588496 0.466104233 0.328637237 0.456727364 0.703639941 0.262539793
#> [169] 0.622767528 0.639739054 0.252030753 0.368368675 0.380839838 0.792276587
#> [175] 0.202299457 0.134794698 0.335626081 0.619286766 0.540158338 0.306364621
#> [181] 0.097274738 0.681772506 0.338758265 0.076805520 0.338154634 0.324523510
#> [187] 0.719092110 0.527588699 0.536168006 0.305369874 0.542888925 0.345900420
#> [193] 0.523276733 0.136491340 0.065504873 0.739952899 0.681850211 0.074856925
#> [199] 0.158411245 0.117409912 0.627132166 0.795021109 0.323532837 0.396392677
#> [205] 0.305673770 0.299958434 0.180254143 0.186509543 0.732255714 0.210431768
#> [211] 0.487512724 0.452879631 0.797313991 0.239692181 0.153348567 0.834670613
#> [217] 0.329071575 0.206381284 0.090183348 0.064623574 0.245902501 0.480025767
#> [223] 0.797301224 0.486220592 0.321714259 0.405018276 0.124537941 0.227980289
#> [229] 0.755208013 0.095071842 0.805946247 0.303203101 0.427218900 0.208086540
#> [235] 0.265930041 0.088650178 0.395098115 0.542244242 0.109549869 0.197394439
#> [241] 0.202540730 0.277935509 0.569151878 0.114998677 0.406585362 0.530848471
#> [247] 0.417432042 0.086630442 0.126422952 0.644136693 0.276155432 0.159563146
#> [253] 0.242750389 0.450544523 0.737566117 0.260132270 0.690973725 0.486846119
#> [259] 0.422447444 0.059011418 0.234950405 0.146394267 0.467648603 0.391205557
#> [265] 0.753383945 0.860474947 0.421435022 0.036314329 0.329816695 0.392135668
#> [271] 0.461164021 0.615344284 0.745823895 0.077665099 0.638724139 0.224563311
#> [277] 0.550017137 0.461276949 0.567681834 0.198301468 0.046534971 0.527854224
#> [283] 0.582504493 0.371944719 0.527726081 0.537312181 0.474778556 0.876594440
#> [289] 0.165391507 0.473484400 0.835710098 0.674601369 0.564915068 0.252633939
#> [295] 0.863535742 0.275419091 0.597632942 0.084917441 0.389853973 0.407451286