- Function File: r = copularnd (family, theta, n)
- Function File: r = copularnd (family, theta, n, d)
- Function File: r = copularnd ('t', theta, df, n)
Random arrays from the copula family distributions.
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.
-
df is the degrees of freedom for the Student’s t family. df 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
-
r is a matrix of random samples from the copula with n samples
of distribution dimension d.
Examples
| theta = 0.5;
r = copularnd ("Gaussian", theta);
theta = 0.5;
df = 2;
r = copularnd ("t", theta, df);
theta = 0.5;
n = 2;
r = copularnd ("Clayton", theta, n);
|
References
-
Roger B. Nelsen. An Introduction to Copulas. Springer, New York,
second edition, 2006.
Source Code:
copularnd