copulaPdfClayton

First introduced in version 3.00.6

Syntax

copulaPdfClayton(alpha, X)

Details

Calculates the probability density of the Clayton copula at the specified evaluation points.

The Clayton copula is a two-dimensional Archimedean copula with lower-tail dependence. It is suitable for modeling dependence structures in which variables experience extreme changes simultaneously in lower quantile regions. For example, in portfolio risk management, it can be used to examine the density contribution when two assets come under pressure together during market downturns.

This function supports only two-dimensional input. A larger shape parameter alpha indicates stronger lower-tail dependence. When alpha = 0, the copula degenerates to the independence copula, and the density is 1 at all valid evaluation points.

Parameters

alpha is a DOUBLE scalar that specifies the Clayton copula shape parameter θ. The valid range is [0, ∞).

  • alpha = 0 indicates the independence copula.
  • alpha > 0 indicates positive dependence and lower-tail dependence.
  • A larger alpha indicates stronger lower-tail dependence.

X is a non-empty two-dimensional numeric matrix or table with dimensions n×2, specifying the set of evaluation points for which to calculate the density. Here, n is the number of evaluation points, that is, the number of rows in X. The value 2 indicates that this function supports only two-dimensional copulas.

  • All elements must be finite numbers.
  • Rows whose elements are all in the open interval (0, 1) are evaluated using the Clayton copula density formula.
  • Rows with any element u on the boundary of or outside the interval (u <= 0 or u >= 1) return 0.
  • When X is a table, each column represents a variable, and the column order defines the variable order.

Returns

A DOUBLE vector with the same length as the number of rows in X. The i-th element of the returned vector is the copula probability density for the i-th row of X.

Examples

Example 1. Calculate the probability density of the Clayton copula with shape parameter alpha=2.0 at the center point [0.5, 0.5].

X = matrix([0.5], [0.5])

y = copulaPdfClayton(2.0, X)
y
// Output: [1.4810036493422782]

Example 2. Calculate densities at multiple evaluation points to observe how the Clayton copula increases density in the joint lower-tail region.

u1 = [0.05, 0.5, 0.95, 0.1]
u2 = [0.05, 0.5, 0.95, 0.9]
X = matrix(u1, u2)

y = copulaPdfClayton(2.0, X)
y
// Output: [10.639819990415681, 1.4810036493422782, 2.502570536285007, 0.04091192552312709]

Example 3. When alpha=0, the copula degenerates to the independence copula, and the density at valid evaluation points is 1.

u1 = [0.2, 0.5, 0.8]
u2 = [0.7, 0.5, 0.3]
X = matrix(u1, u2)

y = copulaPdfClayton(0, X)
y
// Output: [1, 1, 1]

Example 4. Demonstrate how boundary points are handled. Rows containing 0 or 1 return 0.

u1 = [0.0, 0.2, 0.9]
u2 = [0.1, 0.3, 1.0]
X = matrix(u1, u2)

y = copulaPdfClayton(2.0, X)
y
// Output: [0, 1.901323738996821, 0]

Example 5. Use a table as input and calculate sample densities with the fitted Clayton shape parameter.

setRandomSeed(5)
X = copulaRandClayton(2.0, 1000)
stockRanks = table(X[0] as stockA, X[1] as stockB)

fitRes = copulaFitClayton(stockRanks)
y = copulaPdfClayton(fitRes.alpha, stockRanks)

fitRes.alpha
// Output: 2.0203979013617106
avg(y)
// Output: 4.56299390574462

Related functions: copulaFitClayton, copulaRandClayton, copulaCdfClayton, copulaPdfGaussian, copulaPdfStudent, copulaPdfFrank, copulaPdfGumbel