Skip to contents

When a copula has p and d functions available (such as pfrk(), dfrk()), cop_parametric() creates a copula that draws on these functions.

Usage

cop_parametric(
  .name,
  ...,
  .variable = c("unknown", "continuous", "discrete", "mixed"),
  .env = parent.frame()
)

Arguments

.name

Name of the copula. Specifically, a string with the suffix of the p and d functions (such as "frk").

...

Parameters, each its own argument, input as name-value pairs.

.variable

Type of random variable represented by the copula; one of "continuous", "discrete", "mixed", or "unknown". Warning: defaults to "unknown", where density and pmf cannot be evaluated.

.env

Environment beginning the search path when looking for the representation, or the name of an environment (or any object that can be coerced to an environment with as.environment().) Defaults to the calling environment.

Value

A bivariate copula object of class "paramcop".

Note

This function is anticipating the p and d copula functions to have its parameters input as a single vector, either named cpar, or as the third function argument.

Examples

# Not working yet:
# d <- cop_parametric("frk", .variable = "continuous")
# eval_density(d, u = c(0.3, 0.6, 0.5), v = c(0.4, 0.4, 0.9))
# eval_pmf(d, u = c(0.3, 0.6, 0.5), v = c(0.4, 0.4, 0.9), strict = FALSE)
# eval_hazard(d, u = c(0.3, 0.6, 0.5), v = c(0.4, 0.4, 0.9))