pyvinecopulib

Classes

BicopFamily

A bivariate copula family identifier.

Bicop

A class for bivariate copula models.

FitControlsBicop

A class for controlling fits of bivariate copula models.

Vinecop

A class for vine copula models.

FitControlsVinecop

A class for controlling fits of vine copula models.

CVineStructure

A class for C-vine structures.

DVineStructure

A class for D-vine structures.

RVineStructure

A class for R-vine structures.

Functions

to_pseudo_obs(x: numpy.ndarray[numpy.float64[m, n]], ties_method: str = 'average') numpy.ndarray[numpy.float64[m, n]]

Applies the empirical probability integral transform to a data matrix.

Gives pseudo-observations from the copula by applying the empirical distribution function (scaled by \(n + 1\)) to each margin/column.

Parameters:
Returns:

Pseudo-observations of the copula, i.e. \(F_X(x)\) (column-wise).

simulate_uniform(n: int, d: int, qrng: bool = False, seeds: list[int] = []) numpy.ndarray[numpy.float64[m, n]]

Simulates from the multivariate uniform distribution.

If qrng = TRUE, generalized Halton sequences (see ghalton()) are used for \(d \leq 300\) and Sobol sequences otherwise (see sobol()).

Parameters:
  • n – Number of observations.

  • d – Dimension.

  • qrng – If true, quasi-numbers are generated.

  • seeds – Seeds of the random number generator; if empty (default), the random number generator is seeded randomly.

Returns:

An \(n \times d\) matrix of independent \(\mathrm{U}[0, 1]\) random variables.

ghalton(n: int, d: int, seeds: list[int] = []) numpy.ndarray[numpy.float64[m, n]]

Simulates from the multivariate Generalized Halton Sequence.

For more information on Generalized Halton Sequence, see Faure, H., Lemieux, C. (2009). Generalized Halton Sequences in 2008: A Comparative Study. ACM-TOMACS 19(4), Article 15.

Parameters:
  • n – Number of observations.

  • d – Dimension.

  • seeds – Seeds to scramble the quasi-random numbers; if empty (default), the quasi-random number generator is seeded randomly.

Returns:

An \(n \times d\) matrix of quasi-random \(\mathrm{U}[0, 1]\) variables.

sobol(n: int, d: int, seeds: list[int] = []) numpy.ndarray[numpy.float64[m, n]]

Simulates from the multivariate Sobol sequence.

For more information on the Sobol sequence, see S. Joe and F. Y. Kuo (2008), constructing Sobol sequences with better two-dimensional projections, SIAM J. Sci. Comput. 30, 2635–2654.

Parameters:
  • n – Number of observations.

  • d – Dimension.

  • seeds – Seeds to scramble the quasi-random numbers; if empty (default), the quasi-random number generator is seeded randomly.

Returns:

An \(n \times d\) matrix of quasi-random \(\mathrm{U}[0, 1]\) variables.