copulaRandGaussian

First introduced in version 3.00.6

Syntax

copulaRandGaussian(rho, count)

Details

Returns two-dimensional random vectors that follow a Gaussian Copula dependence structure. Each row of the returned matrix is a two-dimensional sample, and each column follows a uniform distribution over (0, 1).

Gaussian Copula is used to simulate symmetric dependence and does not model tail dependence.

Parameters

rho is a numeric scalar or a 2-by-2 numeric matrix indicating the linear correlation parameter. If it is a scalar, it specifies the two-dimensional correlation coefficient and must be in (-1, 1). If it is a matrix, it must be a positive definite correlation matrix with diagonal elements equal to 1.

count is a positive INT scalar indicating the number of samples to generate.

Returns

A DOUBLE matrix with count rows and 2 columns. All values are in the interval (0, 1).

Examples

Generate two-dimensional samples with a scalar correlation coefficient:

setRandomSeed(seed=20260114)
u = copulaRandGaussian(rho=0.7, count=5)
shape(u)
// output: 5 :2

min(flatten(u)) > 0 && max(flatten(u)) < 1
// output: true

Generate two-dimensional samples with a 2-by-2 correlation matrix:

rho = [1.0, 0.7, 0.7, 1.0]$2:2
u = copulaRandGaussian(rho=rho, count=5)
shape(u)
// output: 5 :2

Related functions: copulaRandStudent, copulaRandClayton, copulaRandFrank, copulaRandGumbel