el_mean {melt} | R Documentation |
Empirical likelihood for the mean
Description
Computes empirical likelihood for the mean.
Usage
el_mean(x, par, weights = NULL, control = el_control())
Arguments
x |
A numeric matrix, or an object that can be coerced to a numeric matrix. Each row corresponds to an observation. The number of rows must be greater than the number of columns. |
par |
A numeric vector of parameter values to be tested. The length of
the vector must be the same as the number of columns in |
weights |
An optional numeric vector of weights to be used in the
fitting process. The length of the vector must be the same as the number of
rows in |
control |
An object of class ControlEL constructed by
|
Details
Let X_i
be independent and identically distributed
p
-dimensional random variable from an unknown distribution P
for i = 1, \dots, n
. We assume that {\textrm{E}[X_i]} =
{\theta_0} \in {\rm{I\!R}}^p
and that P
has a positive definite
covariance matrix. Given a value of \theta
, the (profile) empirical
likelihood ratio is defined by
R(\theta) =
\max_{p_i}\left\{\prod_{i = 1}^n np_i :
\sum_{i = 1}^n p_i X_i = \theta,\
p_i \geq 0,\
\sum_{i = 1}^n p_i = 1
\right\}.
el_mean()
computes the empirical log-likelihood ratio statistic
-2\log R(\theta)
, along with other values in EL.
Value
An object of class EL.
References
Owen A (1990). “Empirical Likelihood Ratio Confidence Regions.” The Annals of Statistics, 18(1), 90–120. doi:10.1214/aos/1176347494.
See Also
EL, elt()
, el_eval()
, el_control()
Examples
## Scalar mean
data("precip")
fit <- el_mean(precip, 30)
fit
summary(fit)
## Vector mean
data("faithful")
fit2 <- el_mean(faithful, par = c(3.5, 70))
summary(fit2)
## Weighted data
w <- rep(c(1, 2), each = nrow(faithful) / 2)
fit3 <- el_mean(faithful, par = c(3.5, 70), weights = w)
summary(fit3)