EuL: Multi-variate Euclidean likelihood with analytical solution

View source: R/elfunctions.R

EuLR Documentation

Multi-variate Euclidean likelihood with analytical solution

Description

Multi-variate Euclidean likelihood with analytical solution

Usage

EuL(
  z,
  mu = NULL,
  ct = NULL,
  vt = NULL,
  shift = NULL,
  SEL = TRUE,
  weight.tolerance = NULL,
  trunc.to = 0,
  return.weights = FALSE,
  verbose = FALSE,
  chull.diag = FALSE
)

Arguments

z

Numeric data vector.

mu

Hypothesized mean of z in the moment condition.

ct

Numeric count variable with non-negative values that indicates the multiplicity of observations. Can be fractional. Very small counts below the threshold weight.tolerance are zeroed.

vt

Numeric vector: non-negative variance weights for estimating the conditional variance of z. Probabilities are returned only for the observations where vt > 0.

shift

The value to add in the denominator (useful in case there are extra Lagrange multipliers): 1 + lambda'Z + shift.

SEL

If FALSE, then the boundaries for the lambda search are based on the total sum of counts, like in vanilla empirical likelihood, due to formula (2.9) in \insertCiteowen2001empiricalsmoothemplik, otherwise according to Cosma et al. (2019, p. 170, the topmost formula).

weight.tolerance

Weight tolerance for counts to improve numerical stability (similar to the ones in Art B. Owen's 2017 code, but adapting to the sample size).

trunc.to

Counts under weight.tolerance will be set to this value. In most cases, setting this to 0 or weight.tolerance is a viable solution of the zero-denominator problem.

return.weights

Logical: if TRUE, individual EL weights are computed and returned. Setting this to FALSE gives huge memory savings in large data sets, especially when smoothing is used.

verbose

Logical: if TRUE, prints warnings.

chull.diag

Logical: if TRUE, checks if there is a definite convex hull failure in at least one dimension (mu being smaller than the smallest or larger than the largest element). Note that it does not check if mu is strictly in the convex hull because this procedure is much slower and is probably unnecessary.

The arguments ct and vt are responsible for smoothing of the moment function and conditional variance, respectively. The objective function is

\min_{p_{ij}} \frac1n \sum_{i=1}^n \sum_{j=1}^n \mathbb{I}_{ij} \frac{(p_{ij} - c_{ij})^2}{2v_{ij}}

, where \mathbb{I}_{ij} is 1 if v_{ij} \ne 0.

This estimator is numerically equivalent to the Sieve Minimum Distance estimator of \insertCiteai2003efficientsmoothemplik with kernel sieves, but this interface provides more flexibility through the two sets of weights. If ct and vt are not provided, their default value is set to 1, and the resulting estimator is the CUE-GMM estimator: a quadratic form in which the unconditional mean vector is weighted by the inverse of the unconditional variance.

Value

A list with the same structure as that in [EL()].

References

\insertAllCited

See Also

[EL()]

Examples

set.seed(1)
z <- cbind(rnorm(10), runif(10))
colMeans(z)
a <- EuL(z, return.weights = TRUE)
a$wts
sum(a$wts)  # Unity
colSums(a$wts * z)  # Zero

smoothemplik documentation built on Aug. 22, 2025, 1:11 a.m.