Accelerating the pace of engineering and science

# copulastat

Copula rank correlation

## Syntax

R = copulastat('Gaussian',rho)
R = copulastat('t',rho,NU)
R = copulastat(family,alpha)
R = copulastat(...,'type',type)

## Description

R = copulastat('Gaussian',rho) returns the Kendall's rank correlation R that corresponds to a Gaussian copula having linear correlation parameters rho. If rho is a scalar correlation coefficient, R is a scalar correlation coefficient corresponding to a bivariate copula. If rho is a p-by-p correlation matrix, R is a p-by-p correlation matrix.

R = copulastat('t',rho,NU) returns the Kendall's rank correlation R that corresponds to a t copula having linear correlation parameters rho and degrees of freedom NU. If rho is a scalar correlation coefficient, R is a scalar correlation coefficient corresponding to a bivariate copula. If rho is a p-by-p correlation matrix, R is a p-by-p correlation matrix.

R = copulastat(family,alpha) returns the Kendall's rank correlation R that corresponds to a bivariate Archimedean copula with scalar parameter alpha. family is one of 'Clayton', 'Frank', or 'Gumbel'.

R = copulastat(...,'type',type) returns the specified type of rank correlation. type is 'Kendall' to compute Kendall's tau, or 'Spearman' to compute Spearman's rho.

copulastat uses an approximation to Spearman's rank correlation for copula families when no analytic formula exists. The approximation is based on a smooth fit to values computed at discrete values of the copula parameters. For a t copula, the approximation is accurate for degrees of freedom larger than 0.05.

## Examples

expand all

### Compute the Gaussian Copula Rank Correlation

Compute the rank correlation for a Gaussian copula with the specified linear correlation parameter rho.

```rho = -.7071;
tau = copulastat('gaussian',rho)
```
```tau =

-0.5000

```

Generate dependent beta random values using that copula.

```u = copularnd('gaussian',rho,100);
b = betainv(u,2,2);
```

Verify that the sample has a rank correlation approximately equal to tau.

```tau_sample = corr(b,'type','k')
```
```tau_sample =

1.0000   -0.5135
-0.5135    1.0000

```