copulaPdfFrank

First introduced in version 3.00.6

Syntax

copulaPdfFrank(alpha, X)

Details

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

The Frank copula is a two-dimensional Archimedean copula that can model symmetric dependence structures and has no tail dependence. Unlike the Clayton and Gumbel copulas, the Frank copula shape parameter can be either positive or negative, so it can be used for two-dimensional dependence structures with positive or negative dependence.

This function supports only two-dimensional input. The farther the shape parameter alpha is from 0, the stronger the dependence. alpha > 0 indicates positive correlation, and alpha < 0 indicates negative correlation. As alpha approaches 0, the copula approaches the independence copula, but alpha = 0 is not in the Frank copula parameter domain.

Parameters

alpha is a DOUBLE scalar that specifies the Frank copula shape parameter θ. The valid range is (-∞, ∞) \ {0}.

  • alpha > 0 indicates positive correlation.
  • alpha < 0 indicates negative correlation.
  • A larger absolute value of alpha indicates stronger correlation.

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 Frank 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 Frank copula with shape parameter alpha=5.0 at the center point [0.5, 0.5].

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

y = copulaPdfFrank(5.0, X)
y
// Output: [1.4735637245846294]

Example 2. Calculate the positive-correlation Frank copula density at multiple evaluation points. The Frank Copula has a symmetric dependence structure and, unlike the Clayton or Gumbel copula, does not strengthen only one tail.

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

y = copulaPdfFrank(5.0, X)
y
// Output: [3.3778185121129884, 1.4735637245846294, 3.3778185121129876, 0.09167524793418452]

Example 3. Calculate the negative-correlation Frank copula density. For a negative correlation parameter, the opposite-quantile combination [0.1, 0.9] has a higher density than same-direction tail combinations.

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

y = copulaPdfFrank(-3.0, X)
y
// Output: [0.21159924028293484, 1.1808253751833029, 0.21159924028293503, 2.006351286314979]

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 = copulaPdfFrank(5.0, X)
y
// Output: [0, 1.6164687265336453, 0]

Example 5. Calculate the sample density using the fitted Frank shape parameter.

setRandomSeed(5)
X = copulaRandFrank(5.0, 1000)
fitRes = copulaFitFrank(X)

y = copulaPdfFrank(fitRes.alpha, X)

fitRes.alpha
// Output: 5.156894003013904
avg(y)
// Output: 1.5819408179753056

Related functions: copulaFitFrank, copulaRandFrank, copulaCdfFrank, copulaPdfGaussian, copulaPdfStudent, copulaPdfClayton, copulaPdfGumbel