Bicop.loglik
- Bicop.loglik(self, u: numpy.ndarray = array([], shape=(0, 2), dtype=float64), parameters: numpy.ndarray | None = None, num_threads: int = 1) float
Evaluates the log-likelihood.
The log-likelihood is defined as
\[\mathrm{loglik} = \sum_{i = 1}^n \log c(U_{1, i}, U_{2, i}),\]where \(c\)is the copula density, see
pdf().When at least one variable is discrete, more than two columns are required for
u: the first \(n \times 2\)block contains realizations of \((F_{X_1}(x_1), F_{X_2}(x_2))\). The second \(n \times 2\)block contains realizations of \((F_{X_1}(x_1^-), F_{X_2}(x_2^-))\). The minus indicates a left-sided limit of the cdf. For, e.g., an integer-valued variable, it holds \(F_{X_1}(x_1^-) = F_{X_1}(x_1 - 1)\). For continuous variables the left limit and the cdf itself coincide. Respective columns can be omitted in the second block.- Parameters:
- undarray, shape (n, m), dtype float
An \(n \times (2 + k)\)matrix of observations contained in \((0, 1)\), where \(k\)is the number of discrete variables.
- Returns:
- float
The log-likelihood evaluated at
u.
Notes
If
parametersis given, the copula is evaluated with a different parameter set per row ofuinstead of the stored parameters.parametersis then an(n, p)array with one row per row ofuandp == len(self.parameters)columns, in the family’s natural (unrotated) parameterization, and the evaluation may be parallelized overnum_threads. This is supported for parametric families only; a nonparametric family, a wrong shape, or non-finite or out-of-bounds values raiseRuntimeError.