Tests a linear hypothesis.

## Usage

```
# S4 method for EL
elt(
object,
rhs = NULL,
lhs = NULL,
alpha = 0.05,
calibrate = "chisq",
control = NULL
)
```

## Arguments

- object
An object that inherits from EL.

- rhs
A numeric vector or a column matrix for the right-hand side of hypothesis, with as many entries as the rows in

`lhs`

. Defaults to`NULL`

. See ‘Details’.- lhs
A numeric matrix or a vector (treated as a row matrix) for the left-hand side of a hypothesis. Each row gives a linear combination of the parameters in

`object`

. The number of columns must be equal to the number of parameters. Or a character vector with a symbolic description of the hypothesis is allowed. Defaults to`NULL`

. See ‘Details’.- alpha
A single numeric for the significance level. Defaults to

`0.05`

.- calibrate
A single character for the calibration method. It is case-insensitive and must be one of

`"chisq"`

,`"boot"`

, or`"f"`

. Defaults to`"chisq"`

. See ‘Details’.- control
An object of class ControlEL constructed by

`el_control()`

. Defaults to`NULL`

and inherits the`control`

slot in`object`

.

## Value

An object of class of ELT. If `lhs`

is non-`NULL`

, the
`optim`

slot corresponds to that of CEL. Otherwise, it
corresponds to that of EL.

## Details

`elt()`

performs the constrained minimization of \(l(\theta)\)
described in CEL. `rhs`

and `lhs`

cannot be both `NULL`

. For
non-`NULL`

`lhs`

, it is required that `lhs`

have full row rank
\(q \leq p\) and \(p\) be equal to the number of parameters in the
`object`

.

Depending on the specification of `rhs`

and `lhs`

, we have the following
three cases:

If both

`rhs`

and`lhs`

are non-`NULL`

, the constrained minimization is performed with the right-hand side \(r\) and the left-hand side \(L\) as $$\inf_{\theta: L\theta = r} l(\theta).$$If

`rhs`

is`NULL`

, \(r\) is set to the zero vector as \(\inf_{\theta: L\theta = 0} l(\theta)\).If

`lhs`

is`NULL`

, \(L\) is set to the identity matrix and the problem reduces to evaluating at \(r\) as \(l(r)\).

`calibrate`

specifies the calibration method used. Three methods are
available: `"chisq"`

(chi-square calibration), `"boot"`

(bootstrap
calibration), and `"f"`

(\(F\) calibration). `"boot"`

is applicable only
when `lhs`

is `NULL`

. The `nthreads`

, `seed`

, and `B`

slots in `control`

apply to the bootstrap procedure. `"f"`

is applicable only to the mean
parameter when `lhs`

is `NULL`

.

## References

Adimari G, Guolo A (2010).
“A Note on the Asymptotic Behaviour of Empirical Likelihood Statistics.”
*Statistical Methods & Applications*, 19(4), 463--476.
doi:10.1007/s10260-010-0137-9
.

Qin J, Lawless J (1995).
“Estimating Equations, Empirical Likelihood and Constraints on Parameters.”
*Canadian Journal of Statistics*, 23(2), 145--159.
doi:10.2307/3315441
.

## See also

EL, ELT, `elmt()`

, `el_control()`

## Examples

```
## F calibration for the mean
data("precip")
fit <- el_mean(precip, 32)
elt(fit, rhs = 32, calibrate = "f")
#>
#> Empirical Likelihood Test
#>
#> Hypothesis:
#> par = 32
#>
#> Significance level: 0.05, Calibration: F
#>
#> Statistic: 2.997, Critical value: 3.98
#> p-value: 0.0879
#> EL evaluation: converged
#>
## Test of no treatment effect
data("clothianidin")
contrast <- matrix(c(
1, -1, 0, 0,
0, 1, -1, 0,
0, 0, 1, -1
), byrow = TRUE, nrow = 3)
fit2 <- el_lm(clo ~ -1 + trt, clothianidin)
elt(fit2, lhs = contrast)
#>
#> Empirical Likelihood Test
#>
#> Hypothesis:
#> trtNaked - trtFungicide = 0
#> trtFungicide - trtLow = 0
#> trtLow - trtHigh = 0
#>
#> Significance level: 0.05, Calibration: Chi-square
#>
#> Statistic: 26.6, Critical value: 7.815
#> p-value: 7.148e-06
#> Constrained EL: converged
#>
## A symbolic description of the same hypothesis
elt(fit2, lhs = c(
"trtNaked - trtFungicide",
"trtFungicide - trtLow",
"trtLow - trtHigh"
))
#>
#> Empirical Likelihood Test
#>
#> Hypothesis:
#> trtNaked - trtFungicide = 0
#> trtFungicide - trtLow = 0
#> trtLow - trtHigh = 0
#>
#> Significance level: 0.05, Calibration: Chi-square
#>
#> Statistic: 26.6, Critical value: 7.815
#> p-value: 7.148e-06
#> Constrained EL: converged
#>
```