el_test: Empirical likelihood hypothesis testing

Description Usage Arguments Value Examples

View source: R/el_test.R

Description

Tests single hypothesis for general block designs.

Usage

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

Arguments

formula

A formula object. It must specify 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 the formula.

lhs

Numeric matrix specifying linear hypothesis in terms of parameters.

rhs

Optional numeric vector for the right hand side of lhs. If not specified, it is set to 0 vector.

maxit

Maximum number of iterations for optimization. Defaults to 10000.

abstol

Absolute convergence tolerance for optimization. Defaults to 1e-08.

Value

A list with class c("test", "melt").

Examples

1
2
3
4
5
## test for equal means
el_test(clo ~ trt | blk, clothianidin,
        lhs = matrix(c(1, -1, 0, 0,
                       0, 1, -1, 0,
                       0, 0, 1, -1), byrow = TRUE, nrow = 3))

melt documentation built on Oct. 8, 2021, 9:10 a.m.