Learn R Programming

VBel (version 1.1.6)

compute_AEL: Compute the Adjusted Empirical Likelihood

Description

Evaluates the Log-Adjusted Empirical Likelihood (AEL) (Chen, Variyath, and Abraham 2008) for a given data set, moment conditions and parameter values. The AEL function is formulated as $$ \log \text{AEL}(\boldsymbol{\theta}) = \max_{\mathbf{w}'} \sum\limits_{i=1}^{n+1} \log(w_i'), $$ where \(\mathbf{z}_{n+1}\) is a pseudo-observation that satisfies $$ h(\mathbf{z}_{n+1}, \boldsymbol{\theta}) = -\frac{a_n}{n} \sum\limits_{i=1}^n h(\mathbf{z}_i, \boldsymbol{\theta}) $$ for some constant \(a_n > 0\) that may (but not necessarily) depend on \(n\), and \(\mathbf{w}' = (w_1', \ldots, w_n', w_{n+1}')\) is a vector of probability weights that define a discrete distribution on \(\{\mathbf{z}_1, \ldots, \mathbf{z}_n, \mathbf{z}_{n+1}\}\), and are subject to the constraints $$ \sum\limits_{i=1}^{n+1} w_i' h(\mathbf{z}_i, \boldsymbol{\theta}) = 0, \quad \text{and} \quad \sum\limits_{i=1}^{n+1} w_i' = 1. $$ Here, the maximizer \(\tilde{\mathbf{w}}\) is of the form $$ \tilde{w}_i = \frac{1}{n+1} \frac{1}{1 + \lambda_{\text{AEL}}^\top h(\mathbf{z}_i, \boldsymbol{\theta})}, $$ where \(\lambda_{\text{AEL}}\) satisfies the constraints $$ \frac{1}{n+1} \sum\limits_{i=1}^{n+1} \frac{h(\mathbf{z}_i, \boldsymbol{\theta})}{1 + \lambda_{\text{AEL}}^\top h(\mathbf{z}_i, \boldsymbol{\theta})} = 0, \quad \text{and} \quad \frac{1}{n+1} \sum\limits_{i=1}^{n+1} \frac{1}{1 + \lambda_{\text{AEL}}^\top h(\mathbf{z}_i, \boldsymbol{\theta})} = 1. $$

Usage

compute_AEL(th, h, lam0, a, z, iters = 500)

Value

A numeric value for the Adjusted Empirical Likelihood function computed evaluated at a given theta value

Arguments

th

p x 1 parameter vector to evaluate the AEL function at

h

User-defined moment-condition function. Note that output should be an n x K matrix where K is necessarily \(\geq\) p. Input format for h should be (zi, th) were zi corresponds to the ith observation's data and th is the parameter vector

lam0

Initial vector for Lagrange multiplier lambda

a

Positive scalar adjustment constant

z

n x d data matrix. Note that \(\{z_i\}_{i=1}^{n}\) is a sequence of d-dimensional data vectors

iters

Number of iterations using Newton-Raphson for estimation of lambda. Default: 500

Author

Weichang Yu, Jeremy Lim

Details

Note that theta (th) is a p-dimensional vector, h is a K-dimensional vector and K \(\geq\) p

References

Chen, J., Variyath, A. M., and Abraham, B. (2008), “Adjusted Empirical Likelihood and its Properties”, Journal of Computational and Graphical Statistics, 17, 426–443. Pages 2,3,4,5,6,7 tools:::Rd_expr_doi("doi:10.1198/106186008X321068")

Examples

Run this code
# Generating 30 data points from a simple linear-regression model
set.seed(1)
x     <- runif(30, min = -5, max = 5)
vari  <- rnorm(30, mean = 0, sd = 1)
y     <- 0.75 - x + vari
z     <- cbind(x, y)

lam0  <- matrix(c(0,0), nrow = 2)
th    <- matrix(c(0.8277, -1.0050), nrow = 2)

# Specify AEL constant and Newton-Rhapson iteration
a     <- 0.00001
iters <- 10

# Specify moment condition functions for linear regression
h <- function(zi, th) {
    xi      <- zi[1]
    yi      <- zi[2]
    h_zith  <- c(yi - th[1] - th[2] * xi, xi*(yi - th[1] - th[2] * xi))
    matrix(h_zith, nrow = 2)
}
result <- compute_AEL(th, h, lam0, a, z, iters)

Run the code above in your browser using DataLab