el_lm {melt}R Documentation

Empirical likelihood for linear models

Description

Fits a linear model with empirical likelihood.

Usage

el_lm(
  formula,
  data,
  weights = NULL,
  na.action,
  offset,
  control = el_control(),
  ...
)

Arguments

formula

An object of class formula (or one that can be coerced to that class) for a symbolic description of the model to be fitted.

data

An optional data frame, list or environment (or object coercible by as.data.frame() to a data frame) containing the variables in formula. If not found in data, the variables are taken from environment(formula).

weights

An optional numeric vector of weights to be used in the fitting process. Defaults to NULL, corresponding to identical weights. If non-NULL, weighted empirical likelihood is computed.

na.action

A function which indicates what should happen when the data contain NAs. The default is set by the na.action setting of options, and is na.fail if that is unset.

offset

An optional expression for specifying an a priori known component to be included in the linear predictor during fitting. This should be NULL or a numeric vector or matrix of extents matching those of the response. One or more offset terms can be included in the formula instead or as well, and if more than one are specified their sum is used.

control

An object of class ControlEL constructed by el_control().

...

Additional arguments to be passed to the low level regression fitting functions. See ‘Details’.

Details

Suppose that we observe n independent random variables {Z_i} \equiv {(X_i, Y_i)} from a common distribution, where X_i is the p-dimensional covariate (including the intercept if any) and Y_i is the response. We consider the following linear model:

Y_i = X_i^\top \theta + \epsilon_i,

where \theta = (\theta_0, \dots, \theta_{p-1}) is an unknown p-dimensional parameter and the errors \epsilon_i are independent random variables that satisfy \textrm{E}(\epsilon_i | X_i) = 0. We assume that the errors have finite conditional variances. Then the least square estimator of \theta solves the following estimating equations:

\sum_{i = 1}^n(Y_i - X_i^\top \theta)X_i = 0.

Given a value of \theta, let {g(Z_i, \theta)} = {(Y_i - X_i^\top \theta)X_i} and 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 g(Z_i, \theta) = \theta,\ p_i \geq 0,\ \sum_{i = 1}^n p_i = 1 \right\}.

el_lm() first computes the parameter estimates by calling lm.fit() (with ... if any) with the model.frame and model.matrix obtained from the formula. Note that the maximum empirical likelihood estimator is the same as the the quasi-maximum likelihood estimator in our model. Next, it tests hypotheses based on asymptotic chi-square distributions of the empirical likelihood ratio statistics. Included in the tests are overall test with

H_0: \theta_1 = \theta_2 = \cdots = \theta_{p-1} = 0,

and significance tests for each parameter with

H_{0j}: \theta_j = 0,\ j = 0, \dots, p-1.

Value

An object of class of LM.

References

Owen A (1991). “Empirical Likelihood for Linear Models.” The Annals of Statistics, 19(4), 1725–1747. doi:10.1214/aos/1176348368.

See Also

EL, LM, el_glm(), elt(), el_control()

Examples

## Linear model
data("thiamethoxam")
fit <- el_lm(fruit ~ trt, data = thiamethoxam)
summary(fit)

## Weighted data
wfit <- el_lm(fruit ~ trt, data = thiamethoxam, weights = visit)
summary(wfit)

## Missing data
fit2 <- el_lm(fruit ~ trt + scb, data = thiamethoxam,
  na.action = na.omit, offset = NULL
)
summary(fit2)

[Package melt version 1.11.4 Index]