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 |
data |
An optional data frame, list or environment (or object coercible
by |
weights |
An optional numeric vector of weights to be used in the
fitting process. Defaults to |
na.action |
A function which indicates what should happen when the data
contain |
offset |
An optional expression for specifying an a priori known
component to be included in the linear predictor during fitting. This
should be |
control |
An object of class ControlEL constructed by
|
... |
Additional arguments to be passed to the low level regression fitting functions. See ‘Details’. |
Details
Suppose that we observe independent random variables
from a common distribution, where
is the
-dimensional covariate (including the intercept if any) and
is the response. We consider the following linear model:
where is an unknown
-dimensional parameter and the errors
are
independent random variables that satisfy
= 0. We assume that the errors have
finite conditional variances. Then the least square estimator of
solves the following estimating equations:
Given a value of , let
and the (profile)
empirical likelihood ratio is defined by
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
and significance tests for each parameter with
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)