Skip to contents

Access a copula's cumulative distribution function (cdf).

Usage

eval_cdf(copula, u, v)

enframe_cdf(..., u, v, fn_prefix = "cdf", sep = "_")

Arguments

copula, ...

A copula, or possibly multiple copulas in the case of ....

u, v

Vectors of values to evaluate the copula at.

fn_prefix

For enframe_, name of the function to appear in the column(s).

sep

When enframe'ing more than one copula, the character that will be separating the fn_name and the copula name.

Value

The evaluated cdf in vector form (for eval_) and data frame or tibble form (for enframe_).

See also

Other distributional representations: eval_density(), eval_pmf(), eval_survival()

Examples

d1 <- cop_ig(20, 4)
d2 <- cop_igl(1.1)
eval_cdf(d1, u = 0.4, v = 1:9 / 10)
#> [1] 0.04976371 0.11307370 0.17682749 0.23714904 0.29166738 0.33790950 0.37285156
#> [8] 0.39338619 0.39971484
enframe_cdf(d1, u = 0.4, v = 1:9 / 10)
#> # A tibble: 9 × 3
#>      .u    .v    cdf
#>   <dbl> <dbl>  <dbl>
#> 1   0.4   0.1 0.0498
#> 2   0.4   0.2 0.113 
#> 3   0.4   0.3 0.177 
#> 4   0.4   0.4 0.237 
#> 5   0.4   0.5 0.292 
#> 6   0.4   0.6 0.338 
#> 7   0.4   0.7 0.373 
#> 8   0.4   0.8 0.393 
#> 9   0.4   0.9 0.400 
enframe_cdf(d1, d2, u = 1:9 / 10, v = 1:9 / 10)
#> # A tibble: 9 × 4
#>      .u    .v cdf_d1 cdf_d2
#>   <dbl> <dbl>  <dbl>  <dbl>
#> 1   0.1   0.1 0.0150 0.0191
#> 2   0.2   0.2 0.0656 0.0701
#> 3   0.3   0.3 0.143  0.146 
#> 4   0.4   0.4 0.237  0.240 
#> 5   0.5   0.5 0.344  0.349 
#> 6   0.6   0.6 0.459  0.469 
#> 7   0.7   0.7 0.581  0.597 
#> 8   0.8   0.8 0.707  0.730 
#> 9   0.9   0.9 0.842  0.865