copula: Bivariate copula random generation.

Description Usage Arguments Value References Examples

View source: R/copula.R

Description

Random Number Generation for Bivariate Copula Functions. Only returns a single pair of random values from a bivariate copula with marginal distributions X and Y.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
copula(
  v1,
  v2,
  theta = theta,
  type = "clayton",
  typeX = "Exp",
  num1_X = 1,
  num2_X = NULL,
  typeY = "Exp",
  num1_Y = 1,
  num2_Y = NULL
)

Arguments

v1

A numeric value belong to the interval [0,1], corresponding to the cumulative density of the first marginal distribution.

v2

A numeric value belong to the interval [0,1], corresponding to the cumulative density of the first marginal distribution.

theta

A numeric value for the space parameter.

type

Type of copula. Possible options are "clayton", "frank" "FGM", "AMH", "gumbel-hougaard" and "joe". Defaults to "clayton".

typeX

Type of marginal distribution. Possible options are "Exp", "Norm", "Unif" and "Gamma". Defaults to "Exp".

num1_X

A numeric value for the first parameter of the first marginal distribution. Defaults to "Exp".

num2_X

A numeric value for the second parameter of the first marginal distribution. Only required for two parameter distributions.

typeY

Type of marginal distribution. Possible options are "Exp", "Norm", "Unif" and "Gamma".Defaults to "Exp".

num1_Y

A numeric value for the first parameter of the second marginal distribution.

num2_Y

A numeric value for the second parameter of the second marginal distribution. Only required for two parameter distributions.

Value

2-dimensional vector for the random variables. See also dgCopula, rcopula

References

Nelsen R.B. (2006). An Introduction to Copulas (2nd ed.), Springer-Verlag.

Examples

1
2
3
4
5
clay<-copula(0.6, 0.4, theta=2, type='clayton', typeX='Exp', num1_X=0.56, typeY='Exp', num1_Y=0.90) 
clay[1]
AMH<-copula(0.4, 0.4, theta=0.59, type='AMH', typeX='Norm', num1_X=0.56, num2_X=0.3, typeY='Gamma', 
num1_Y=0.90, num2_Y=0.30)
AMH[2]

gsoutinho/survCopula documentation built on Sept. 4, 2020, 3:54 a.m.