Probability Mass Function
pmf.Rd
Access a copula's probability mass function (pmf).
Usage
eval_pmf(copula, u, v, strict = TRUE)
enframe_pmf(..., u, v, fn_prefix = "pmf", sep = "_", strict = TRUE)
Arguments
- copula, ...
A copula, or possibly multiple copulas in the case of
...
.- u, v
Vectors of values to evaluate the copula at.
- strict
Only evaluate when the pmf exists?
TRUE
if so; ifFALSE
, simply evaluates the probability of the specified outcomes.- 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 thefn_name
and the copula name.
Value
The evaluated probabilities
in vector form (for eval_
) and data frame
or tibble form (for enframe_
).
See also
Other distributional representations:
eval_cdf()
,
eval_density()
,
eval_survival()
Examples
d1 <- cop_ig(20, 4)
d2 <- cop_igl(1.1)
eval_pmf(d1, u = 0.4, v = 1:9 / 10, strict = FALSE)
#> [1] 0 0 0 0 0 0 0 0 0
enframe_pmf(d1, u = 0.4, v = 1:9 / 10, strict = FALSE)
#> # A tibble: 9 × 3
#> .u .v pmf
#> <dbl> <dbl> <dbl>
#> 1 0.4 0.1 0
#> 2 0.4 0.2 0
#> 3 0.4 0.3 0
#> 4 0.4 0.4 0
#> 5 0.4 0.5 0
#> 6 0.4 0.6 0
#> 7 0.4 0.7 0
#> 8 0.4 0.8 0
#> 9 0.4 0.9 0
enframe_pmf(d1, d2, u = 1:9 / 10, v = 1:9 / 10, strict = FALSE)
#> # A tibble: 9 × 4
#> .u .v pmf_d1 pmf_d2
#> <dbl> <dbl> <dbl> <dbl>
#> 1 0.1 0.1 0 0
#> 2 0.2 0.2 0 0
#> 3 0.3 0.3 0 0
#> 4 0.4 0.4 0 0
#> 5 0.5 0.5 0 0
#> 6 0.6 0.6 0 0
#> 7 0.7 0.7 0 0
#> 8 0.8 0.8 0 0
#> 9 0.9 0.9 0 0