el_pairwise: Empirical likelihood pairwise comparisons

Description Usage Arguments Value Examples

View source: R/el_pairwise.R

Description

Tests all pairwise comparisons or comparisons with control for general block designs. Two single step asymptotic k-FWER (generalized family-wise error rate) controlling procedures are available: asymptotic Monte Carlo (AMC) and nonparametric bootstrap (NB).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
el_pairwise(
  formula,
  data,
  control = NULL,
  k = 1,
  alpha = 0.05,
  method = c("AMC", "NB"),
  B,
  nthread = 1,
  progress = TRUE,
  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.

control

Optional character specifying the treatment for comparisons with control.

k

Single integer for k in k-FWER. Defaults to 1.

alpha

Level of the test. Defaults to 0.05.

method

Single character for the procedure to be used; either 'AMC' or 'NB' is supported. Defaults to 'AMC'.

B

Number of Monte Carlo samples for the AMC (number of bootstrap replicates for the NB).

nthread

Number of threads to be used with OpenMP. Only applied when the NB is chosen as the method. Defaults to 1.

progress

If TRUE, will show progress status.

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("pairwise", "melt").

Examples

1
2
3
4
5
## all pairwise comparisons
el_pairwise(clo ~ trt | blk, clothianidin, B = 10000)

## comparisons with control
el_pairwise(clo ~ trt | blk, clothianidin, control = "Naked", method = "NB", B = 1000)

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