Function File: x = copularnd (family, theta, n)
Function File: copularnd (family, theta, n, d)
Function File: copularnd ('t', theta, nu, n)

Generate random samples from a copula family.

Arguments

  • family is the copula family name. Currently, family can be 'Gaussian' for the Gaussian family, 't' for the Student’s t family, or 'Clayton' for the Clayton family.
  • theta is the parameter of the copula. For the Gaussian and Student’s t copula, theta must be a correlation matrix. For bivariate copulas theta can also be a correlation coefficient. For the Clayton family, theta must be a vector with the same number of elements as samples to be generated or be scalar.
  • nu is the degrees of freedom for the Student’s t family. nu must be a vector with the same number of elements as samples to be generated or be scalar.
  • n is the number of rows of the matrix to be generated. n must be a non-negative integer and corresponds to the number of samples to be generated.
  • d is the number of columns of the matrix to be generated. d must be a positive integer and corresponds to the dimension of the copula.

Return values

  • x is a matrix of random samples from the copula with n samples of distribution dimension d.

Examples

theta = 0.5;
x = copularnd ("Gaussian", theta);

theta = 0.5;
nu = 2;
x = copularnd ("t", theta, nu);

theta = 0.5;
n = 2;
x = copularnd ("Clayton", theta, n);

References

  1. Roger B. Nelsen. An Introduction to Copulas. Springer, New York, second edition, 2006.

Package: statistics