el_test {elgbd}R Documentation

Hypothesis testing with empirical likelihood

Description

Tests single hypothesis for general block designs with empirical likelihood.

Usage

el_test(
  formula,
  data,
  lhs,
  rhs = NULL,
  maxit = 10000,
  abstol = 1e-08,
  verbose = FALSE
)

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. It must specify the variables for response, treatment, and block as response ~ treatment | block. Note that the use of vertical bar (|) separating treatment and block.

data

A data frame containing the variables in formula.

lhs

A numeric matrix specifying the left-hand side of a hypothesis in terms of parameters.

rhs

An optional numeric vector specifying the right-hand side the hypothesis. If not specified, it is set to the zero vector. Defaults to NULL.

maxit

A single integer for the maximum number of iterations for optimization. Defaults to 10000.

abstol

A single numeric for the absolute convergence tolerance for optimization. Defaults to 1e-08.

verbose

A single logical. If TRUE, a message on the convergence status is printed. Defaults to FALSE.

Value

A list containing the model fit and optimization results.

References

Kim E, MacEachern SN, Peruggia M (2023). "Empirical likelihood for the analysis of experimental designs." Journal of Nonparametric Statistics, 35(4), 709–732. doi:10.1080/10485252.2023.2206919.

Examples

# Test for equal means
data("clothianidin")
el_test(clo ~ trt | blk, clothianidin,
  lhs = matrix(c(
    1, -1, 0, 0,
    0, 1, -1, 0,
    0, 0, 1, -1
  ), byrow = TRUE, nrow = 3L)
)

[Package elgbd version 0.9.0 Index]